tempfile 0.3.1 → 0.3.2
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/.document +2 -1
- data/.rdoc_options +2 -0
- data/lib/tempfile.rb +7 -5
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66fe503ef4feb468a33171a344ffe0e4f61bdd7c680ca6eb686bfb1b94b6c849
|
|
4
|
+
data.tar.gz: 64ec264184369f5074c90adffd32219c9f68690f35c12fef8498e8e5319461be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8191bd4f5ed740140ca44ad145ba8fd21b3ed82a815f8299f8a578771c32493d93baa72b6221ca884428154f421191e7f9913ab0de7870a2da23d190c22f61f
|
|
7
|
+
data.tar.gz: c9c3274a900add1befb6d815dd21d34c39e978d5c25596ece51fa030f3e127f29a2d4078bfcd900ea9cb5b9c58e700b4c569484ca8c92910203ccd701a108d38
|
data/.document
CHANGED
data/.rdoc_options
ADDED
data/lib/tempfile.rb
CHANGED
|
@@ -29,7 +29,7 @@ require 'tmpdir'
|
|
|
29
29
|
# require 'tempfile'
|
|
30
30
|
#
|
|
31
31
|
# # Tempfile.create with a block
|
|
32
|
-
# # The filename are
|
|
32
|
+
# # The filename are chosen automatically.
|
|
33
33
|
# # (You can specify the prefix and suffix of the filename by an optional argument.)
|
|
34
34
|
# Tempfile.create {|f|
|
|
35
35
|
# f.puts "foo"
|
|
@@ -157,7 +157,7 @@ require 'tmpdir'
|
|
|
157
157
|
class Tempfile < DelegateClass(File)
|
|
158
158
|
|
|
159
159
|
# The version
|
|
160
|
-
VERSION = "0.3.
|
|
160
|
+
VERSION = "0.3.2"
|
|
161
161
|
|
|
162
162
|
# Creates a file in the underlying file system;
|
|
163
163
|
# returns a new \Tempfile object based on that file.
|
|
@@ -390,7 +390,7 @@ class Tempfile < DelegateClass(File)
|
|
|
390
390
|
$stderr.puts "removing #{@path}..." if $DEBUG
|
|
391
391
|
begin
|
|
392
392
|
File.unlink(@path)
|
|
393
|
-
rescue Errno::ENOENT
|
|
393
|
+
rescue Errno::ENOENT, Errno::EACCES
|
|
394
394
|
end
|
|
395
395
|
$stderr.puts "done" if $DEBUG
|
|
396
396
|
end
|
|
@@ -550,8 +550,8 @@ end
|
|
|
550
550
|
#
|
|
551
551
|
# Implementation note:
|
|
552
552
|
#
|
|
553
|
-
# The keyword argument
|
|
554
|
-
# O_TMPFILE is used on Linux.
|
|
553
|
+
# The keyword argument <tt>anonymous=true</tt> is implemented using +FILE_SHARE_DELETE+ on Windows.
|
|
554
|
+
# +O_TMPFILE+ is used on Linux.
|
|
555
555
|
#
|
|
556
556
|
# Related: Tempfile.new.
|
|
557
557
|
#
|
|
@@ -564,6 +564,8 @@ def Tempfile.create(basename="", tmpdir=nil, mode: 0, anonymous: false, **option
|
|
|
564
564
|
end
|
|
565
565
|
|
|
566
566
|
class << Tempfile
|
|
567
|
+
# :stopdoc:
|
|
568
|
+
|
|
567
569
|
private def create_with_filename(basename="", tmpdir=nil, mode: 0, **options)
|
|
568
570
|
tmpfile = nil
|
|
569
571
|
Dir::Tmpname.create(basename, tmpdir, **options) do |tmpname, n, opts|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: tempfile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yukihiro Matsumoto
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies: []
|
|
13
12
|
description: A utility class for managing temporary files.
|
|
14
13
|
email:
|
|
@@ -18,6 +17,7 @@ extensions: []
|
|
|
18
17
|
extra_rdoc_files: []
|
|
19
18
|
files:
|
|
20
19
|
- ".document"
|
|
20
|
+
- ".rdoc_options"
|
|
21
21
|
- BSDL
|
|
22
22
|
- COPYING
|
|
23
23
|
- README.md
|
|
@@ -30,7 +30,6 @@ licenses:
|
|
|
30
30
|
metadata:
|
|
31
31
|
homepage_uri: https://github.com/ruby/tempfile
|
|
32
32
|
source_code_uri: https://github.com/ruby/tempfile
|
|
33
|
-
post_install_message:
|
|
34
33
|
rdoc_options: []
|
|
35
34
|
require_paths:
|
|
36
35
|
- lib
|
|
@@ -45,8 +44,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
45
44
|
- !ruby/object:Gem::Version
|
|
46
45
|
version: '0'
|
|
47
46
|
requirements: []
|
|
48
|
-
rubygems_version: 3.
|
|
49
|
-
signing_key:
|
|
47
|
+
rubygems_version: 3.6.9
|
|
50
48
|
specification_version: 4
|
|
51
49
|
summary: A utility class for managing temporary files.
|
|
52
50
|
test_files: []
|