once-ler 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/onceler/recordable.rb +18 -14
- data/lib/onceler/transactions/active_record_4.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a4b8b2e50e9181b9287f8e867f79fd42a2bab8b
|
4
|
+
data.tar.gz: a429cc3bf13a874bad255998e5c96f24e9842275
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a34ee33c59b9a26ba33e66083b26b4c05fe9ab27d47283986912a6f91c943076d2a8948296cfe00c18e98f5e8ce94abbb61ee6a5d39e52eca0a94bb05cd9762
|
7
|
+
data.tar.gz: aed0e70f32d122b7f47b363e6c242d15a72da8814555be1aa137696e8f8534369d5b076cf3aca6f3261df927d6fecfdbaa7cd7d8b27e1041898f0b1217a4e2c9
|
data/lib/onceler/recordable.rb
CHANGED
@@ -114,22 +114,26 @@ module Onceler
|
|
114
114
|
# see if anything inside val can't be dumped...
|
115
115
|
sub_prefix = "#{prefix}#{key} (#<#{val.class}>) => "
|
116
116
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
117
|
+
if val.respond_to?(:marshal_dump)
|
118
|
+
find_dump_error("marshal_dump", val.marshal_dump, sub_prefix)
|
119
|
+
else
|
120
|
+
# instance var?
|
121
|
+
val.instance_variables.each do |k|
|
122
|
+
v = val.instance_variable_get(k)
|
123
|
+
find_dump_error(k, v, sub_prefix)
|
124
|
+
end
|
122
125
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
126
|
+
# hash key/value?
|
127
|
+
val.each_pair do |k, v|
|
128
|
+
find_dump_error("hash key #{k}", k, sub_prefix)
|
129
|
+
find_dump_error("[#{k.inspect}]", v, sub_prefix)
|
130
|
+
end if val.respond_to?(:each_pair)
|
128
131
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
132
|
+
# array element?
|
133
|
+
val.each_with_index do |v, i|
|
134
|
+
find_dump_error("[#{i}]", v, sub_prefix)
|
135
|
+
end if val.respond_to?(:each_with_index)
|
136
|
+
end
|
133
137
|
|
134
138
|
# guess it's val proper
|
135
139
|
raise TypeError.new("Unable to dump #{prefix}#{key} (#<#{val.class}>) in #{self.class.metadata[:location]}: #{$!}")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: once-ler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jon Jensen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
version: 1.3.5
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.6.10
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: rspec supercharger
|