coactive 0.5.2 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 947921155ded7f486743447e61abf8274b0d4cbc174e7f7f3d394e3b9ce11f65
4
- data.tar.gz: 00625fcccb57c5643e3f0580c3dd94a2159ddcdc5accde3e81f87fdbaf0efd36
3
+ metadata.gz: 5b2186eb009706efc78c119a4554716a6842c96bdd6357bb8271763b4206a1fc
4
+ data.tar.gz: aa0bfb0d3bc0482a244d09da36ae744d3030db83eb22abe6940c3a0a76b8fcff
5
5
  SHA512:
6
- metadata.gz: 629ce46d9b1817a04e1c74a7d20d7764ec89ba7e1930f937b4495d60c0eaa96e1c98b752b29f863860a4440ef53edecaeaf706b88b81d1409a79f0381491fe3d
7
- data.tar.gz: 9f116e4e9cb323fc79d3db488619364dddebd2064d75d1652a9032a587fbc9bdf404a932f8fac14f58b725d473a61a00d0f4d7196f7daa8b6e9fad0bbe73c760
6
+ metadata.gz: 907a081b60b6017582eb375af8fde8967cf566830fc19bff364d4fc4f89ed87b6d58af22ecc0a2cebd23f46e9bd9de2751bb5e2de24bad25d352141ee324e511
7
+ data.tar.gz: c235b1a6c1fa68fab47150d583aa55c3aa1e2917a2a453c4e0696a62d64d155548319d03e38a42a3e04cec1bcf555cd6515cff91c2f888cf75886ec325ceeb26
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.6.0
4
+
5
+ * Fix order of autoloading in development mode.
6
+
3
7
  ## 0.5.2
4
8
 
5
9
  * Add `frozen_string_literal: true`.
@@ -21,15 +21,25 @@ module Coactive
21
21
  private
22
22
 
23
23
  def load(path)
24
- rails_engines.each do |engine|
25
- Dir["#{engine.root}/#{path}/**/*.rb"].each do |file|
26
- require_dependency file
24
+ autoload_paths.each do |autoload_path|
25
+ if autoload_path.end_with?("/#{path}")
26
+ if Rails.respond_to?(:autoloaders)
27
+ Rails.autoloaders.main.eager_load_dir(autoload_path)
28
+ else
29
+ eager_load_dir(autoload_path)
30
+ end
27
31
  end
28
32
  end
29
33
  end
30
34
 
31
- def rails_engines
32
- [Rails] + Rails::Engine.subclasses.map(&:instance)
35
+ def eager_load_dir(autoload_path)
36
+ Dir["#{autoload_path}/**/*.rb"].each do |file|
37
+ require_dependency(file)
38
+ end
39
+ end
40
+
41
+ def autoload_paths
42
+ ActiveSupport::Dependencies.autoload_paths
33
43
  end
34
44
  end
35
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coactive
4
- VERSION = '0.5.2'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coactive
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshikazu Kaneta
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-23 00:00:00.000000000 Z
11
+ date: 2024-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport