sequel_rails3 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/sequel_rails3/logger.rb +3 -14
- data/sequel_rails3.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.3
|
data/lib/sequel_rails3/logger.rb
CHANGED
@@ -39,12 +39,6 @@ module SequelRails3
|
|
39
39
|
logger.debug " #{name} #{sql}"
|
40
40
|
end
|
41
41
|
|
42
|
-
def self.error(message)
|
43
|
-
return unless logger
|
44
|
-
|
45
|
-
logger.error(message)
|
46
|
-
end
|
47
|
-
|
48
42
|
def self.odd?
|
49
43
|
self.odd_or_even = !odd_or_even
|
50
44
|
end
|
@@ -56,14 +50,9 @@ module Sequel
|
|
56
50
|
def log_yield(sql, args = nil)
|
57
51
|
sql = "#{sql}; #{args.inspect}" if args
|
58
52
|
start = Time.now
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
SequelRails3::Logger.error("#{e.class}: #{e.message.strip}: #{sql}")
|
63
|
-
raise
|
64
|
-
ensure
|
65
|
-
SequelRails3::Logger.debug(sql, Time.now-start) unless e
|
66
|
-
end
|
53
|
+
result = yield
|
54
|
+
SequelRails3::Logger.debug(sql, Time.now-start)
|
55
|
+
result
|
67
56
|
end
|
68
57
|
end
|
69
58
|
end
|
data/sequel_rails3.gemspec
CHANGED