yaml_b_sides 0.5.2 → 0.5.3

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: d7b6fdad3ccba61022d67aacc39ec787bd2970ef
4
- data.tar.gz: f1e0f08bbb4bcb87eac4acc4149ff10008f75cdc
3
+ metadata.gz: 9922c18031ff17165443f6fa85b92e2e6a86c7b2
4
+ data.tar.gz: 30ddcec8a0ebed9db1ce2058bb323a1efb742e69
5
5
  SHA512:
6
- metadata.gz: e86bbc1e686c76f1fc7bddeb97306397a31e921330a25fde7f15a98911406a195fa6f4563192ff38fe58ca3dbee1382835b1efab236eb04c1a18dbea1f65453d
7
- data.tar.gz: e1dede7bad70c5ef093785560f34390740a6dc0a6e715c2546f493d00dfa149ef342034c77d7b1de4a702055164aa843453dab3a78307e71e427c7e416d7e287
6
+ metadata.gz: 136c06907be7c51076e1764d6833725a9d55aa6d8e86102dc43008575071ab8a5d1c48891165faf468eadff9ddd29841845fde8494890c32fe150f8f5e322e71
7
+ data.tar.gz: 32a19c77b4473cb48f5c4c795ab24d1110b60b46d33543d01551705ef33b02192fc637477e4f90859f3014101e8098ac10341bbf090c107ac00116bacc1621cc
@@ -36,15 +36,19 @@ module YamlBSides
36
36
  end
37
37
 
38
38
  def methodize( association )
39
- define_method association.name do
40
- self._cached_associations ||= {}
41
-
42
- unless self._cached_associations.has_key? association.name
43
- result = association.klass( self ).send( association.action, association.query( self ) )
44
-
45
- self._cached_associations[association.name] = result
39
+ define_method association.name do
40
+ begin
41
+ self._cached_associations ||= {}
42
+
43
+ unless self._cached_associations.has_key? association.name
44
+ result = association.klass( self ).send( association.action, association.query( self ) )
45
+
46
+ self._cached_associations[association.name] = result
47
+ end
48
+ self._cached_associations[association.name]
49
+ rescue YamlBSides::Errors::RecordNotFound => e
50
+ nil
46
51
  end
47
- self._cached_associations[association.name]
48
52
  end
49
53
  end
50
54
  end
@@ -1,3 +1,3 @@
1
1
  module YamlBSides
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaml_b_sides
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Orlov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-30 00:00:00.000000000 Z
11
+ date: 2016-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport