diff options
author | Saverio Miroddi <saverio.pub2@gmail.com> | 2017-08-15 18:49:28 +0200 |
---|---|---|
committer | Saverio Miroddi <saverio.pub2@gmail.com> | 2017-08-15 18:49:28 +0200 |
commit | cd80a9075f5f2b3150c909a6cd56e7c8f239bd51 (patch) | |
tree | 58f0fba91c72ec86cc744f026d62d06050b20efa /lib/file_streamer.rb | |
parent | 1d6ba597028142511af8c9863f81073278ccd927 (diff) | |
parent | 97b768508c360d2ae767a559b5037fe464061440 (diff) | |
download | gitlab-ce-cd80a9075f5f2b3150c909a6cd56e7c8f239bd51.tar.gz |
Merge branch 'master' into sm-cherry-pick-list-commits-in-message
Diffstat (limited to 'lib/file_streamer.rb')
-rw-r--r-- | lib/file_streamer.rb | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/file_streamer.rb b/lib/file_streamer.rb deleted file mode 100644 index 4e3c6d3c773..00000000000 --- a/lib/file_streamer.rb +++ /dev/null @@ -1,16 +0,0 @@ -class FileStreamer #:nodoc: - attr_reader :to_path - - def initialize(path) - @to_path = path - end - - # Stream the file's contents if Rack::Sendfile isn't present. - def each - File.open(to_path, 'rb') do |file| - while chunk = file.read(16384) - yield chunk - end - end - end -end |