tiny_tds 0.9.5.beta.5 → 0.9.5.beta.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: 4a7a03e6a70460ea956b9604ac66d252770016b8
4
- data.tar.gz: 9b353b91d2679b06a2ab3172af2ae3171832a88f
3
+ metadata.gz: 391e3f79753350dd41b01985e14aade3efdf6b05
4
+ data.tar.gz: 2cbf5c4730f86c840a0c0a31588094c8255349f2
5
5
  SHA512:
6
- metadata.gz: 6c07d3e11ee486f86d94109e8adffde636000e5bac854f705884079bc06dde1d94ae9eb7b7589a1436f2e0c6001aadc80ed5037a6374b883072954f42bb85db1
7
- data.tar.gz: 4c5a44856d545b714499d7acd4104fe908086e4c8eec54e1120a34827cf82e3a8e78218f5db042a243db088909ead3037c80a3360d7071bb23c529cc8591a38b
6
+ metadata.gz: 4d28d6650415bad152c39bee5e525df667aa5ff2da3a5fac6b267cd41c0fa9cc105f0a893f6ef2fb51caebeb7fcde54922285d91d157d0626b31c2ce86e91b69
7
+ data.tar.gz: d6a0e594660e50bf5687db7be57d3dd888c46cc42cda40923411a3fbb566ac68aca4963f179cb2a62dbe2c462e5f0066facb30add3c7a3d9a9b6a4b395966450
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.5.beta.5
1
+ 0.9.5.beta.6
data/appveyor.yml CHANGED
@@ -47,6 +47,7 @@ environment:
47
47
  secure: D3vsNNzv/Th+RqMNrm3WJw==
48
48
  matrix:
49
49
  - ruby_version: "200"
50
+ - ruby_version: "22"
50
51
  - ruby_version: "22-x64"
51
52
  on_failure:
52
53
  - find -name compile.log | xargs cat
@@ -307,7 +307,7 @@ static VALUE rb_tinytds_result_fetch_row(VALUE self, ID timezone, int symbolize_
307
307
  break;
308
308
  }
309
309
  case 43: { // SYBMSDATETIMEOFFSET
310
- VALUE rational_sec = rb_Rational(INT2NUM(dr2.nanosecond), opt_onebil);
310
+ VALUE rational_sec = rb_Rational(INT2NUM((dr2.second * 1000000000) + dr2.nanosecond), opt_onebil);
311
311
  val = rb_funcall(rb_cTime, intern_new, 7, INT2NUM(dr2.year), INT2NUM(dr2.month), INT2NUM(dr2.day), INT2NUM(dr2.hour), INT2NUM(dr2.minute), rational_sec, INT2NUM(dr2.tzone*60));
312
312
  break;
313
313
  }
@@ -78,7 +78,7 @@ INSERT INTO [datatypes] ([id], [datetime]) VALUES ( 63, '2010-01-01T12:
78
78
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 81, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.00 -08:00
79
79
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 82, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.00 +00:00
80
80
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 83, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.99 +00:00
81
- -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.1234567 -08:00
81
+ -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:59.1234567-08:00' ) -- 1984-01-24 04:20:59.1234567 -08:00
82
82
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 85, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.0000000 +00:00
83
83
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 86, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.9999999 +00:00
84
84
  INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 91, 12345.01 )
@@ -78,7 +78,7 @@ INSERT INTO [datatypes] ([id], [datetime]) VALUES ( 63, '2010-01-01T12:
78
78
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 81, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.00 -08:00
79
79
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 82, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.00 +00:00
80
80
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 83, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.99 +00:00
81
- -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.1234567 -08:00
81
+ -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:59.1234567-08:00' ) -- 1984-01-24 04:20:59.1234567 -08:00
82
82
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 85, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.0000000 +00:00
83
83
  -- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 86, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.9999999 +00:00
84
84
  INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 91, 12345.01 )
@@ -78,7 +78,7 @@ INSERT INTO [datatypes] ([id], [datetime2_2]) VALUES ( 74, '9999-12-31 23:
78
78
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 81, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.00 -08:00
79
79
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 82, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.00 +00:00
80
80
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 83, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.99 +00:00
81
- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.1234567 -08:00
81
+ INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:59.1234567-08:00' ) -- 1984-01-24 04:20:59.1234567 -08:00
82
82
  INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 85, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.0000000 +00:00
83
83
  INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 86, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.9999999 +00:00
84
84
  INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 91, 12345.01 )
