deep_store 0.2.0 → 0.2.2

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: 05957ff7e34589fb61cd62c25a02b1ee73e3a424
4
- data.tar.gz: 4c75e8e9b0db6a23626bf629ff015aa39df507c8
3
+ metadata.gz: a14d7635c8ff385c1fbf5814198e77a0bad24ba2
4
+ data.tar.gz: 8bcfc366e8bfa387eabee6fe3e0c737284bb7fff
5
5
  SHA512:
6
- metadata.gz: 1ac2b9f699f0612f41131b35098683a4c4ae61de5f9936377a434816ea84efdf8cf8aa945a6217af146c767b0a75a226dace222bfec854e32200dbd22bc9b31e
7
- data.tar.gz: 9471c6de8084b182c19fe188aa2fefc462f799a5a49316514027c542823cd0d84686a46ab709c372a30c6381a43829cb56da6f6f35570f910843ae2337740f6d
6
+ metadata.gz: 38b6e04b3ab5285b328eb2e08c744b69ae1d20cd7b628c877b2b82552ade1ba4d5534c68fea2cd29fe4a7a44f3ff58c796594651a146859cee2616b6ce405efb
7
+ data.tar.gz: 8efa3848e964510eb31f271ff2adf82446a39bf86f4a4831592d96c51798735ed66ec99a250ce5a5e8287edaef454fb688676f9bcaa21785ce1446278ecef8c5
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## [0.2.2] 2016-11-14
4
+ ### Fixed
5
+ - Gem version
6
+
7
+ ## [0.2.1] 2016-11-14
8
+ ### Fixed
9
+ - Use binmode for internal streams
10
+
11
+ ### Changed
12
+ - Update README
13
+
3
14
  ## [0.2.0] 2016-10-24
4
15
  ### Added
5
16
  - DAO specs
data/README.md CHANGED
@@ -2,22 +2,19 @@
2
2
 
3
3
  DeepStore is a ODM-like solution to manage S3-backed data. It provides a familiar interface to perform basic operations on files stored in S3 and facilitates their manipulation by abstracting away its intricacies. It's an opinionated but extensible library that follows "convention over configuration" and attempts to maximize developer productivity at the expense of deeper control.
4
4
 
5
- ## WARNING
6
- This is a **Beta** version. It works, but please keep that in mind and feel free to communicate any issues, suggestions or PRs ;-)
7
-
8
5
  # Configuration
9
6
 
10
7
  ```
11
8
  # /config/initializers/dd.rb
12
9
  DeepStore.configure do |c|
13
- c.bucket = bucket # defaults to ENV['DEEP_DIVE_BUCKET']
10
+ c.bucket = bucket # defaults to ENV['DEEP_STORE_BUCKET']
14
11
  c.access_key_id = access_key_id # defaults to ENV['AWS_ACCESS_KEY_ID']
15
12
  c.secret_access_key = secret_access_key # defaults to ENV['AWS_SECRET_ACCESS_KEY']
16
13
  c.region = region # defaults to 'us-east-1' and fallback to ENV['AWS_REGION']
17
14
  end
18
15
  ```
19
16
 
20
- # How to Use
17
+ # Usage
21
18
 
22
19
  ```ruby
23
20
  class Log
@@ -9,6 +9,7 @@ module DeepStore
9
9
 
10
10
  def decode(stream)
11
11
  decompressed_stream = Tempfile.new
12
+ decompressed_stream.binmode
12
13
 
13
14
  Zlib::GzipReader.open(stream) do |gz|
14
15
  while (chunk = gz.read(CHUNK_SIZE))
@@ -23,6 +24,7 @@ module DeepStore
23
24
 
24
25
  def encode(stream)
25
26
  compressed_stream = Tempfile.new
27
+ compressed_stream.binmode
26
28
 
27
29
  Zlib::GzipWriter.open(compressed_stream.path) do |gz|
28
30
  while (chunk = stream.read(CHUNK_SIZE))
@@ -20,6 +20,7 @@ module DeepStore
20
20
 
21
21
  def get(key)
22
22
  stream = Tempfile.new
23
+ stream.binmode
23
24
  object = adapter.get_object(bucket: bucket, key: key, response_target: stream)
24
25
  Result.new(object: object, stream: codec.decode(stream))
25
26
  rescue Aws::S3::Errors::NoSuchKey
@@ -1,3 +1,3 @@
1
1
  module DeepStore
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Wiermann
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-24 00:00:00.000000000 Z
11
+ date: 2016-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk