zip_tricks 4.4.0 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -1
- data/lib/zip_tricks/rails_streaming.rb +6 -0
- data/lib/zip_tricks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4fb7180cf39e2f4acbae7edc62614e0d391f5ab
|
4
|
+
data.tar.gz: 88bcc21c47233036a05f5a8cd1d4a99f8eecc1fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6fd5a5d297bc276c3f0853561490611bd42dc014d764eb6f9d9e297592703aaf9b5116409589d380f35d25d8f83cfee7217098f808fd07f3b134123c53b9b70
|
7
|
+
data.tar.gz: 29e47a62795eaffd99c2c8e8b17bbedb51cc7f3f470802b6f73412ecbe1751585387c5bdd82e7115600ad06821e5d75bead2d96f9870526a481f228f87c572ad
|
data/Rakefile
CHANGED
@@ -3,7 +3,9 @@ require "rspec/core/rake_task"
|
|
3
3
|
require 'yard'
|
4
4
|
|
5
5
|
YARD::Rake::YardocTask.new(:doc) do |t|
|
6
|
-
|
6
|
+
# The dash has to be between the two to "divide" the source files and
|
7
|
+
# miscellaneous documentation files that contain no code
|
8
|
+
t.files = ['lib/**/*.rb', '-', 'LICENSE.txt', 'IMPLEMENTATION_DETAILS.md']
|
7
9
|
end
|
8
10
|
|
9
11
|
RSpec::Core::RakeTask.new(:spec)
|
@@ -1,4 +1,10 @@
|
|
1
|
+
# Should be included into a Rails controller (together with `ActionController::Live`)
|
2
|
+
# for easy ZIP output from any action.
|
1
3
|
module ZipTricks::RailsStreaming
|
4
|
+
# Opens a {ZipTricks::Streamer} and yields it to the caller. The output of the streamer
|
5
|
+
# gets automatically forwarded to the Rails response stream. When the output completes,
|
6
|
+
# the Rails response stream is going to be closed automatically.
|
7
|
+
# @yield [Streamer] the streamer that can be written to
|
2
8
|
def zip_tricks_stream
|
3
9
|
response.headers['Content-Type'] = 'application/zip'
|
4
10
|
# Create a wrapper for the write call that quacks like something you
|
data/lib/zip_tricks/version.rb
CHANGED