dumpcar 0.3.1 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f4098f5a361deb33a01b2bf1551a41c532de946f1bae2f418ebcf5d4739bf68e
4
- data.tar.gz: d82319e62b40f0cd3b619da6e07e083faff7ecf1c0cf03105b9ea8463f1932c5
3
+ metadata.gz: 67a25f999dd3702186fc0cbd57185571a89f84056e0449fdaa9df35ea691b4b8
4
+ data.tar.gz: f0a1ff0835752733f37524992a23e078584627b8830d9b4d021db5db198754fa
5
5
  SHA512:
6
- metadata.gz: 80e2878b12006e0950a199cca67593ebec456f416b8f0529fda1a9753ca530303632ff8169a46f042f82d780a88afb264f100823bb7ffc76f95390601735829b
7
- data.tar.gz: 505156796ac225a538c8da5e5233515ef3580fefaf0b688f257da4840022ec8a536e7b140105fc0485bae82b759dda245cef8d3c5219f51084bd4f4f38c320a5
6
+ metadata.gz: c85f7ec59f086169b0d17bdcfb87fa3c45e49220f50409692ee3b5d1d7dae71078ece3d783946c6cfc671d1b26fb2c1469b0a9bebd8b26e2e2055942ab9ebf48
7
+ data.tar.gz: a792c6207e8286d7e89b0fe337fe509f1027e973bb3d99daa0bf6b0be03a453ba7a20bf46c6a65cbd8c66f3be632b11dc8e156c9234b4891f336a8fd77013ac2
@@ -1,4 +1,4 @@
1
- FROM mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye
1
+ FROM mcr.microsoft.com/devcontainers/ruby:3.2
2
2
 
3
3
  RUN su vscode -c "/usr/local/rvm/bin/rvm fix-permissions"
4
4
 
@@ -10,7 +10,7 @@ ENV RAILS_DEVELOPMENT_HOSTS=".githubpreview.dev,.preview.app.github.dev,.app.git
10
10
  RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
11
11
  && apt-get -y install --no-install-recommends postgresql-common \
12
12
  && /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \
13
- && apt-get -y install --no-install-recommends postgresql-client-15
13
+ && apt-get -y install --no-install-recommends postgresql-client-18
14
14
 
15
15
  # [Optional] Uncomment this line to install additional gems.
16
16
  # RUN su vscode -c "gem install <your-gem-names-here>"
@@ -27,8 +27,10 @@
27
27
  "Ruby LSP RSpec": {
28
28
  "rspecCommand": "rspec -f d"
29
29
  }
30
- }
31
- }
30
+ },
31
+ "rubyLsp.formatter": "standard"
32
+ },
33
+ "extensions": ["redhat.vscode-yaml"]
32
34
  }
33
35
  }
34
36
 
@@ -19,10 +19,10 @@ services:
19
19
  # (Adding the "ports" property to this file will not forward from a Codespace.)
20
20
 
21
21
  db:
22
- image: postgres:latest
22
+ image: postgres:18
23
23
  restart: unless-stopped
24
24
  volumes:
25
- - postgres-data:/var/lib/postgresql/data
25
+ - postgres-data:/var/lib/postgresql
26
26
  - ./create-db-user.sql:/docker-entrypoint-initdb.d/create-db-user.sql
27
27
  environment:
28
28
  POSTGRES_USER: postgres
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.2.8
1
+ 3.2.10
data/Appraisals CHANGED
@@ -5,7 +5,7 @@
5
5
  end
6
6
  end
7
7
 
8
- [7.1, 7.2, 8.0].each do |ver|
8
+ [7.1, 7.2, 8.0, 8.1].each do |ver|
9
9
  appraise "rails-#{ver}" do
10
10
  gem "rails", "~> #{ver}.0"
11
11
  end
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,3 @@
1
+ ## How to contribute to Dumpcar
2
+
3
+ - Comply with the code of conduct
data/LICENSE CHANGED
@@ -11,7 +11,7 @@ You can copy, convey, propagate, redistribute and/or modify this program
11
11
 
12
12
  This program is distributed in the hope that it will be useful, but
13
13
  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
14
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15
15
  License for more details.
16
16
 
17
17
  You should have received a copy of the GNU General Public License along
data/NOTICES CHANGED
@@ -53,3 +53,26 @@ for more details.
53
53
  You should have received a copy of the GNU Lesser General Public License
54
54
  along with this program in a file in the toplevel directory called
55
55
  "LGPL-3.0.txt". If not, see <http://www.gnu.org/licenses/>.
56
+
57
+ rails:
58
+
59
+ Copyright (c) 2005-2019 David Heinemeier Hansson
60
+
61
+ Permission is hereby granted, free of charge, to any person obtaining
62
+ a copy of this software and associated documentation files (the
63
+ "Software"), to deal in the Software without restriction, including
64
+ without limitation the rights to use, copy, modify, merge, publish,
65
+ distribute, sublicense, and/or sell copies of the Software, and to
66
+ permit persons to whom the Software is furnished to do so, subject to
67
+ the following conditions:
68
+
69
+ The above copyright notice and this permission notice shall be
70
+ included in all copies or substantial portions of the Software.
71
+
72
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
73
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
74
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
75
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
76
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
77
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
78
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Dumpcar
2
2
 
