blobsterix 0.0.23 → 0.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.txt +6 -0
- data/blobsterix.gemspec +1 -0
- data/lib/blobsterix/blob/blob_api.rb +34 -2
- data/lib/blobsterix/helper/data_response.rb +13 -4
- data/lib/blobsterix/helper/zip_file_presenter.rb +20 -0
- data/lib/blobsterix/service.rb +1 -1
- data/lib/blobsterix/transformation/image_transformation.rb +33 -0
- data/lib/blobsterix/version.rb +1 -1
- data/lib/blobsterix.rb +4 -0
- metadata +48 -49
- data/contents/images/417/40e/208/792/06e/113/syncview21.png +0 -0
- data/contents/images/417/40e/208/792/06e/113/syncview21.png.meta +0 -1
- data/contents/images/61d/6ca/3c0/04f/011/009/editor.html +0 -39
- data/contents/images/61d/6ca/3c0/04f/011/009/editor.html.meta +0 -1
- data/contents/images/628/643/14d/091/405/04c/syncview21force.png +0 -0
- data/contents/images/628/643/14d/091/405/04c/syncview21force.png.meta +0 -1
- data/contents/images/64a/7e6/43a/340/05a/052/expired.png +0 -0
- data/contents/images/64a/7e6/43a/340/05a/052/expired.png.meta +0 -1
- data/contents/images/683/0e0/193/1fc/360/102/expired_0.png +0 -0
- data/contents/images/683/0e0/193/1fc/360/102/expired_0.png.meta +0 -1
- data/contents/images/74a/468/084/62e/43d/056/IMG_06102011_152958.png +0 -0
- data/contents/images/74a/468/084/62e/43d/056/IMG_06102011_152958.png.meta +0 -1
- data/contents/presentation/417/40e/208/792/06e/113/syncview21.png +0 -0
- data/contents/presentation/4a2/0fe/748/079/613/0f1/blobsterix.html +0 -267
- data/contents/presentation/4fe/468/31c/3a3/6b7/0f1/experteer.png +0 -0
- data/contents/presentation/67c/581/1f9/341/75e/13f/crop.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c1ccaa89590b6d492dba453da8542afefc08124
|
4
|
+
data.tar.gz: 19c382d5d80ef77df7d7c0e23da3a424c388cf4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c214ea2f03ee07768760061ad63f17b1be168bff2c329e9e9a5cb6b1c562cb9bbabc7f4abbe27b9bc2dc99b702b05db1c236865ddeb04364e8bc8a533c073c38
|
7
|
+
data.tar.gz: fbddb19069fba7915b18bf9de8e7fa02f60ae9fcba3bf5a4fa4b4a309c25927e3e2edeb19d7889284187b11994c08f7a4045cb85f5c84fb3b78a6cbac1b63a5d
|
data/CHANGELOG.txt
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
= 0.0.26
|
2
|
+
* bug fix
|
3
|
+
= 0.0.25
|
4
|
+
* added option to force download filename which also marks the link as attachment
|
5
|
+
= 0.0.24
|
6
|
+
* added unzip transformation, using "unzip as trafo and a path into the zip will yield the file inside the zip"
|
1
7
|
= 0.0.23
|
2
8
|
* fixed output type of transformation output
|
3
9
|
= 0.0.22
|
data/blobsterix.gemspec
CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |gem|
|
|
30
30
|
gem.add_dependency "nokogiri", "~> 1.6.1"
|
31
31
|
gem.add_dependency "ruby-webp", "~> 0.1.0"
|
32
32
|
gem.add_dependency "mini_magick", "~> 3.5.0"
|
33
|
+
gem.add_dependency "rubyzip", ">= 1.0.0"
|
33
34
|
gem.add_dependency "log4r"
|
34
35
|
|
35
36
|
gem.add_development_dependency "rake","~> 0.9.6"
|
@@ -29,14 +29,16 @@ module Blobsterix
|
|
29
29
|
accept = AcceptType.get(env, format)[0]
|
30
30
|
|
31
31
|
# check trafo encryption
|
32
|
-
trafo_string = Blobsterix.decrypt_trafo(BlobAccess.new(:bucket => bucket, :id =>
|
32
|
+
trafo_string = Blobsterix.decrypt_trafo(BlobAccess.new(:bucket => bucket, :id => bare_file), transformation_string, logger)
|
33
33
|
if !trafo_string
|
34
34
|
Blobsterix.encryption_error(BlobAccess.new(:bucket => bucket, :id => file))
|
35
35
|
return Http.NotAuthorized
|
36
36
|
end
|
37
37
|
|
38
|
+
transformation_array = trafo(trafo_string)
|
39
|
+
insert_zip_into_trafo(transformation_array)
|
38
40
|
|
39
|
-
blob_access=BlobAccess.new(:bucket => bucket, :id =>
|
41
|
+
blob_access=BlobAccess.new(:bucket => bucket, :id => bare_file, :accept_type => accept, :trafo => transformation_array)
|
40
42
|
Blobsterix.storage_event_listener.call("blob_api.get", :trafo_string => trafo_string, :blob_access => blob_access)
|
41
43
|
|
42
44
|
begin
|
@@ -52,5 +54,35 @@ module Blobsterix
|
|
52
54
|
def get_file_head
|
53
55
|
get_file(false)
|
54
56
|
end
|
57
|
+
|
58
|
+
def insert_zip_into_trafo(transformation_array)
|
59
|
+
transformation_array.each do |entry|
|
60
|
+
if entry[0] == "unzip"
|
61
|
+
entry[1] = sugar_file if sugar_file
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def bare_file
|
67
|
+
@bare_file||=bare_zip_file_split
|
68
|
+
end
|
69
|
+
|
70
|
+
def sugar_file
|
71
|
+
if special_file.length > 1
|
72
|
+
@sugar_file ||= special_file[1]
|
73
|
+
else
|
74
|
+
nil
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def special_file
|
79
|
+
@special_file ||= file.split(".zip")
|
80
|
+
end
|
81
|
+
|
82
|
+
def bare_zip_file_split
|
83
|
+
bare_file = special_file[0]
|
84
|
+
bare_file += ".zip" if file.include?(".zip")
|
85
|
+
bare_file
|
86
|
+
end
|
55
87
|
end
|
56
88
|
end
|
@@ -14,25 +14,34 @@ module Blobsterix
|
|
14
14
|
if not meta.valid
|
15
15
|
Http.NotFound()
|
16
16
|
elsif Blobsterix.use_x_send_file and etag != meta.etag
|
17
|
-
[200, meta.header.merge({"X-Sendfile" => meta.path.to_s}), ""]
|
17
|
+
[200, meta.header.merge({"X-Sendfile" => meta.path.to_s}).merge(content_disposition_header), ""]
|
18
18
|
elsif etag != meta.etag
|
19
19
|
if env != nil && meta.size > 30000 && Blobsterix.allow_chunked_stream
|
20
20
|
chunkresponse
|
21
21
|
else
|
22
|
-
[200, meta.header, (with_data ? File.open(meta.path, "rb") : "")]
|
22
|
+
[200, meta.header.merge(content_disposition_header), (with_data ? File.open(meta.path, "rb") : "")]
|
23
23
|
end
|
24
24
|
else
|
25
|
-
[304, meta.header, ""]
|
25
|
+
[304, meta.header.merge(content_disposition_header), ""]
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
29
|
private
|
30
|
+
def filename
|
31
|
+
env["params"]["filename"]
|
32
|
+
end
|
33
|
+
def filename?
|
34
|
+
env["params"].has_key? "filename" if env && env["params"]
|
35
|
+
end
|
36
|
+
def content_disposition_header
|
37
|
+
filename? ? {"Content-Disposition" => "attachment; filename=#{filename}"} : {}
|
38
|
+
end
|
30
39
|
def chunkresponse
|
31
40
|
f = File.open(meta.path)
|
32
41
|
EM.next_tick do
|
33
42
|
send_chunk(f)
|
34
43
|
end
|
35
|
-
[200, meta.header.merge(Goliath::Response::CHUNKED_STREAM_HEADERS), (with_data ? Goliath::Response::STREAMING : "")]
|
44
|
+
[200, meta.header.merge(Goliath::Response::CHUNKED_STREAM_HEADERS).merge(content_disposition_header), (with_data ? Goliath::Response::STREAMING : "")]
|
36
45
|
end
|
37
46
|
|
38
47
|
def send_chunk(file)
|
data/lib/blobsterix/service.rb
CHANGED
@@ -184,4 +184,37 @@ module Blobsterix::Transformations::Impl
|
|
184
184
|
sleep(value.to_i)
|
185
185
|
raise StandardError.new($?) unless system("cp \"#{input_path}\" \"#{target_path}\"")
|
186
186
|
end
|
187
|
+
|
188
|
+
create_simple_trafo("unzip", "application/zip", "*/*", false) do |input_path, target_path, value|
|
189
|
+
file_name = value.gsub("_dot_", ".")
|
190
|
+
file_name = file_name.gsub("_slash_", "/")
|
191
|
+
file_name = file_name[1..-1] if file_name[0] == "/"
|
192
|
+
::Zip::File.open(input_path) do |zip_file|
|
193
|
+
# Handle entries one by one
|
194
|
+
zip_file.each do |entry|
|
195
|
+
# Extract to file/directory/symlink
|
196
|
+
if entry.name == file_name
|
197
|
+
entry.extract(target_path)
|
198
|
+
break
|
199
|
+
end
|
200
|
+
end
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
create_simple_trafo("zip2json", "application/zip", "text/json", true) do |input_path, target_path, value|
|
205
|
+
file = ::Blobsterix::ZipFilePresenter.new
|
206
|
+
file.size = File.size(input_path)
|
207
|
+
|
208
|
+
::Zip::File.open(input_path) do |zip_file|
|
209
|
+
# Handle entries one by one
|
210
|
+
zip_file.each do |entry|
|
211
|
+
# Extract to file/directory/symlink
|
212
|
+
file.addFile(entry.name)
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
File.open(target_path, "w+") do |out|
|
217
|
+
out.write(file.as_json.to_json)
|
218
|
+
end
|
219
|
+
end
|
187
220
|
end
|
data/lib/blobsterix/version.rb
CHANGED
data/lib/blobsterix.rb
CHANGED
@@ -19,6 +19,7 @@ require 'logger'
|
|
19
19
|
require 'erb'
|
20
20
|
require 'openssl'
|
21
21
|
require 'base64'
|
22
|
+
require 'zip'
|
22
23
|
require 'goliath/api'
|
23
24
|
|
24
25
|
|
@@ -41,6 +42,7 @@ require 'blobsterix/helper/template_renderer'
|
|
41
42
|
require 'blobsterix/helper/config_loader'
|
42
43
|
require 'blobsterix/helper/url_helper'
|
43
44
|
require 'blobsterix/helper/jsonizer'
|
45
|
+
require 'blobsterix/helper/zip_file_presenter'
|
44
46
|
|
45
47
|
#router base
|
46
48
|
require 'blobsterix/router/app_router'
|
@@ -85,6 +87,8 @@ require 'blobsterix/service'
|
|
85
87
|
BLOBSTERIX_ROOT=Dir.pwd
|
86
88
|
BLOBSTERIX_GEM_DIR = File.join(File.dirname(__FILE__), "../")
|
87
89
|
|
90
|
+
Zip.on_exists_proc = true
|
91
|
+
|
88
92
|
module Blobsterix
|
89
93
|
def self.root
|
90
94
|
@root ||= Pathname.new(BLOBSTERIX_ROOT)
|
metadata
CHANGED
@@ -1,195 +1,209 @@
|
|
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.26
|
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
|
+
date: 2014-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.8.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.8.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: goliath
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 1.0.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 1.0.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: journey
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.0.4
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 1.0.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: nokogiri
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.6.1
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 1.6.1
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: ruby-webp
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.1.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.1.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: mini_magick
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 3.5.0
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: 3.5.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubyzip
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.0.0
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.0.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: log4r
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :runtime
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - '>='
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rake
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- -
|
129
|
+
- - ~>
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: 0.9.6
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- -
|
136
|
+
- - ~>
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: 0.9.6
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rspec
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- -
|
143
|
+
- - ~>
|
130
144
|
- !ruby/object:Gem::Version
|
131
145
|
version: 2.14.0
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- -
|
150
|
+
- - ~>
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: 2.14.0
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rspec-core
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- -
|
157
|
+
- - '>='
|
144
158
|
- !ruby/object:Gem::Version
|
145
159
|
version: '0'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- -
|
164
|
+
- - '>='
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rspec-expectations
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- -
|
171
|
+
- - '>='
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- -
|
178
|
+
- - '>='
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
182
|
name: rspec-mocks
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
|
-
- -
|
185
|
+
- - '>='
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0'
|
174
188
|
type: :development
|
175
189
|
prerelease: false
|
176
190
|
version_requirements: !ruby/object:Gem::Requirement
|
177
191
|
requirements:
|
178
|
-
- -
|
192
|
+
- - '>='
|
179
193
|
- !ruby/object:Gem::Version
|
180
194
|
version: '0'
|
181
195
|
- !ruby/object:Gem::Dependency
|
182
196
|
name: pry
|
183
197
|
requirement: !ruby/object:Gem::Requirement
|
184
198
|
requirements:
|
185
|
-
- -
|
199
|
+
- - '>='
|
186
200
|
- !ruby/object:Gem::Version
|
187
201
|
version: '0'
|
188
202
|
type: :development
|
189
203
|
prerelease: false
|
190
204
|
version_requirements: !ruby/object:Gem::Requirement
|
191
205
|
requirements:
|
192
|
-
- -
|
206
|
+
- - '>='
|
193
207
|
- !ruby/object:Gem::Version
|
194
208
|
version: '0'
|
195
209
|
description: Blobsterix is a transcoding, caching, storage server that can transform
|
@@ -201,8 +215,8 @@ executables:
|
|
201
215
|
extensions: []
|
202
216
|
extra_rdoc_files: []
|
203
217
|
files:
|
204
|
-
-
|
205
|
-
-
|
218
|
+
- .gitignore
|
219
|
+
- .travis.yml
|
206
220
|
- CHANGELOG.txt
|
207
221
|
- Gemfile
|
208
222
|
- LICENSE
|
@@ -212,22 +226,6 @@ files:
|
|
212
226
|
- bin/test
|
213
227
|
- blobsterix.gemspec
|
214
228
|
- config/lighttpd.conf
|
215
|
-
- contents/images/417/40e/208/792/06e/113/syncview21.png
|
216
|
-
- contents/images/417/40e/208/792/06e/113/syncview21.png.meta
|
217
|
-
- contents/images/61d/6ca/3c0/04f/011/009/editor.html
|
218
|
-
- contents/images/61d/6ca/3c0/04f/011/009/editor.html.meta
|
219
|
-
- contents/images/628/643/14d/091/405/04c/syncview21force.png
|
220
|
-
- contents/images/628/643/14d/091/405/04c/syncview21force.png.meta
|
221
|
-
- contents/images/64a/7e6/43a/340/05a/052/expired.png
|
222
|
-
- contents/images/64a/7e6/43a/340/05a/052/expired.png.meta
|
223
|
-
- contents/images/683/0e0/193/1fc/360/102/expired_0.png
|
224
|
-
- contents/images/683/0e0/193/1fc/360/102/expired_0.png.meta
|
225
|
-
- contents/images/74a/468/084/62e/43d/056/IMG_06102011_152958.png
|
226
|
-
- contents/images/74a/468/084/62e/43d/056/IMG_06102011_152958.png.meta
|
227
|
-
- contents/presentation/417/40e/208/792/06e/113/syncview21.png
|
228
|
-
- contents/presentation/4a2/0fe/748/079/613/0f1/blobsterix.html
|
229
|
-
- contents/presentation/4fe/468/31c/3a3/6b7/0f1/experteer.png
|
230
|
-
- contents/presentation/67c/581/1f9/341/75e/13f/crop.png
|
231
229
|
- lib/blobsterix.rb
|
232
230
|
- lib/blobsterix/blob/blob_api.rb
|
233
231
|
- lib/blobsterix/blob/blob_url_helper.rb
|
@@ -244,6 +242,7 @@ files:
|
|
244
242
|
- lib/blobsterix/helper/status_info.rb
|
245
243
|
- lib/blobsterix/helper/template_renderer.rb
|
246
244
|
- lib/blobsterix/helper/url_helper.rb
|
245
|
+
- lib/blobsterix/helper/zip_file_presenter.rb
|
247
246
|
- lib/blobsterix/mimemagic/magic.rb
|
248
247
|
- lib/blobsterix/mimemagic/tables.rb
|
249
248
|
- lib/blobsterix/mimemagic/version.rb
|
@@ -307,17 +306,17 @@ require_paths:
|
|
307
306
|
- lib
|
308
307
|
required_ruby_version: !ruby/object:Gem::Requirement
|
309
308
|
requirements:
|
310
|
-
- -
|
309
|
+
- - '>='
|
311
310
|
- !ruby/object:Gem::Version
|
312
311
|
version: 2.0.0.451
|
313
312
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
314
313
|
requirements:
|
315
|
-
- -
|
314
|
+
- - '>='
|
316
315
|
- !ruby/object:Gem::Version
|
317
316
|
version: '0'
|
318
317
|
requirements: []
|
319
318
|
rubyforge_project:
|
320
|
-
rubygems_version: 2.
|
319
|
+
rubygems_version: 2.0.14
|
321
320
|
signing_key:
|
322
321
|
specification_version: 4
|
323
322
|
summary: Blobsterix is a transcoding, caching, storage server.
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
{"mimetype":"image/png","mediatype":"image","etag":"79149e4d77dcc01036acb6842353639f","size":70680}
|
@@ -1,39 +0,0 @@
|
|
1
|
-
<html>
|
2
|
-
<head>
|
3
|
-
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
|
4
|
-
<script src="/js/jquery.Jcrop.min.js"></script>
|
5
|
-
<link rel="stylesheet" href="/css/jquery.Jcrop.css" type="text/css" />
|
6
|
-
<script language="Javascript">
|
7
|
-
timeout = null
|
8
|
-
function showCoords(c)
|
9
|
-
{
|
10
|
-
// variables can be accessed here as
|
11
|
-
// c.x, c.y, c.x2, c.y2, c.w, c.h
|
12
|
-
if (timeout != null)
|
13
|
-
clearTimeout(timeout);
|
14
|
-
|
15
|
-
timeout = setTimeout(function() {
|
16
|
-
console.log("change url")
|
17
|
-
$("#out").attr("src", "/blob/v1/crop_"+c.w+"x"+c.h+"+"+c.x+"+"+c.y+"/images/expired.png")//IMG_06102011_152958
|
18
|
-
$.get( "/blob/v1/crop_"+c.w+"x"+c.h+"+"+c.x+"+"+c.y+",ascii/images/expired.png", function( data ) {
|
19
|
-
|
20
|
-
$("#ascii").html( data.match(/.{100}/g).join("<br>") );
|
21
|
-
});
|
22
|
-
}, 150);
|
23
|
-
};
|
24
|
-
</script>
|
25
|
-
</head>
|
26
|
-
<body>
|
27
|
-
<img src="/blob/v1/images/expired.png" id="target" />
|
28
|
-
<script language="Javascript">
|
29
|
-
jQuery(function($) {
|
30
|
-
$('#target').Jcrop({
|
31
|
-
onSelect: showCoords,
|
32
|
-
onChange: showCoords
|
33
|
-
});
|
34
|
-
});
|
35
|
-
</script>
|
36
|
-
<img id="out"/>
|
37
|
-
<div id="ascii" style="font-family: 'Courier New', Courier, monospace;"></div>
|
38
|
-
</body>
|
39
|
-
</html>
|
@@ -1 +0,0 @@
|
|
1
|
-
{"mimetype":"text/html","mediatype":"text","etag":"a7047a13e25cc32a1f630e460d8d5480","size":1233}
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
{"mimetype":"image/png","mediatype":"image","etag":"7a6a87f982ed5efa57b4abe8c6c4dd5c","size":78584}
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
{"mimetype":"image/png","mediatype":"image","etag":"20cac9a579709f5b44ac52d3c2087c4a","size":6550}
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
{"mimetype":"image/png","mediatype":"image","etag":"618bb3e25ff8eabc7f1ecbf9d802b611","size":6185}
|
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
{"mimetype":"image/png","mediatype":"image","etag":"a61ba78749fc54dc5662796abab75e7e","size":320437}
|
Binary file
|
@@ -1,267 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
|
3
|
-
<!--
|
4
|
-
Google HTML5 slide template
|
5
|
-
|
6
|
-
Authors: Luke Mahé (code)
|
7
|
-
Marcin Wichary (code and design)
|
8
|
-
|
9
|
-
Dominic Mazzoni (browser compatibility)
|
10
|
-
Charles Chen (ChromeVox support)
|
11
|
-
|
12
|
-
URL: http://code.google.com/p/html5slides/
|
13
|
-
-->
|
14
|
-
|
15
|
-
<html>
|
16
|
-
<head>
|
17
|
-
<title>Presentation</title>
|
18
|
-
|
19
|
-
<meta charset='utf-8'>
|
20
|
-
<script
|
21
|
-
src='http://html5slides.googlecode.com/svn/trunk/slides.js'></script>
|
22
|
-
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
|
23
|
-
<script src="js/jquery.Jcrop.min.js"></script>
|
24
|
-
<link rel="stylesheet" href="css/jquery.Jcrop.css" type="text/css" />
|
25
|
-
|
26
|
-
<script language="Javascript">
|
27
|
-
timeout = null
|
28
|
-
function showCoords(c)
|
29
|
-
{
|
30
|
-
// variables can be accessed here as
|
31
|
-
// c.x, c.y, c.x2, c.y2, c.w, c.h
|
32
|
-
if (timeout != null)
|
33
|
-
clearTimeout(timeout);
|
34
|
-
|
35
|
-
timeout = setTimeout(function() {
|
36
|
-
console.log("change url")
|
37
|
-
$("#out").attr("src", "/blob/v1/crop_"+c.w+"x"+c.h+"+"+c.x+"+"+c.y+".presentation/crop.png")
|
38
|
-
$("#croplink").text("/blob/v1/crop_"+c.w+"x"+c.h+"+"+c.x+"+"+c.y+".presentation/crop.png")
|
39
|
-
}, 150);
|
40
|
-
};
|
41
|
-
</script>
|
42
|
-
</head>
|
43
|
-
|
44
|
-
<style>
|
45
|
-
/* Your individual styles here, or just use inline styles if that’s
|
46
|
-
what you want. */
|
47
|
-
.experteer {
|
48
|
-
background: white url('experteer.png') 50% 50% no-repeat !important;
|
49
|
-
}
|
50
|
-
|
51
|
-
.slides.template-default > article:not(.nobackground):not(.biglogo) {
|
52
|
-
background: url('experteer.png') 690px 625px no-repeat !important;
|
53
|
-
|
54
|
-
background-color: white !important;
|
55
|
-
}
|
56
|
-
|
57
|
-
</style>
|
58
|
-
|
59
|
-
<body style='display: none'>
|
60
|
-
|
61
|
-
<section class='slides layout-regular template-default'>
|
62
|
-
|
63
|
-
<!-- Your slides (<article>s) go here. Delete or comment out the
|
64
|
-
slides below. -->
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
<article class='biglogo experteer'>
|
69
|
-
</article>
|
70
|
-
|
71
|
-
<article>
|
72
|
-
<h1>
|
73
|
-
Blobsterix
|
74
|
-
</h1>
|
75
|
-
<h2>A new way to manage (binary) content
|
76
|
-
</h2>
|
77
|
-
<p>
|
78
|
-
Daniel Sudmann
|
79
|
-
<br>
|
80
|
-
Nov, 18 2013
|
81
|
-
</p>
|
82
|
-
</article>
|
83
|
-
|
84
|
-
<article>
|
85
|
-
<h1>History</h1>
|
86
|
-
</article>
|
87
|
-
|
88
|
-
<article>
|
89
|
-
<h3>
|
90
|
-
History
|
91
|
-
</h3>
|
92
|
-
<ul>
|
93
|
-
<li>Currently all binary content is served through the application servers
|
94
|
-
(cpu cicles, traffic)</li>
|
95
|
-
<li>All images have to be saved in all relevant formats at all times</li>
|
96
|
-
<li>Introducing new formats/sizes is PITA</li>
|
97
|
-
<li>Optimizing for mobile (WebP) is hard (content negotiation not
|
98
|
-
implemented/hard to do)</li>
|
99
|
-
<li>Lots of code just to handle binaries</li>
|
100
|
-
</ul>
|
101
|
-
</article>
|
102
|
-
|
103
|
-
<article>
|
104
|
-
<h1>Blobsterix</h1>
|
105
|
-
</article>
|
106
|
-
|
107
|
-
<article>
|
108
|
-
<h3>
|
109
|
-
Higher level goals
|
110
|
-
</h3>
|
111
|
-
<ul>
|
112
|
-
<li>Give flexibility for storing arbitrary things and transform them</li>
|
113
|
-
<li>Give flexibility for optimizations (mobile)</li>
|
114
|
-
<li>Extract service to make main app smaller</li>
|
115
|
-
<li>Releasing Blobsterix as OS to show how cool we are (HR)</li>
|
116
|
-
<li>Give challenging task to students</li>
|
117
|
-
<li>Exploring new technologies</li>
|
118
|
-
</ul>
|
119
|
-
</article>
|
120
|
-
|
121
|
-
|
122
|
-
<article>
|
123
|
-
<h1>Requirements (main)</h1>
|
124
|
-
</article>
|
125
|
-
|
126
|
-
<article>
|
127
|
-
<h3>
|
128
|
-
Goals
|
129
|
-
</h3>
|
130
|
-
<ul>
|
131
|
-
<li>Only store one source version of a file in the permanent storage</li>
|
132
|
-
<li>Be able to serve the file in different formats</li>
|
133
|
-
<li>Caching the derived versions of a file</li>
|
134
|
-
<li>Manage access to formats and file without the application backend</li>
|
135
|
-
<li>No application code in Blobsterix (zero config, share
|
136
|
-
nothing)</li>
|
137
|
-
</ul>
|
138
|
-
</article>
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
<article>
|
143
|
-
<h1>
|
144
|
-
Examples
|
145
|
-
</h1>
|
146
|
-
</article>
|
147
|
-
|
148
|
-
<article>
|
149
|
-
<h3>
|
150
|
-
Cropping
|
151
|
-
</h3>
|
152
|
-
<p>
|
153
|
-
<img id="target" src='crop.png'>
|
154
|
-
<div id="croplink"></div>
|
155
|
-
<img style="border-color: black;border: solid" id="out">
|
156
|
-
<script language="Javascript">
|
157
|
-
jQuery(function($) {
|
158
|
-
$('#target').Jcrop({
|
159
|
-
onSelect: showCoords,
|
160
|
-
onChange: showCoords
|
161
|
-
});
|
162
|
-
});
|
163
|
-
</script>
|
164
|
-
</p>
|
165
|
-
</article>
|
166
|
-
|
167
|
-
<article>
|
168
|
-
<h3>
|
169
|
-
Scaling
|
170
|
-
</h3>
|
171
|
-
<form>
|
172
|
-
<input id="scale"><button id="scalebutton">Scale</button>
|
173
|
-
<img id="scaletarget" src='syncview21.png'>
|
174
|
-
</form>
|
175
|
-
<div id="scalelink"></div>
|
176
|
-
<script language="Javascript">
|
177
|
-
jQuery(function($) {
|
178
|
-
$('#scalebutton').click(function(){
|
179
|
-
$("#scalelink").text("/blob/v1/resize_"+$('#scale').val()+".presentation/syncview21.png")
|
180
|
-
$("#scaletarget").attr("src", "/blob/v1/resize_"+$('#scale').val()+".presentation/syncview21.png")
|
181
|
-
});
|
182
|
-
});
|
183
|
-
</script>
|
184
|
-
</article>
|
185
|
-
|
186
|
-
|
187
|
-
<article>
|
188
|
-
<h3>
|
189
|
-
Use cases
|
190
|
-
</h3>
|
191
|
-
<ul>
|
192
|
-
<li>It allows for on the fly transformation of images (format and
|
193
|
-
content) </li>
|
194
|
-
<li>It does content negotiation with the client</li>
|
195
|
-
<li>Images can be scaled, cropped, recolored and even water marked</li>
|
196
|
-
<li>PDFs could be renderer to html</li>
|
197
|
-
<li>URLs contents could be downloaded and be cached (job
|
198
|
-
screenshots ;-) )</li>
|
199
|
-
<li>http://cloudinary.com/</li>
|
200
|
-
</ul>
|
201
|
-
</article>
|
202
|
-
|
203
|
-
<article>
|
204
|
-
<h1>
|
205
|
-
Dependencies
|
206
|
-
</h1>
|
207
|
-
<ul>
|
208
|
-
<li>ruby 1.9 (fibers)</li>
|
209
|
-
<li>lighttpd 1.5 (if you want X-Sendfile)</li>
|
210
|
-
<li>goliath</li>
|
211
|
-
</ul>
|
212
|
-
</article>
|
213
|
-
|
214
|
-
<article>
|
215
|
-
<h1>
|
216
|
-
Architecture
|
217
|
-
</h1>
|
218
|
-
</article>
|
219
|
-
|
220
|
-
<article>
|
221
|
-
<h3>
|
222
|
-
Interface
|
223
|
-
</h3>
|
224
|
-
<ol>
|
225
|
-
<li>A s3 compatible interface that allows upload and download of content
|
226
|
-
(internal use only)</li>
|
227
|
-
<li>An external access point that serves content transformed for the
|
228
|
-
client (manipulation secured and time secured)</li>
|
229
|
-
</ol>
|
230
|
-
</article>
|
231
|
-
|
232
|
-
<article>
|
233
|
-
<h3>
|
234
|
-
Internal architecture
|
235
|
-
</h3>
|
236
|
-
<p>
|
237
|
-
<img src="images/arch1.png" width="600px"/>
|
238
|
-
</p>
|
239
|
-
</article>
|
240
|
-
|
241
|
-
<article>
|
242
|
-
<h3>
|
243
|
-
Going forward
|
244
|
-
</h3>
|
245
|
-
<p>
|
246
|
-
Making it robust and production ready until end of November (monitoring, client
|
247
|
-
code)
|
248
|
-
</p>
|
249
|
-
<p>
|
250
|
-
Development of migration plan because of the dependencies. Either
|
251
|
-
change our ops and/or wait until we're ruby 2.0 capable.
|
252
|
-
</p>
|
253
|
-
<p>
|
254
|
-
Migrate current assets system to Blobsterix until Q2
|
255
|
-
</p>
|
256
|
-
</article>
|
257
|
-
|
258
|
-
<article>
|
259
|
-
<h3>
|
260
|
-
Thank you! - Questions?
|
261
|
-
</h3>
|
262
|
-
</article>
|
263
|
-
|
264
|
-
</section>
|
265
|
-
|
266
|
-
</body>
|
267
|
-
</html>
|
Binary file
|
Binary file
|