restforce-db 2.1.5 → 2.1.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f345da89828f81e0461a71a5e552ead233095c5b
|
4
|
+
data.tar.gz: 8f4d3d95e22cb4f56eadef22022bd8878c4db60b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04321dac381dc1ca4f06a2b625c5f317426422ee8d94fa89382e2a6a76ee07550d3c2ed041464998c72a09f3e9bea7f2e683b13c2c911f3d5bec039f0f6d93d5
|
7
|
+
data.tar.gz: 96db605dd20e59b25ba5dd2a7725ef26dc7f1a4e3e24de7d030dfa012d3f68c2da39bb8958e7a305124f949273390fb2a85934e07c0c2312bc3636ff70f8244b
|
@@ -74,7 +74,7 @@ module Restforce
|
|
74
74
|
database_record.save!
|
75
75
|
end
|
76
76
|
rescue ActiveRecord::ActiveRecordError, Faraday::Error::ClientError => e
|
77
|
-
DB.logger.error(
|
77
|
+
DB.logger.error(e)
|
78
78
|
end
|
79
79
|
|
80
80
|
# Internal: Get a Hash of associated lookup IDs for the passed database
|
data/lib/restforce/db/command.rb
CHANGED
@@ -118,8 +118,21 @@ module Restforce
|
|
118
118
|
# Returns a Logger.
|
119
119
|
def logger
|
120
120
|
@logger ||= Logger.new(@options[:logfile]).tap do |logger|
|
121
|
-
logger.formatter = proc do |severity, datetime, _progname,
|
122
|
-
|
121
|
+
logger.formatter = proc do |severity, datetime, _progname, message|
|
122
|
+
# Implementation taken from Ruby's msg2str.
|
123
|
+
# See: http://apidock.com/ruby/Logger/Formatter/msg2str
|
124
|
+
formatted =
|
125
|
+
case message
|
126
|
+
when ::String
|
127
|
+
message
|
128
|
+
when ::Exception
|
129
|
+
backtrace = message.backtrace || []
|
130
|
+
"#{message.message} (#{message.class})\n#{backtrace.join("\n")}"
|
131
|
+
else
|
132
|
+
message.inspect
|
133
|
+
end
|
134
|
+
|
135
|
+
"#{severity} [#{datetime.strftime('%Y-%m-%d %H:%M:%S')}] #{formatted}\n"
|
123
136
|
end
|
124
137
|
end
|
125
138
|
end
|
@@ -43,7 +43,7 @@ module Restforce
|
|
43
43
|
return unless @strategy.build?(instance)
|
44
44
|
@mapping.database_record_type.create!(instance)
|
45
45
|
rescue ActiveRecord::ActiveRecordError => e
|
46
|
-
DB.logger.error(
|
46
|
+
DB.logger.error(e)
|
47
47
|
end
|
48
48
|
|
49
49
|
# Internal: Attempt to create a partner record in Salesforce for the
|
@@ -57,7 +57,7 @@ module Restforce
|
|
57
57
|
return if instance.synced?
|
58
58
|
@mapping.salesforce_record_type.create!(instance)
|
59
59
|
rescue Faraday::Error::ClientError => e
|
60
|
-
DB.logger.error(
|
60
|
+
DB.logger.error(e)
|
61
61
|
end
|
62
62
|
|
63
63
|
end
|
data/lib/restforce/db/version.rb
CHANGED
data/lib/restforce/db/worker.rb
CHANGED