coaster 1.4.25 → 1.4.27

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: 334fabecc9ae88648f053e632d2cf14ab89392ef72452cc3663c52577cd4638d
4
- data.tar.gz: fd819e22b3be08a926e682865926801562ec80d6f0ecbaf5dc12dcaaf790083e
3
+ metadata.gz: 699b48f34e6fe0f6e074df56c65e5cd18d5ca595cfe596ba7ff492831bb190ae
4
+ data.tar.gz: 861070c41dbce9001c50643d524865c2649096b5c055a92622deb5bef0e9829e
5
5
  SHA512:
6
- metadata.gz: f5ed501bfb5a0f40f9c2c5acc074780132a4520be5f2a090678c9d7b1be630a23ee3fda29ec882ac8fdbaa3e96c33b4dfeeca205715feb7116cdfdb62b94eb97
7
- data.tar.gz: 41f07e2a41c089aaa70358f53934cd56d257158f8cfb3b8713ca6e5cfdc36982a09ce8c9ec6423d02e9dbd7162509586e4566e93edfe47efa07dc9a6557bbddc
6
+ metadata.gz: 2c347b8f321edd084f688773876ffdd4c0eca9f2b5cd9e9ab9d8d8121bafb7a81a5ce794d4c8fb4b157306072064d388c7bac6e1d811537164488e182ed5030a
7
+ data.tar.gz: c5a7550f1c3f34dd257e83e4a546006896eac6d9890cb92250b25dc6b07451b86b54bca4e279493391406323a587db093e6c37f96a23af9e910ccd1e0cb1243d
@@ -14,7 +14,7 @@ def require_more
14
14
  more_load_paths.each do |load_path|
15
15
  path = File.join(load_path, load_name)
16
16
  if File.exist?(path)
17
- return require_dependency path
17
+ return require path
18
18
  end
19
19
  end
20
20
 
@@ -0,0 +1,24 @@
1
+ def require_more
2
+ required_file_path = caller[0].split(':', 2).first
3
+ load_name = nil
4
+ load_path_index = $LOAD_PATH.each_with_index do |load_path, ix|
5
+ scanned = required_file_path.scan(/(#{load_path})#{File::SEPARATOR}(.*)/).first
6
+ next false unless scanned
7
+ load_name = scanned[1]
8
+ break ix
9
+ end
10
+
11
+ return false unless load_path_index
12
+
13
+ more_load_paths = $LOAD_PATH.drop(load_path_index + 1)
14
+ more_load_paths.each do |load_path|
15
+ path = File.join(load_path, load_name)
16
+ if File.exist?(path)
17
+ loaded = require(path)
18
+ loaded = load(path) unless loaded
19
+ return loaded
20
+ end
21
+ end
22
+
23
+ raise LoadError, "cannot require more -- #{load_name}"
24
+ end
@@ -229,6 +229,7 @@ class StandardError
229
229
  end
230
230
 
231
231
  def to_inspection_hash(options: {}, _h: {}.with_indifferent_access, _depth: 0)
232
+ backtrace_key = options[:backtrace_key] || :backtrace
232
233
  _h.merge!(
233
234
  type: self.class.name, status: status,
234
235
  http_status: http_status, message: message,
@@ -250,12 +251,12 @@ class StandardError
250
251
  if backtrace.present?
251
252
  if respond_to?(:cleaned_backtrace)
252
253
  if (bt = cleaned_backtrace(options))
253
- _h[:backtrace] = bt
254
+ _h[backtrace_key] = bt
254
255
  else
255
- _h[:backtrace] = backtrace[0...ActiveSupport::BacktraceCleaner.minimum_first]
256
+ _h[backtrace_key] = backtrace[0...ActiveSupport::BacktraceCleaner.minimum_first]
256
257
  end
257
258
  else
258
- _h[:backtrace] = backtrace[0...ActiveSupport::BacktraceCleaner.minimum_first]
259
+ _h[backtrace_key] = backtrace[0...ActiveSupport::BacktraceCleaner.minimum_first]
259
260
  end
260
261
  end
261
262
  if cause
@@ -267,7 +268,7 @@ class StandardError
267
268
  type: self.class.name, status: status,
268
269
  http_status: http_status, message: message,
269
270
  }
270
- cause_h.merge!(backtrace: cause.backtrace[0...ActiveSupport::BacktraceCleaner.minimum_first])
271
+ cause_h.merge!(backtrace_key => cause.backtrace[0...ActiveSupport::BacktraceCleaner.minimum_first])
271
272
  _h[:cause] = cause_h
272
273
  end
273
274
  else
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.4.25'
2
+ VERSION = '1.4.27'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.25
4
+ version: 1.4.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-12 00:00:00.000000000 Z
11
+ date: 2025-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -197,6 +197,7 @@ files:
197
197
  - lib/coaster/core_ext/month.rb
198
198
  - lib/coaster/core_ext/object_translation.rb
199
199
  - lib/coaster/core_ext/require_more.rb
200
+ - lib/coaster/core_ext/require_more_reload.rb
200
201
  - lib/coaster/core_ext/standard_error.rb
201
202
  - lib/coaster/core_ext/standard_error/raven.rb
202
203
  - lib/coaster/core_ext/standard_error/sentry.rb