lib/active_storage/previewer.rb in activestorage-6.1.7.10 vs lib/active_storage/previewer.rb in activestorage-7.0.0.alpha1

- old
+ new

@@ -24,11 +24,11 @@ raise NotImplementedError end private # Downloads the blob to a tempfile on disk. Yields the tempfile. - def download_blob_to_tempfile(&block) #:doc: + def download_blob_to_tempfile(&block) # :doc: blob.open tmpdir: tmpdir, &block end # Executes a system command, capturing its binary output in a tempfile. Yields the tempfile. # @@ -42,11 +42,11 @@ # end # end # end # # The output tempfile is opened in the directory returned by #tmpdir. - def draw(*argv) #:doc: + def draw(*argv) # :doc: open_tempfile do |file| instrument :preview, key: blob.key do capture(*argv, to: file) end @@ -81,14 +81,14 @@ end to.rewind end - def logger #:doc: + def logger # :doc: ActiveStorage.logger end - def tmpdir #:doc: + def tmpdir # :doc: Dir.tmpdir end end end