3
- [![Ruby Gem version](https://badge.fury.io/rb/dumpcar.svg)](https://rubygems.org/gems/dumpcar) [![Ruby build](https://github.com/wwahammy/dumpcar/actions/workflows/main.yml/badge.svg)](https://github.com/wwahammy/dumpcar/actions/workflows/main.yml)
3
+ [![Ruby Gem version](https://badge.fury.io/rb/dumpcar.svg)](https://rubygems.org/gems/dumpcar) [![Ruby build](https://github.com/PeevRb/dumpcar/actions/workflows/main.yml/badge.svg)](https://github.com/PeevRb/dumpcar/actions/workflows/main.yml)
4
4
 
5
- Rails commands for dumping and restoring the contents of the PostgreSQL database for your Rails application.
5
+ Rails commands for dumping and restoring the contents of the PostgreSQL database for your Rails >= 6 application.
6
6
 
7
7
  - Dump (`rails dumpcar:dump`) and restore your last dump (`rails dumpcar:restore`) with a single command
8
8
  - Uses your Rails database credentials for your environment OR any Rails supported Postgres connection string (via `DATABASE_URL`)
@@ -35,7 +35,7 @@ Outside of the `rails dumpcar:dump` and `rails dumpcar:restore` commands, don't
35
35
  - Support other Rails databases (MySQL and SQLite)
36
36
  - Support other Rails environments than the current one
37
37
  - Ability to clean your db/dumps directory of all dumps before a given time
38
- - Add support for naming a dump (you can manually do this now but not via the rake task)
38
+ - Add support for naming a dump (you can manually do this now but not via the Rails command task)
39
39
  - Restoring a specific dump via filepath
40
40
  - Restoring a specific dump by timestamp
41
41
  - Restoring a specific dump by name
@@ -51,15 +51,15 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
51
51
 
52
52
  ## Contributing
53
53
 
54
- Bug reports and pull requests are welcome on GitHub at https://github.com/wwahammy/dumpcar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/wwahammy/dumpcar/blob/main/CODE_OF_CONDUCT.md).
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/PeevRb/dumpcar. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/PeevRb/dumpcar/blob/main/CODE_OF_CONDUCT.md).
55
55
 
56
56
  ## License
57
57
 
58
- The gem is available as open source under the terms of the [LGPL-3.0-or-later license](https://github.com/wwahammy/dumpcar/blob/main/LICENSE).
58
+ The gem is available as open source under the terms of the [LGPL-3.0-or-later license](https://github.com/PeevRb/dumpcar/blob/main/LICENSE).
59
59
 
60
60
  ## Code of Conduct
61
61
 
62
- Everyone interacting in the Dumpcar project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/wwahammy/dumpcar/blob/main/CODE_OF_CONDUCT.md).
62
+ Everyone interacting in the Dumpcar project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/PeevRb/dumpcar/blob/main/CODE_OF_CONDUCT.md).
63
63
 
64
64
  ## Releasing
65
65
 
data/SECURITY.md CHANGED
@@ -11,7 +11,7 @@ vulnerability reports for the current major version.
11
11
 
12
12
  ## Reporting a Vulnerability
13
13
 
14
- To report a vulnerability, please visit https://github.com/wwahammy/dumpcar/security to report a vulnerability.
14
+ To report a vulnerability, please visit https://github.com/peevrb/dumpcar/security to report a vulnerability.
15
15
  Vulnerability reports will addressed when we have time. Please follow the
16
- [dumpcar Code of Conduct](https://github.com/wwahammy/dumpcar/blob/main/CODE_OF_CONDUCT.md)
16
+ [dumpcar Code of Conduct](https://github.com/peevrb/dumpcar/blob/main/CODE_OF_CONDUCT.md)
17
17
  at all times.
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", "~> 6.0.0"
19
19
  gem "concurrent-ruby", "1.3.4"
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", "~> 6.1.0"
19
19
  gem "concurrent-ruby", "1.3.4"
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", "~> 7.0.0"
19
19
  gem "concurrent-ruby", "1.3.4"
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", "~> 7.1.0"
19
19
 
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", "~> 7.2.0"
19
19
 
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", "~> 8.0.0"
19
19
 
@@ -0,0 +1,24 @@
1
+ # This file was generated by Appraisal2
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "aruba", "~> 2.3"
6
+ gem "irb"
7
+ gem "rake", "~> 13.0"
8
+ gem "rspec", "~> 3.0"
9
+ gem "rspec-github", :require => false
10
+ gem "shoulda-matchers"
11
+ gem "standard", "~> 1.3"
12
+ gem "combustion"
13
+ gem "pg"
14
+ gem "rspec-rails"
15
+ gem "database_cleaner-active_record"
16
+ gem "appraisal2"
17
+ gem "debug"
18
+ gem "rails", "~> 8.1.0"
19
+
20
+ group :development do
21
+ gem "ruby-lsp-rspec", :require => false
22
+ end
23
+
24
+ gemspec :path => "../"
@@ -1,4 +1,4 @@
1
- # This file was generated by Appraisal
1
+ # This file was generated by Appraisal2
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
@@ -13,7 +13,7 @@ gem "combustion"
13
13
  gem "pg"
14
14
  gem "rspec-rails"
15
15
  gem "database_cleaner-active_record"
16
- gem "appraisal", :git => "https://github.com/pboling/appraisal.git", :ref => "c353e3ee3105a3db8aab49d51df8c159959165a0"
16
+ gem "appraisal2"
17
17
  gem "debug"
18
18
  gem "rails", :github => "rails/rails", :branch => "main"
19
19
 
@@ -0,0 +1,240 @@
1
+ # frozen_string_literal: true
2
+
3
+ # this is a backport of the Active Support BroadcastLogger from Rails 8. It's needed because we support versions prior to rails 7.1 when it was added
4
+ module Dumpcar::Util
5
+ # = Active Support Broadcast Logger
6
+ #
7
+ # The Broadcast logger is a logger used to write messages to multiple IO. It is commonly used
8
+ # in development to display messages on STDOUT and also write them to a file (development.log).
9
+ # With the Broadcast logger, you can broadcast your logs to a unlimited number of sinks.
10
+ #
11
+ # The BroadcastLogger acts as a standard logger and all methods you are used to are available.
12
+ # However, all the methods on this logger will propagate and be delegated to the other loggers
13
+ # that are part of the broadcast.
14
+ #
15
+ # Broadcasting your logs.
16
+ #
17
+ # stdout_logger = Logger.new(STDOUT)
18
+ # file_logger = Logger.new("development.log")
19
+ # broadcast = BroadcastLogger.new(stdout_logger, file_logger)
20
+ #
21
+ # broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file.
22
+ #
23
+ # Add a logger to the broadcast.
24
+ #
25
+ # stdout_logger = Logger.new(STDOUT)
26
+ # broadcast = BroadcastLogger.new(stdout_logger)
27
+ # file_logger = Logger.new("development.log")
28
+ # broadcast.broadcast_to(file_logger)
29
+ #
30
+ # broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file.
31
+ #
32
+ # Modifying the log level for all broadcasted loggers.
33
+ #
34
+ # stdout_logger = Logger.new(STDOUT)
35
+ # file_logger = Logger.new("development.log")
36
+ # broadcast = BroadcastLogger.new(stdout_logger, file_logger)
37
+ #
38
+ # broadcast.level = Logger::FATAL # Modify the log level for the whole broadcast.
39
+ #
40
+ # Stop broadcasting log to a sink.
41
+ #
42
+ # stdout_logger = Logger.new(STDOUT)
43
+ # file_logger = Logger.new("development.log")
44
+ # broadcast = BroadcastLogger.new(stdout_logger, file_logger)
45
+ # broadcast.info("Hello world!") # Writes the log to STDOUT and the development.log file.
46
+ #
47
+ # broadcast.stop_broadcasting_to(file_logger)
48
+ # broadcast.info("Hello world!") # Writes the log *only* to STDOUT.
49
+ #
50
+ # At least one sink has to be part of the broadcast. Otherwise, your logs will not
51
+ # be written anywhere. For instance:
52
+ #
53
+ # broadcast = BroadcastLogger.new
54
+ # broadcast.info("Hello world") # The log message will appear nowhere.
55
+ #
56
+ # If you are adding a custom logger with custom methods to the broadcast,
57
+ # the `BroadcastLogger` will proxy them and return the raw value, or an array
58
+ # of raw values, depending on how many loggers in the broadcasts responded to
59
+ # the method:
60
+ #
61
+ # class MyLogger < ::Logger
62
+ # def loggable?
63
+ # true
64
+ # end
65
+ # end
66
+ #
67
+ # logger = BroadcastLogger.new
68
+ # logger.loggable? # => A NoMethodError exception is raised because no loggers in the broadcasts could respond.
69
+ #
70
+ # logger.broadcast_to(MyLogger.new(STDOUT))
71
+ # logger.loggable? # => true
72
+ # logger.broadcast_to(MyLogger.new(STDOUT))
73
+ # puts logger.broadcasts # => [MyLogger, MyLogger]
74
+ # logger.loggable? # [true, true]
75
+ class BroadcastLogger
76
+ include ActiveSupport::LoggerSilence
77
+
78
+ # Returns all the logger that are part of this broadcast.
79
+ attr_reader :broadcasts
80
+ attr_accessor :progname
81
+
82
+ def initialize(*loggers)
83
+ @broadcasts = []
84
+ @progname = "Broadcast"
85
+
86
+ broadcast_to(*loggers)
87
+ end
88
+
89
+ # Add logger(s) to the broadcast.
90
+ #
91
+ # broadcast_logger = ActiveSupport::BroadcastLogger.new
92
+ # broadcast_logger.broadcast_to(Logger.new(STDOUT), Logger.new(STDERR))
93
+ def broadcast_to(*loggers)
94
+ @broadcasts.concat(loggers)
95
+ end
96
+
97
+ # Remove a logger from the broadcast. When a logger is removed, messages sent to
98
+ # the broadcast will no longer be written to its sink.
99
+ #
100
+ # sink = Logger.new(STDOUT)
101
+ # broadcast_logger = ActiveSupport::BroadcastLogger.new
102
+ #
103
+ # broadcast_logger.stop_broadcasting_to(sink)
104
+ def stop_broadcasting_to(logger)
105
+ @broadcasts.delete(logger)
106
+ end
107
+
108
+ def local_level=(level)
109
+ @broadcasts.each do |logger|
110
+ logger.local_level = level if logger.respond_to?(:local_level=)
111
+ end
112
+ end
113
+
114
+ def local_level
115
+ loggers = @broadcasts.select { |logger| logger.respond_to?(:local_level) }
116
+
117
+ loggers.map do |logger|
118
+ logger.local_level
119
+ end.first
120
+ end
121
+
122
+ LOGGER_METHODS = %w[
123
+ << log add debug info warn error fatal unknown
124
+ level= sev_threshold= close
125
+ formatter formatter=
126
+ ] # :nodoc:
127
+ LOGGER_METHODS.each do |method|
128
+ class_eval <<~RUBY, __FILE__, __LINE__ + 1
129
+ def #{method}(...)
130
+ dispatch(:#{method}, ...)
131
+ end
132
+ RUBY
133
+ end
134
+
135
+ # Returns the lowest level of all the loggers in the broadcast.
136
+ def level
137
+ @broadcasts.map(&:level).min
138
+ end
139
+
140
+ # True if the log level allows entries with severity +Logger::DEBUG+ to be written
141
+ # to at least one broadcast. False otherwise.
142
+ def debug?
143
+ @broadcasts.any? { |logger| logger.debug? }
144
+ end
145
+
146
+ # Sets the log level to +Logger::DEBUG+ for the whole broadcast.
147
+ def debug!
148
+ dispatch(:debug!)
149
+ end
150
+
151
+ # True if the log level allows entries with severity +Logger::INFO+ to be written
152
+ # to at least one broadcast. False otherwise.
153
+ def info?
154
+ @broadcasts.any? { |logger| logger.info? }
155
+ end
156
+
157
+ # Sets the log level to +Logger::INFO+ for the whole broadcast.
158
+ def info!
159
+ dispatch(:info!)
160
+ end
161
+
162
+ # True if the log level allows entries with severity +Logger::WARN+ to be written
163
+ # to at least one broadcast. False otherwise.
164
+ def warn?
165
+ @broadcasts.any? { |logger| logger.warn? }
166
+ end
167
+
168
+ # Sets the log level to +Logger::WARN+ for the whole broadcast.
169
+ def warn!
170
+ dispatch(:warn!)
171
+ end
172
+
173
+ # True if the log level allows entries with severity +Logger::ERROR+ to be written
174
+ # to at least one broadcast. False otherwise.
175
+ def error?
176
+ @broadcasts.any? { |logger| logger.error? }
177
+ end
178
+
179
+ # Sets the log level to +Logger::ERROR+ for the whole broadcast.
180
+ def error!
181
+ dispatch(:error!)
182
+ end
183
+
184
+ # True if the log level allows entries with severity +Logger::FATAL+ to be written
185
+ # to at least one broadcast. False otherwise.
186
+ def fatal?
187
+ @broadcasts.any? { |logger| logger.fatal? }
188
+ end
189
+
190
+ # Sets the log level to +Logger::FATAL+ for the whole broadcast.
191
+ def fatal!
192
+ dispatch(:fatal!)
193
+ end
194
+
195
+ def initialize_copy(other)
196
+ @broadcasts = []
197
+ @progname = other.progname.dup
198
+
199
+ broadcast_to(*other.broadcasts.map(&:dup))
200
+ end
201
+
202
+ private
203
+
204
+ def dispatch(method, *args, **kwargs, &block)
205
+ if block_given?
206
+ # Maintain semantics that the first logger yields the block
207
+ # as normal, but subsequent loggers won't re-execute the block.
208
+ # Instead, the initial result is immediately returned.
209
+ called, result = false, nil
210
+ block = proc { |*args, **kwargs|
211
+ if called then result
212
+ else
213
+ called = true
214
+ result = yield(*args, **kwargs)
215
+ end
216
+ }
217
+ end
218
+
219
+ @broadcasts.map { |logger|
220
+ logger.send(method, *args, **kwargs, &block)
221
+ }.first
222
+ end
223
+
224
+ def method_missing(name, ...)
225
+ loggers = @broadcasts.select { |logger| logger.respond_to?(name) }
226
+
227
+ if loggers.none?
228
+ super
229
+ elsif loggers.one?
230
+ loggers.first.send(name, ...)
231
+ else
232
+ loggers.map { |logger| logger.send(name, ...) }
233
+ end
234
+ end
235
+
236
+ def respond_to_missing?(method, include_all)
237
+ @broadcasts.any? { |logger| logger.respond_to?(method, include_all) }
238
+ end
239
+ end
240
+ end
data/lib/dumpcar/util.rb CHANGED
@@ -3,7 +3,17 @@ module Dumpcar::Util
3
3
  (Rails.version < "6.1") ? ActiveRecord::Base.connection_config : ActiveRecord::Base.connection_db_config.configuration_hash
4
4
  end
5
5
 
6
+ def self.logger_class
7
+ if Rails.version < "7.1"
8
+ # We only load this if we need it
9
+ require "dumpcar/util/broadcast_logger"
10
+ Dumpcar::Util::BroadcastLogger
11
+ else
12
+ ActiveSupport::BroadcastLogger
13
+ end
14
+ end
15
+
6
16
  def self.logger
7
- Rails.logger
17
+ logger_class.new(Rails.logger, Logger.new($stdout))
8
18
  end
9
19
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dumpcar
4
- VERSION = "0.3.1"
4
+ VERSION = "1.0.1"
5
5
  end
data/package-lock.json CHANGED
@@ -6,14 +6,14 @@
6
6
  "": {
7
7
  "devDependencies": {
8
8
  "husky": "^9.0",
9
- "lint-staged": "^16.1",
10
- "prettier": "^3.6"
9
+ "lint-staged": "^16.3",
10
+ "prettier": "^3.8"
11
11
  }
12
12
  },
13
13
  "node_modules/ansi-escapes": {
14
- "version": "7.0.0",
15
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz",
16
- "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==",
14
+ "version": "7.1.1",
15
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.1.1.tgz",
16
+ "integrity": "sha512-Zhl0ErHcSRUaVfGUeUdDuLgpkEo8KIFjB4Y9uAc46ScOpdDiU1Dbyplh7qWJeJ/ZHpbyMSM26+X3BySgnIz40Q==",
17
17
  "dev": true,
18
18
  "license": "MIT",
19
19
  "dependencies": {
@@ -27,9 +27,9 @@
27
27
  }
28
28
  },
29
29
  "node_modules/ansi-regex": {
30
- "version": "6.1.0",
31
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz",
32
- "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==",
30
+ "version": "6.2.2",
31
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz",
32
+ "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==",
33
33
  "dev": true,
34
34
  "license": "MIT",
35
35
  "engines": {
@@ -40,9 +40,9 @@
40
40
  }
41
41
  },
42
42
  "node_modules/ansi-styles": {
43
- "version": "6.2.1",
44
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
45
- "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
43
+ "version": "6.2.3",
44
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz",
45
+ "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==",
46
46
  "dev": true,
47
47
  "license": "MIT",
48
48
  "engines": {
@@ -65,19 +65,6 @@
65
65
  "node": ">=8"
66
66
  }
67
67
  },
68
- "node_modules/chalk": {
69
- "version": "5.4.1",
70
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.4.1.tgz",
71
- "integrity": "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==",
72
- "dev": true,
73
- "license": "MIT",
74
- "engines": {
75
- "node": "^12.17.0 || ^14.13 || >=16.0.0"
76
- },
77
- "funding": {
78
- "url": "https://github.com/chalk/chalk?sponsor=1"
79
- }
80
- },
81
68
  "node_modules/cli-cursor": {
82
69
  "version": "5.0.0",
83
70
  "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz",
@@ -95,17 +82,17 @@
95
82
  }
96
83
  },
97
84
  "node_modules/cli-truncate": {
98
- "version": "4.0.0",
99
- "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz",
100
- "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==",
85
+ "version": "5.1.1",
86
+ "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-5.1.1.tgz",
87
+ "integrity": "sha512-SroPvNHxUnk+vIW/dOSfNqdy1sPEFkrTk6TUtqLCnBlo3N7TNYYkzzN7uSD6+jVjrdO4+p8nH7JzH6cIvUem6A==",
101
88
  "dev": true,
102
89
  "license": "MIT",
103
90
  "dependencies": {
104
- "slice-ansi": "^5.0.0",
105
- "string-width": "^7.0.0"
91
+ "slice-ansi": "^7.1.0",
92
+ "string-width": "^8.0.0"
106
93
  },
107
94
  "engines": {
108
- "node": ">=18"
95
+ "node": ">=20"
109
96
  },
110
97
  "funding": {
111
98
  "url": "https://github.com/sponsors/sindresorhus"
@@ -119,37 +106,19 @@
119
106
  "license": "MIT"
120
107
  },
121
108
  "node_modules/commander": {
122
- "version": "14.0.0",
123
- "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.0.tgz",
124
- "integrity": "sha512-2uM9rYjPvyq39NwLRqaiLtWHyDC1FvryJDa2ATTVims5YAS4PupsEQsDvP14FqhFr0P49CYDugi59xaxJlTXRA==",
109
+ "version": "14.0.3",
110
+ "resolved": "https://registry.npmjs.org/commander/-/commander-14.0.3.tgz",
111
+ "integrity": "sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==",
125
112
  "dev": true,
126
113
  "license": "MIT",
127
114
  "engines": {
128
115
  "node": ">=20"
129
116
  }
130
117
  },
131
- "node_modules/debug": {
132
- "version": "4.4.1",
133
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
134
- "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
135
- "dev": true,
136
- "license": "MIT",
137
- "dependencies": {
138
- "ms": "^2.1.3"
139
- },
140
- "engines": {
141
- "node": ">=6.0"
142
- },
143
- "peerDependenciesMeta": {
144
- "supports-color": {
145
- "optional": true
146
- }
147
- }
148
- },
149
118
  "node_modules/emoji-regex": {
150
- "version": "10.4.0",
151
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz",
152
- "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==",
119
+ "version": "10.6.0",
120
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz",
121
+ "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==",
153
122
  "dev": true,
154
123
  "license": "MIT"
155
124
  },
@@ -187,9 +156,9 @@
187
156
  }
188
157
  },
189
158
  "node_modules/get-east-asian-width": {
190
- "version": "1.3.0",
191
- "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz",
192
- "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==",
159
+ "version": "1.4.0",
160
+ "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz",
161
+ "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==",
193
162
  "dev": true,
194
163
  "license": "MIT",
195
164
  "engines": {
@@ -216,13 +185,16 @@
216
185
  }
217
186
  },
218
187
  "node_modules/is-fullwidth-code-point": {
219
- "version": "4.0.0",
220
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz",
221
- "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==",
188
+ "version": "5.1.0",
189
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.1.0.tgz",
190
+ "integrity": "sha512-5XHYaSyiqADb4RnZ1Bdad6cPp8Toise4TzEjcOYDHZkTCbKgiUl7WTUCpNWHuxmDt91wnsZBc9xinNzopv3JMQ==",
222
191
  "dev": true,
223
192
  "license": "MIT",
193
+ "dependencies": {
194
+ "get-east-asian-width": "^1.3.1"
195
+ },
224
196
  "engines": {
225
- "node": ">=12"
197
+ "node": ">=18"
226
198
  },
227
199
  "funding": {
228
200
  "url": "https://github.com/sponsors/sindresorhus"
@@ -238,36 +210,19 @@
238
210
  "node": ">=0.12.0"
239
211
  }
240
212
  },
241
- "node_modules/lilconfig": {
242
- "version": "3.1.3",
243
- "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz",
244
- "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==",
245
- "dev": true,
246
- "license": "MIT",
247
- "engines": {
248
- "node": ">=14"
249
- },
250
- "funding": {
251
- "url": "https://github.com/sponsors/antonk52"
252
- }
253
- },
254
213
  "node_modules/lint-staged": {
255
- "version": "16.1.2",
256
- "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.1.2.tgz",
257
- "integrity": "sha512-sQKw2Si2g9KUZNY3XNvRuDq4UJqpHwF0/FQzZR2M7I5MvtpWvibikCjUVJzZdGE0ByurEl3KQNvsGetd1ty1/Q==",
214
+ "version": "16.3.1",
215
+ "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-16.3.1.tgz",
216
+ "integrity": "sha512-bqvvquXzFBAlSbluugR4KXAe4XnO/QZcKVszpkBtqLWa2KEiVy8n6Xp38OeUbv/gOJOX4Vo9u5pFt/ADvbm42Q==",
258
217
  "dev": true,
259
218
  "license": "MIT",
260
219
  "dependencies": {
261
- "chalk": "^5.4.1",
262
- "commander": "^14.0.0",
263
- "debug": "^4.4.1",
264
- "lilconfig": "^3.1.3",
265
- "listr2": "^8.3.3",
220
+ "commander": "^14.0.3",
221
+ "listr2": "^9.0.5",
266
222
  "micromatch": "^4.0.8",
267
- "nano-spawn": "^1.0.2",
268
- "pidtree": "^0.6.0",
269
223
  "string-argv": "^0.3.2",
270
- "yaml": "^2.8.0"
224
+ "tinyexec": "^1.0.2",
225
+ "yaml": "^2.8.2"
271
226
  },
272
227
  "bin": {
273
228
  "lint-staged": "bin/lint-staged.js"
@@ -280,13 +235,13 @@
280
235
  }
281
236
  },
282
237
  "node_modules/listr2": {
283
- "version": "8.3.3",
284
- "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.3.3.tgz",
285
- "integrity": "sha512-LWzX2KsqcB1wqQ4AHgYb4RsDXauQiqhjLk+6hjbaeHG4zpjjVAB6wC/gz6X0l+Du1cN3pUB5ZlrvTbhGSNnUQQ==",
238
+ "version": "9.0.5",
239
+ "resolved": "https://registry.npmjs.org/listr2/-/listr2-9.0.5.tgz",
240
+ "integrity": "sha512-ME4Fb83LgEgwNw96RKNvKV4VTLuXfoKudAmm2lP8Kk87KaMK0/Xrx/aAkMWmT8mDb+3MlFDspfbCs7adjRxA2g==",
286
241
  "dev": true,
287
242
  "license": "MIT",
288
243
  "dependencies": {
289
- "cli-truncate": "^4.0.0",
244
+ "cli-truncate": "^5.0.0",
290
245
  "colorette": "^2.0.20",
291
246
  "eventemitter3": "^5.0.1",
292
247
  "log-update": "^6.1.0",
@@ -294,7 +249,7 @@
294
249
  "wrap-ansi": "^9.0.0"
295
250
  },
296
251
  "engines": {
297
- "node": ">=18.0.0"
252
+ "node": ">=20.0.0"
298
253
  }
299
254
  },
300
255
  "node_modules/log-update": {
@@ -317,39 +272,6 @@
317
272
  "url": "https://github.com/sponsors/sindresorhus"
318
273
  }
319
274
  },
320
- "node_modules/log-update/node_modules/is-fullwidth-code-point": {
321
- "version": "5.0.0",
322
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz",
323
- "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==",
324
- "dev": true,
325
- "license": "MIT",
326
- "dependencies": {
327
- "get-east-asian-width": "^1.0.0"
328
- },
329
- "engines": {
330
- "node": ">=18"
331
- },
332
- "funding": {
333
- "url": "https://github.com/sponsors/sindresorhus"
334
- }
335
- },
336
- "node_modules/log-update/node_modules/slice-ansi": {
337
- "version": "7.1.0",
338
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz",
339
- "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==",
340
- "dev": true,
341
- "license": "MIT",
342
- "dependencies": {
343
- "ansi-styles": "^6.2.1",
344
- "is-fullwidth-code-point": "^5.0.0"
345
- },
346
- "engines": {
347
- "node": ">=18"
348
- },
349
- "funding": {
350
- "url": "https://github.com/chalk/slice-ansi?sponsor=1"
351
- }
352
- },
353
275
  "node_modules/micromatch": {
354
276
  "version": "4.0.8",
355
277
  "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
@@ -377,26 +299,6 @@
377
299
  "url": "https://github.com/sponsors/sindresorhus"
378
300
  }
379
301
  },
380
- "node_modules/ms": {
381
- "version": "2.1.3",
382
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
383
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
384
- "dev": true,
385
- "license": "MIT"
386
- },
387
- "node_modules/nano-spawn": {
388
- "version": "1.0.2",
389
- "resolved": "https://registry.npmjs.org/nano-spawn/-/nano-spawn-1.0.2.tgz",
390
- "integrity": "sha512-21t+ozMQDAL/UGgQVBbZ/xXvNO10++ZPuTmKRO8k9V3AClVRht49ahtDjfY8l1q6nSHOrE5ASfthzH3ol6R/hg==",
391
- "dev": true,
392
- "license": "MIT",
393
- "engines": {
394
- "node": ">=20.17"
395
- },
396
- "funding": {
397
- "url": "https://github.com/sindresorhus/nano-spawn?sponsor=1"
398
- }
399
- },
400
302
  "node_modules/onetime": {
401
303
  "version": "7.0.0",
402
304
  "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz",
@@ -426,23 +328,10 @@
426
328
  "url": "https://github.com/sponsors/jonschlinkert"
427
329
  }
428
330
  },
429
- "node_modules/pidtree": {
430
- "version": "0.6.0",
431
- "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz",
432
- "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==",
433
- "dev": true,
434
- "license": "MIT",
435
- "bin": {
436
- "pidtree": "bin/pidtree.js"
437
- },
438
- "engines": {
439
- "node": ">=0.10"
440
- }
441
- },
442
331
  "node_modules/prettier": {
443
- "version": "3.6.0",
444
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.0.tgz",
445
- "integrity": "sha512-ujSB9uXHJKzM/2GBuE0hBOUgC77CN3Bnpqa+g80bkv3T3A93wL/xlzDATHhnhkzifz/UE2SNOvmbTz5hSkDlHw==",
332
+ "version": "3.8.1",
333
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.1.tgz",
334
+ "integrity": "sha512-UOnG6LftzbdaHZcKoPFtOcCKztrQ57WkHDeRD9t/PTQtmT0NHSeWWepj6pS0z/N7+08BHFDQVUrfmfMRcZwbMg==",
446
335
  "dev": true,
447
336
  "license": "MIT",
448
337
  "bin": {
@@ -493,17 +382,17 @@
493
382
  }
494
383
  },
495
384
  "node_modules/slice-ansi": {
496
- "version": "5.0.0",
497
- "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz",
498
- "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==",
385
+ "version": "7.1.2",
386
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.2.tgz",
387
+ "integrity": "sha512-iOBWFgUX7caIZiuutICxVgX1SdxwAVFFKwt1EvMYYec/NWO5meOJ6K5uQxhrYBdQJne4KxiqZc+KptFOWFSI9w==",
499
388
  "dev": true,
500
389
  "license": "MIT",
501
390
  "dependencies": {
502
- "ansi-styles": "^6.0.0",
503
- "is-fullwidth-code-point": "^4.0.0"
391
+ "ansi-styles": "^6.2.1",
392
+ "is-fullwidth-code-point": "^5.0.0"
504
393
  },
505
394
  "engines": {
506
- "node": ">=12"
395
+ "node": ">=18"
507
396
  },
508
397
  "funding": {
509
398
  "url": "https://github.com/chalk/slice-ansi?sponsor=1"
@@ -520,27 +409,26 @@
520
409
  }
521
410
  },
522
411
  "node_modules/string-width": {
523
- "version": "7.2.0",
524
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
525
- "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
412
+ "version": "8.1.0",
413
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.1.0.tgz",
414
+ "integrity": "sha512-Kxl3KJGb/gxkaUMOjRsQ8IrXiGW75O4E3RPjFIINOVH8AMl2SQ/yWdTzWwF3FevIX9LcMAjJW+GRwAlAbTSXdg==",
526
415
  "dev": true,
527
416
  "license": "MIT",
528
417
  "dependencies": {
529
- "emoji-regex": "^10.3.0",
530
- "get-east-asian-width": "^1.0.0",
418
+ "get-east-asian-width": "^1.3.0",
531
419
  "strip-ansi": "^7.1.0"
532
420
  },
533
421
  "engines": {
534
- "node": ">=18"
422
+ "node": ">=20"
535
423
  },
536
424
  "funding": {
537
425
  "url": "https://github.com/sponsors/sindresorhus"
538
426
  }
539
427
  },
540
428
  "node_modules/strip-ansi": {
541
- "version": "7.1.0",
542
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
543
- "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
429
+ "version": "7.1.2",
430
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz",
431
+ "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==",
544
432
  "dev": true,
545
433
  "license": "MIT",
546
434
  "dependencies": {
@@ -553,6 +441,16 @@
553
441
  "url": "https://github.com/chalk/strip-ansi?sponsor=1"
554
442
  }
555
443
  },
444
+ "node_modules/tinyexec": {
445
+ "version": "1.0.2",
446
+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz",
447
+ "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==",
448
+ "dev": true,
449
+ "license": "MIT",
450
+ "engines": {
451
+ "node": ">=18"
452
+ }
453
+ },
556
454
  "node_modules/to-regex-range": {
557
455
  "version": "5.0.1",
558
456
  "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@@ -567,9 +465,9 @@
567
465
  }
568
466
  },
