uber-s3 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/uber-s3.rb +9 -4
- data/lib/uber-s3/operation/object/content_encoding.rb +1 -1
- data/lib/uber-s3/version.rb +1 -1
- metadata +2 -2
data/lib/uber-s3.rb
CHANGED
@@ -11,17 +11,22 @@ require 'mime/types'
|
|
11
11
|
class UberS3
|
12
12
|
extend Forwardable
|
13
13
|
|
14
|
-
|
14
|
+
attr_reader :connection
|
15
|
+
attr_accessor :bucket, :options
|
15
16
|
def_delegators :@bucket, :store, :set, :object, :get, :head, :[], :exists?, :objects
|
16
17
|
|
17
18
|
def initialize(options={})
|
18
|
-
self.
|
19
|
-
self.bucket
|
19
|
+
self.options = options
|
20
|
+
self.bucket = options[:bucket]
|
20
21
|
end
|
21
|
-
|
22
|
+
|
22
23
|
def inspect
|
23
24
|
"#<UberS3 client v#{UberS3::VERSION}>"
|
24
25
|
end
|
26
|
+
|
27
|
+
def connection
|
28
|
+
Thread.current['[uber-s3]:connection'] ||= Connection.open(self, options)
|
29
|
+
end
|
25
30
|
|
26
31
|
def bucket=(bucket)
|
27
32
|
@bucket = bucket.is_a?(String) ? Bucket.new(self, bucket) : bucket
|
@@ -16,7 +16,7 @@ module UberS3::Operation::Object
|
|
16
16
|
module InstanceMethods
|
17
17
|
|
18
18
|
# Default mime-types to be auto-gzipped if gzip == :web
|
19
|
-
WEB_GZIP_TYPES = ['text/html', 'text/plain', 'text/css',
|
19
|
+
WEB_GZIP_TYPES = ['text/html', 'text/plain', 'text/css', 'application/json',
|
20
20
|
'application/javascript', 'application/x-javascript',
|
21
21
|
'text/xml', 'application/xml', 'application/xml+rss']
|
22
22
|
|
data/lib/uber-s3/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uber-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mime-types
|