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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a979022e1dc25fa3a291046f2740f298d841964
4
- data.tar.gz: d26220e83e7b162126a8e80298609950bc8997fd
3
+ metadata.gz: 122edc790888e52ab7074998156ef8042bd09a81
4
+ data.tar.gz: 586a3963d2e71993d2a2ad20278a2c69aee5fd5b
5
5
  SHA512:
6
- metadata.gz: 9b942b853e9b412acf05208360f1fa8bbbf4a0b6ba7d0f480cd1d4ab9f141cdc850f7d085538ff9af15158745b692051af76810c4fbefac1f1016667d2301fcc
7
- data.tar.gz: 7655f959d6dd0e993427b717c482557053b9f4ccb4533d7f3de7ce5c950c0f9042516b0a28aeb7e9fee204bb4dcdb366b7295c280caebac52e61d1af1e41f3c8
6
+ metadata.gz: 17aa748048234c6385349232ff6033d569399771ec213317820976b0a5c4098ad9dd93643e0063e414524e73a11e716271c0ac3d9943b1b49ea6ef9348e5423c
7
+ data.tar.gz: 291f6b0ba14e2d7b31ff35c57a27cb8004271def578a80d4f1f8fd6fb9a6a76e80172afe79e01ec195d24aaff441f3249c9a424983bd5a268a9eb13593baf226
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Toy
2
2
  module Dynamo
3
- VERSION = "0.1.6"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toy-dynamo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cary Dunn