coaster 1.4.26 → 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: 35880fd3cb20083666bfc284028e1c8dbc5e2cae46e557eb30a8fea2a4674883
4
- data.tar.gz: e45639dcc455ea1b35ea7f530e293be7bacb15573f17e1b96c05d1bd8ce97ec9
3
+ metadata.gz: 699b48f34e6fe0f6e074df56c65e5cd18d5ca595cfe596ba7ff492831bb190ae
4
+ data.tar.gz: 861070c41dbce9001c50643d524865c2649096b5c055a92622deb5bef0e9829e
5
5
  SHA512:
6
- metadata.gz: 52cb285e0cb2021c59e02b1700737e50acd5110c22c48a3c582bfaf724b114ebbcabca25836861059f24942af1de8823aee04a70cf46c1f72bc86c74dcba849e
7
- data.tar.gz: b98327de788ce0c184f4977b52dc3e9196189a61308f9a17f8562d6d766697f990b6fc51987c3b6cab1eedbbe6d1872a21b197d80f69adcdc9f77812c3d521e7
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
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.4.26'
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.26
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-19 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