569
467
  "node_modules/wrap-ansi": {
570
- "version": "9.0.0",
571
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz",
572
- "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==",
468
+ "version": "9.0.2",
469
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz",
470
+ "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==",
573
471
  "dev": true,
574
472
  "license": "MIT",
575
473
  "dependencies": {
@@ -584,10 +482,28 @@
584
482
  "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
585
483
  }
586
484
  },
485
+ "node_modules/wrap-ansi/node_modules/string-width": {
486
+ "version": "7.2.0",
487
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz",
488
+ "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==",
489
+ "dev": true,
490
+ "license": "MIT",
491
+ "dependencies": {
492
+ "emoji-regex": "^10.3.0",
493
+ "get-east-asian-width": "^1.0.0",
494
+ "strip-ansi": "^7.1.0"
495
+ },
496
+ "engines": {
497
+ "node": ">=18"
498
+ },
499
+ "funding": {
500
+ "url": "https://github.com/sponsors/sindresorhus"
501
+ }
502
+ },
587
503
  "node_modules/yaml": {
588
- "version": "2.8.0",
589
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.0.tgz",
590
- "integrity": "sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==",
504
+ "version": "2.8.2",
505
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.2.tgz",
506
+ "integrity": "sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==",
591
507
  "dev": true,
592
508
  "license": "ISC",
593
509
  "bin": {
@@ -595,6 +511,9 @@
595
511
  },
596
512
  "engines": {
597
513
  "node": ">= 14.6"
514
+ },
515
+ "funding": {
516
+ "url": "https://github.com/sponsors/eemeli"
598
517
  }
599
518
  }
