activerecord-sqlserver-adapter 3.2.2 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,9 @@
1
1
 
2
+ * 3.2.3 *
3
+
4
+ * Fixed datetime quoting for ActiveSupport::TimeWithZone objects. Fixes #187 and #189.
5
+
6
+
2
7
  * 3.2.2 *
3
8
 
4
9
  * Fixes all known issues with cross database schema reflection. Fixes #185 [Chris Altman]
@@ -67,7 +67,16 @@ module ActiveRecord
67
67
 
68
68
  def quoted_datetime(value)
69
69
  if value.acts_like?(:time)
70
- value.is_a?(Date) ? quoted_value_acts_like_time_filter(value).to_time.xmlschema.to(18) : quoted_value_acts_like_time_filter(value).iso8601(3).to(22)
70
+ time_zone_qualified_value = quoted_value_acts_like_time_filter(value)
71
+ if value.is_a?(Date)
72
+ time_zone_qualified_value.to_time.xmlschema.to(18)
73
+ else
74
+ # CHANGED [Ruby 1.8] Not needed when 1.8 is dropped.
75
+ if value.is_a?(ActiveSupport::TimeWithZone) && RUBY_VERSION < '1.9'
76
+ time_zone_qualified_value = time_zone_qualified_value.to_time
77
+ end
78
+ time_zone_qualified_value.iso8601(3).to(22)
79
+ end
71
80
  else
72
81
  quoted_date(value)
73
82
  end
@@ -3,7 +3,7 @@ module ActiveRecord
3
3
  module Sqlserver
4
4
  module Version
5
5
 
6
- VERSION = '3.2.2'
6
+ VERSION = '3.2.3'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-sqlserver-adapter
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 2
9
- - 2
10
- version: 3.2.2
9
+ - 3
10
+ version: 3.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ken Collins
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2012-04-13 00:00:00 Z
22
+ date: 2012-04-24 00:00:00 Z
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: activerecord