@@ -78,7 +78,7 @@ INSERT INTO [datatypes] ([id], [datetime2_2]) VALUES ( 74, '9999-12-31 23:
78
78
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 81, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.00 -08:00
79
79
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 82, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.00 +00:00
80
80
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 83, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.99 +00:00
81
- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.1234567 -08:00
81
+ INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:59.1234567-08:00' ) -- 1984-01-24 04:20:59.1234567 -08:00
82
82
  INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 85, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.0000000 +00:00
83
83
  INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 86, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.9999999 +00:00
84
84
  INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 91, 12345.01 )
@@ -78,7 +78,7 @@ INSERT INTO [datatypes] ([id], [datetime2_2]) VALUES ( 74, '9999-12-31 23:
78
78
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 81, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.00 -08:00
79
79
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 82, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.00 +00:00
80
80
  INSERT INTO [datatypes] ([id], [datetimeoffset_2]) VALUES ( 83, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.99 +00:00
81
- INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:00.1234567-08:00' ) -- 1984-01-24 04:20:00.1234567 -08:00
81
+ INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 84, '1984-01-24T04:20:59.1234567-08:00' ) -- 1984-01-24 04:20:59.1234567 -08:00
82
82
  INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 85, '1984-01-24T04:20:00.0000000Z' ) -- 1984-01-24 04:20:00.0000000 +00:00
83
83
  INSERT INTO [datatypes] ([id], [datetimeoffset_7]) VALUES ( 86, '9999-12-31T23:59:59.9999999Z' ) -- 9999-12-31 23:59:59.9999999 +00:00
84
84
  INSERT INTO [datatypes] ([id], [decimal_9_2]) VALUES ( 91, 12345.01 )
data/test/schema_test.rb CHANGED
@@ -391,6 +391,7 @@ class SchemaTest < TinyTds::TestCase
391
391
  end
392
392
 
393
393
  it 'casts datetimeoffset' do
394
+ skip 'datetimeoffset argument out of range' if windows_32bit?
394
395
  # 1984-01-24T04:20:00.1234567-08:00
395
396
  v = find_value 84, :datetimeoffset_7
396
397
  if @client.tds_73?
@@ -401,7 +402,7 @@ class SchemaTest < TinyTds::TestCase
401
402
  assert_equal 24, v.day, 'Day'
402
403
  assert_equal 4, v.hour, 'Hour'
403
404
  assert_equal 20, v.min, 'Minute'
404
- assert_equal 0, v.sec, 'Second'
405
+ assert_equal 59, v.sec, 'Second'
405
406
  assert_equal 123456, v.usec, 'Microseconds'
406
407
  assert_equal 123456700, v.nsec, 'Nanoseconds'
407
408
  assert_equal -28800, v.utc_offset, 'Offset'
@@ -410,7 +411,7 @@ class SchemaTest < TinyTds::TestCase
410
411
  v = find_value 84, :datetimeoffset_7, timezone: :local
411
412
  assertions.call # Ignores timezone query option.
412
413
  else
413
- assert_equal '1984-01-24 04:20:00.1234567 -08:00', v
414
+ assert_equal '1984-01-24 04:20:59.1234567 -08:00', v
414
415
  end
415
416
  end
416
417
 
data/test/test_helper.rb CHANGED
@@ -134,6 +134,10 @@ module TinyTds
134
134
  assert_equal Encoding.find('UTF-8'), value.encoding
135
135
  end
136
136
 
137
+ def windows_32bit?
138
+ RbConfig::CONFIG['host_os'] == 'mingw32' && RbConfig::CONFIG['host'] =~ /i686-pc/
139
+ end
140
+
137
141
  def rubyRbx?
138
142
  RUBY_DESCRIPTION =~ /rubinius/i
139
143
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5.beta.5
4
+ version: 0.9.5.beta.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-12-28 00:00:00.000000000 Z
13
+ date: 2015-12-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2