toy-dynamo 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/toy/dynamo/tasks.rb +3 -1
- data/lib/toy/dynamo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 122edc790888e52ab7074998156ef8042bd09a81
|
4
|
+
data.tar.gz: 586a3963d2e71993d2a2ad20278a2c69aee5fd5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17aa748048234c6385349232ff6033d569399771ec213317820976b0a5c4098ad9dd93643e0063e414524e73a11e716271c0ac3d9943b1b49ea6ef9348e5423c
|
7
|
+
data.tar.gz: 291f6b0ba14e2d7b31ff35c57a27cb8004271def578a80d4f1f8fd6fb9a6a76e80172afe79e01ec195d24aaff441f3249c9a424983bd5a268a9eb13593baf226
|
data/lib/toy/dynamo/tasks.rb
CHANGED
@@ -11,12 +11,14 @@ module Toy
|
|
11
11
|
Dir.glob(File.join("#{dir}/**/*.rb")).each do |path|
|
12
12
|
model_filename = path[/#{Regexp.escape(dir.to_s)}\/([^\.]+).rb/, 1]
|
13
13
|
next if model_filename.match(/^concerns\//i) # Skip concerns/ folder
|
14
|
-
klass = model_filename.camelize.constantize
|
15
14
|
|
16
15
|
begin
|
17
16
|
klass = model_filename.camelize.constantize
|
18
17
|
rescue NameError
|
19
18
|
require(path) ? retry : raise
|
19
|
+
rescue LoadError => e
|
20
|
+
# Try non-namespaced class name instead...
|
21
|
+
klass = model_filename.camelize.split("::").last.constantize
|
20
22
|
end
|
21
23
|
|
22
24
|
# Skip if the class doesn't have Toy::Dynamo integration
|
data/lib/toy/dynamo/version.rb
CHANGED