jackal-assets 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/jackal-assets.gemspec +5 -4
- data/lib/jackal-assets.rb +1 -0
- data/lib/jackal-assets/store.rb +17 -1
- data/lib/jackal-assets/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4bc8c0c49326a4b8e56be79342274f4de88b84e
|
4
|
+
data.tar.gz: f78f2fe8b037cbddc97011537447a2e8a7c68b00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 314035b18ea541805b5cba2f342ff7dfea4d40563dd56d45ff0fc78153d44f2ee93178f366a9abf7eb601d36098e82dda81640f37f2068831614646bb6af44dd
|
7
|
+
data.tar.gz: 2e97f9fdd7d9b7929610d369fa4393155df9719c52cdc9f2deb15621988f00dc0d047cbb249c4a7a7b03073949f97612365c4e1dbdd17be20d07cbefc4cf6652
|
data/CHANGELOG.md
CHANGED
data/jackal-assets.gemspec
CHANGED
@@ -10,9 +10,10 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = 'Jackal Assets'
|
11
11
|
s.license = 'Apache 2.0'
|
12
12
|
s.require_path = 'lib'
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
s.
|
13
|
+
s.add_runtime_dependency 'jackal'
|
14
|
+
s.add_runtime_dependency 'miasma'
|
15
|
+
s.add_runtime_dependency 'miasma-local'
|
16
|
+
s.add_runtime_dependency 'rubyzip'
|
17
|
+
s.add_runtime_dependency 'bogo', '> 0.1.14'
|
17
18
|
s.files = Dir['{lib}/**/**/*'] + %w(jackal-assets.gemspec README.md CHANGELOG.md)
|
18
19
|
end
|
data/lib/jackal-assets.rb
CHANGED
data/lib/jackal-assets/store.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'jackal-assets'
|
2
|
+
require 'tempfile'
|
2
3
|
require 'zip'
|
3
4
|
|
4
5
|
module Jackal
|
@@ -61,7 +62,22 @@ module Jackal
|
|
61
62
|
def get(key)
|
62
63
|
remote_file = bucket.files.reload.get(key)
|
63
64
|
if(remote_file)
|
64
|
-
remote_file.body.io
|
65
|
+
io = remote_file.body.io
|
66
|
+
if(io.respond_to?(:path))
|
67
|
+
io
|
68
|
+
else
|
69
|
+
e_file = Bogo::EphemeralFile.new('jackal-asset')
|
70
|
+
e_file.binmode
|
71
|
+
begin
|
72
|
+
while(data = io.readpartial(2048))
|
73
|
+
e_file.write data
|
74
|
+
end
|
75
|
+
rescue EOFError
|
76
|
+
end
|
77
|
+
e_file.flush
|
78
|
+
e_file.rewind
|
79
|
+
e_file
|
80
|
+
end
|
65
81
|
else
|
66
82
|
raise Error::NotFound.new "Remote file does not exist! (<#{bucket}>:#{key})"
|
67
83
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jackal-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jackal
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bogo
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.1.14
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.1.14
|
69
83
|
description: Jackal Assets
|
70
84
|
email: code@chrisroberts.org
|
71
85
|
executables: []
|