td-client 0.8.19 → 0.8.20

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
+ == 2012-07-23 version 0.8.20
3
+
4
+ * Implemented Zlib::GzipReader#readpartial for compatibility with ruby 1.8
5
+
6
+
2
7
  == 2012-07-03 version 0.8.19
3
8
 
4
9
  * Added Client#partial_delete
@@ -539,7 +539,7 @@ class API
539
539
  params = opts.dup
540
540
  code, body, res = get("/v3/bulk_import/error_records/#{e name}", params)
541
541
  if code != "200"
542
- raise_error("Commit bulk import failed", res)
542
+ raise_error("Failed to get bulk import error records", res)
543
543
  end
544
544
  if body.empty?
545
545
  if block
@@ -551,6 +551,7 @@ class API
551
551
  require 'zlib'
552
552
  require 'stringio'
553
553
  require 'msgpack'
554
+ require File.expand_path('compat_gzip_reader', File.dirname(__FILE__))
554
555
  u = MessagePack::Unpacker.new(Zlib::GzipReader.new(StringIO.new(body)))
555
556
  if block
556
557
  begin
@@ -0,0 +1,19 @@
1
+
2
+ methods = Zlib::GzipReader.public_instance_methods
3
+ if !methods.include?(:readpartial) && !methods.include?('readpartial')
4
+ class Zlib::GzipReader
5
+ def readpartial(size, out=nil)
6
+ o = read(size)
7
+ if o
8
+ if out
9
+ out.replace(o)
10
+ return out
11
+ else
12
+ return o
13
+ end
14
+ end
15
+ raise EOFError, "end of file reached"
16
+ end
17
+ end
18
+ end
19
+
@@ -1,5 +1,5 @@
1
1
  module TreasureData
2
2
 
3
- VERSION = '0.8.19'
3
+ VERSION = '0.8.20'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: td-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.19
4
+ version: 0.8.20
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-03 00:00:00.000000000Z
12
+ date: 2012-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: msgpack
16
- requirement: &70143141621920 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: 0.4.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70143141621920
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.4.4
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: json
27
- requirement: &70143141621100 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 1.4.3
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70143141621100
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.4.3
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rspec
38
- requirement: &70143141620160 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,7 +53,12 @@ dependencies:
43
53
  version: 2.8.0
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70143141620160
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.8.0
47
62
  description:
48
63
  email:
49
64
  executables: []
@@ -56,6 +71,7 @@ files:
56
71
  - lib/td-client.rb
57
72
  - lib/td/client.rb
58
73
  - lib/td/client/api.rb
74
+ - lib/td/client/compat_gzip_reader.rb
59
75
  - lib/td/client/model.rb
60
76
  - lib/td/client/version.rb
61
77
  - spec/api_spec.rb
@@ -82,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
98
  version: '0'
83
99
  requirements: []
84
100
  rubyforge_project:
85
- rubygems_version: 1.8.12
101
+ rubygems_version: 1.8.23
86
102
  signing_key:
87
103
  specification_version: 3
88
104
  summary: Treasure Data API library for Ruby