model_discovery 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/model_discovery/discovery.rb +4 -4
- data/lib/model_discovery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c946205ceb323812d6c33ae21bc7b8014a021df4
|
4
|
+
data.tar.gz: ff7b1104f20dc3d4cb93e6ebc47afe36ba33624e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66be4d3ead6ee6f7a1e126dd173fa8db49ab750bd0bf53d0458c33e7498e06841022d45494b923ab3b24ef8a4ce0c49eb8c5e5b2ffcdbf71812e0528dc161d13
|
7
|
+
data.tar.gz: 694d75689eded073cbaf7dca2bbe7219e362b1c9c3a93f73adf773e01489552f99e530fb9e378ba7b803826e0bdc6e4a907efdd06b7cc0046ada08a4b3518318
|
@@ -8,9 +8,9 @@ module ModelDiscovery
|
|
8
8
|
# Discover all model files in gem files and load them
|
9
9
|
all_gems.each do |gem|
|
10
10
|
if gem.groups.include? Rails.env.to_sym or gem.groups.include? :default
|
11
|
-
puts "Gem name: #{gem.name}"
|
12
|
-
spec = Gem::Specification.
|
13
|
-
discover spec.gem_dir
|
11
|
+
puts "Gem name: \t#{gem.name}"
|
12
|
+
spec = Gem::Specification.find_all_by_name gem.name
|
13
|
+
discover spec.first.gem_dir
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -43,7 +43,7 @@ module ModelDiscovery
|
|
43
43
|
|
44
44
|
def self.discover(path)
|
45
45
|
Dir["#{path}/app/models/**/*.rb"].each do |model_file|
|
46
|
-
puts "File matched: #{model_file}"
|
46
|
+
puts "File matched: \t#{model_file}"
|
47
47
|
begin
|
48
48
|
load model_file
|
49
49
|
rescue ActiveSupport::Concern::MultipleIncludedBlocks => e
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: model_discovery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|