blobsterix 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +2 -0
- data/lib/blobsterix/s3/s3_url_helper.rb +2 -1
- data/lib/blobsterix/transformation/image_transformation.rb +11 -0
- data/lib/blobsterix/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: 357a34133e4c01a7f32d527d2c4f2a5f0ec76cd2
|
4
|
+
data.tar.gz: 9bdafb457d14a11db5a986dc327ba506330a7fb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20448a19acf25b425f329587ba24012a577c06f1b02543d44f22f3527f1e71cb9e7e62058e67d7e4dae80750255a761e9c199a99c4a4d37ffd0c00160862e01e
|
7
|
+
data.tar.gz: 769cf61e0dc5968d3032a56d1200d56c119baa4701b37c83663df72f418a40a7eb643eda9f9ec1691c6560e67078551293fa1075d41e315e5c210bfcc18d6086
|
data/CHANGELOG.txt
CHANGED
@@ -31,6 +31,7 @@ module Blobsterix
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def bucket
|
34
|
+
return env['HTTP_X_AMZ_BUCKET'] if env['HTTP_X_AMZ_BUCKET']
|
34
35
|
host = bucket_matcher(env['HTTP_HOST'])
|
35
36
|
if host
|
36
37
|
host[1]
|
@@ -49,7 +50,7 @@ module Blobsterix
|
|
49
50
|
|
50
51
|
def bucket?
|
51
52
|
host = bucket_matcher(env['HTTP_HOST'])
|
52
|
-
host || env[nil][:bucket] || included_bucket
|
53
|
+
host || env[nil][:bucket] || included_bucket || env['HTTP_X_AMZ_BUCKET']
|
53
54
|
end
|
54
55
|
end
|
55
56
|
end
|
@@ -163,6 +163,17 @@ module Blobsterix::Transformations::Impl
|
|
163
163
|
raise StandardError.new($?) unless system("convert \"#{input_path}\" png:\"#{target_path}\"")
|
164
164
|
end
|
165
165
|
|
166
|
+
create_simple_trafo("base642bin", "text/plain", "*/*", false) do |input_path, target_path, value|
|
167
|
+
File.open(target_path, "w") { |io| io.write(Base64.decode64(File.read(input_path).split("base64,")[1])) }
|
168
|
+
end
|
169
|
+
|
170
|
+
create_simple_trafo("tobase64", "*/*", "*/*", false) do |input_path, target_path, value|
|
171
|
+
File.open(target_path, "w") do |io|
|
172
|
+
io.write "data:#{MimeMagic.by_magic(File.open(input_path)).type};base64,"
|
173
|
+
io.write(Base64.encode64(File.read(input_path)))
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
166
177
|
create_simple_trafo("jpg", "image/*", "image/jpeg", true) do |input_path, target_path, value|
|
167
178
|
raise StandardError.new($?) unless system("convert \"#{input_path}\" jpg:\"#{target_path}\"")
|
168
179
|
end
|
data/lib/blobsterix/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blobsterix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Sudmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|