600
519
  }
data/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "devDependencies": {
3
3
  "husky": "^9.0",
4
- "lint-staged": "^16.1",
5
- "prettier": "^3.6"
4
+ "lint-staged": "^16.3",
5
+ "prettier": "^3.8"
6
6
  },
7
7
  "scripts": {
8
8
  "prepare": "husky"
9
9
  },
10
10
  "lint-staged": {
11
- "*.{js,css,md,yml}": "prettier --write",
12
- "*.{rb,rake,gemspec,ru}": "bin/standardrb --fix",
11
+ "*.{css,js,json,md,yaml,yml}": "prettier --write",
12
+ "*.{gemspec,rake,rb,ru}": "bin/standardrb --fix",
13
13
  "{Gemfile,Rakefile}": "bin/standardrb --fix"
14
14
  }
15
15
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumpcar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Schultz
@@ -54,6 +54,7 @@ files:
54
54
  - Appraisals
55
55
  - CHANGELOG.md
56
56
  - CODE_OF_CONDUCT.md
57
+ - CONTRIBUTING.md
57
58
  - GPL-3.0.txt
58
59
  - LGPL-3.0.txt
59
60
  - LICENSE
@@ -68,6 +69,7 @@ files:
68
69
  - gemfiles/rails_7.1.gemfile
