verm-client 1.1.0 → 1.1.1

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: 2424da2dedcc8777ce4750ca0222bf5784cc7b32
4
- data.tar.gz: 7cf07cf76cdc95d372a90e6fd7d13f3acb401ff3
3
+ metadata.gz: b0944a2110fde443b969980a417fe24fc9e3c142
4
+ data.tar.gz: c880b7919042d31f450957f1f57f058d8499be9a
5
5
  SHA512:
6
- metadata.gz: fe7cd6811636171079bb872fa1fa392dbff10916271941a195af59199762e022c65dff4c1f42db6abc511ce4351a8e98a7669a440bc72e27831d4aaad74d5232
7
- data.tar.gz: f0a02480c2bfcb26c92dd1d8fef7f90236dbbf6bab0fefae96126609fcf2066fc3babc02d4fb8d1b29ba83b045f412e269173aa317602652f90409ecb324e352
6
+ metadata.gz: 93b9676a8d0736cda53c432b44404bfd1b0f37c5bda67c4d7f38d8d2c2d9e454b225b8a874854c2ddaa4879cf2e33f8bacfdea55b5eabebaa4e1661274975bb1
7
+ data.tar.gz: d1a8c4feff6b62811eed414f511dd2bbea3d1d71e008775535a1a8326ab9efdab9218b159e545f81da7c304b1a2a62e70dc798d612ee3745842e3781b5c4c5ca
data/README.md CHANGED
@@ -38,7 +38,7 @@ Retrieving content
38
38
  ```ruby
39
39
  VERM_CLIENT = Verm::Client.new("my-verm-server")
40
40
 
41
- file, content_type = VERM_CLIENT.load("/important_gifs/january/ab/cdefgh.jpg")
41
+ data, content_type = VERM_CLIENT.load("/important_gifs/january/ab/cdefgh.jpg")
42
42
  ```
43
43
 
44
44
  This basically does the same thing as the built-in Net::HTTP get method (aside from timeouts, error handling, etc.):
@@ -52,8 +52,8 @@ So you really don't need a client library for this - but it's usually more conv
52
52
  Verm stores all content without touching its character encoding, but Ruby 1.9+ treats all strings as having a specific character encoding. Most applications use UTF-8 for all text, so by default, the `load` method will set the character encoding of `text/*` content returned by Verm to `UTF-8`. You can override this or disable it entirely:
53
53
 
54
54
  ```ruby
55
- file, content_type = VERM_CLIENT.load("/important_gifs/january/ab/cdefgh.csv", force_encoding: 'ISO-8859-1')
56
- file, content_type = VERM_CLIENT.load("/important_gifs/january/ab/cdefgh.csv", force_encoding: nil)
55
+ data, content_type = VERM_CLIENT.load("/important_gifs/january/ab/cdefgh.csv", force_encoding: 'ISO-8859-1')
56
+ data, content_type = VERM_CLIENT.load("/important_gifs/january/ab/cdefgh.csv", force_encoding: nil)
57
57
  ```
58
58
 
59
59
 
@@ -93,7 +93,7 @@ It's important to note that Ruby's Net::HTTP client will automatically uncompres
93
93
  You can suppress that behavior by passing `Accept-Encoding: gzip` as a header (Net::HTTP would accept gzip anyway, but setting this header has the side effect of disabling uncompression):
94
94
 
95
95
  ```ruby
96
- file, content_type = VERM_CLIENT.load("/third_party_files/acme/2015/ab/cdefgh.csv", 'Accept-Encoding' => 'gzip')
96
+ data, content_type = VERM_CLIENT.load("/third_party_files/acme/2015/ab/cdefgh.csv", 'Accept-Encoding' => 'gzip')
97
97
  ```
98
98
 
99
99
 
@@ -77,8 +77,11 @@ module Verm
77
77
  compressed = StringIO.new
78
78
  compressed.set_encoding("BINARY")
79
79
  gz = Zlib::GzipWriter.new(compressed)
80
- gz.write(io_or_data)
81
- gz.close
80
+ begin
81
+ gz.write(io_or_data)
82
+ ensure # minimize finalizer whining
83
+ gz.close
84
+ end
82
85
  output = compressed.string
83
86
  return output, "gzip" if output.bytesize < io_or_data.bytesize
84
87
  io_or_data
@@ -1,3 +1,3 @@
1
1
  module Verm
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verm-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Will Bryant
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-03 00:00:00.000000000 Z
11
+ date: 2015-03-04 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Adds one-line methods for storing files in Verm and retrieving them again.
@@ -28,7 +28,7 @@ files:
28
28
  - test/fixtures/binary_file.gz
29
29
  - test/fixtures/large_compressed_csv_file.gz
30
30
  - test/verm_test.rb
31
- - verm.gemspec
31
+ - verm-client.gemspec
32
32
  homepage: http://github.com/willbryant/verm-client-ruby
33
33
  licenses:
34
34
  - MIT