model_discovery 0.2.2 → 0.2.3
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 +2 -2
- 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: df95503cbb6cea6033ff2bbbcec84dfb3331ff8e
|
4
|
+
data.tar.gz: fbd70a9e3bb605470f1faaac554fa736a581b3be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bc164f9db2c077b1223832417a93bbba3b45ebba1de0fa4c5bd43d25c547c515c4737aa5708dc775ff4103bd0cffde77220e91081f629c7e21a198688fa31be
|
7
|
+
data.tar.gz: e45bf15ed756faee217656231fd7370656df1be2a3ea6ff076d3c916ec4f92ebb678ac0b17020898d39fb22c8f9bf609ccbee93b22ae41fe00fceb3df01782e6
|
@@ -7,7 +7,7 @@ module ModelDiscovery
|
|
7
7
|
all_gems.each do |gem|
|
8
8
|
if gem.groups.include? Rails.env.to_sym or gem.groups.include? :default
|
9
9
|
puts "Gem name: #{gem.name}"
|
10
|
-
spec = Gem::Specification.
|
10
|
+
spec = Gem::Specification.find_by(name: gem.name)
|
11
11
|
discover spec.gem_dir
|
12
12
|
end
|
13
13
|
end
|
@@ -17,7 +17,7 @@ module ModelDiscovery
|
|
17
17
|
|
18
18
|
# Create a content type entry for all Models
|
19
19
|
ActiveRecord::Base.subclasses.each do |model|
|
20
|
-
ApplicationModels.
|
20
|
+
ApplicationModels.find_or_create_by(model: model.to_s)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
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.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sameer Rahmani
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|