69
70
  - gemfiles/rails_7.2.gemfile
70
71
  - gemfiles/rails_8.0.gemfile
72
+ - gemfiles/rails_8.1.gemfile
71
73
  - gemfiles/rails_edge.gemfile
72
74
  - lib/dumpcar.rb
73
75
  - lib/dumpcar/generators/dumpcar_generator.rb
@@ -76,16 +78,17 @@ files:
76
78
  - lib/dumpcar/pg.rb
77
79
  - lib/dumpcar/railtie.rb
78
80
  - lib/dumpcar/util.rb
81
+ - lib/dumpcar/util/broadcast_logger.rb
79
82
  - lib/dumpcar/version.rb
80
83
  - lib/rails/commands/dumpcar_command.rb
81
84
  - package-lock.json
82
85
  - package.json
83
- homepage: https://github.com/wwahammy/dumpcar
86
+ homepage: https://github.com/peevrb/dumpcar
84
87
  licenses:
85
88
  - LGPL-3.0-or-later
86
89
  metadata:
87
- homepage_uri: https://github.com/wwahammy/dumpcar
88
- source_code_uri: https://github.com/wwahammy/dumpcar
90
+ homepage_uri: https://github.com/peevrb/dumpcar
91
+ source_code_uri: https://github.com/peevrb/dumpcar
89
92
  rdoc_options: []
90
93
  require_paths:
91
94
  - lib
@@ -100,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
103
  - !ruby/object:Gem::Version
101
104
  version: '0'
102
105
  requirements: []
103
- rubygems_version: 3.6.7
106
+ rubygems_version: 4.0.6
104
107
  specification_version: 4
105
108
  summary: Commands for dumping and restoring Rails PostgreSQL database contents
106
109
  test_files: []