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 +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +2 -5
- data/lib/deep_store/codecs/gzip_codec.rb +2 -0
- data/lib/deep_store/dao.rb +1 -0
- data/lib/deep_store/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a14d7635c8ff385c1fbf5814198e77a0bad24ba2
|
4
|
+
data.tar.gz: 8bcfc366e8bfa387eabee6fe3e0c737284bb7fff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38b6e04b3ab5285b328eb2e08c744b69ae1d20cd7b628c877b2b82552ade1ba4d5534c68fea2cd29fe4a7a44f3ff58c796594651a146859cee2616b6ce405efb
|
7
|
+
data.tar.gz: 8efa3848e964510eb31f271ff2adf82446a39bf86f4a4831592d96c51798735ed66ec99a250ce5a5e8287edaef454fb688676f9bcaa21785ce1446278ecef8c5
|
data/CHANGELOG.md
CHANGED
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['
|
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
|
-
#
|
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))
|
data/lib/deep_store/dao.rb
CHANGED
data/lib/deep_store/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|