tempfile 0.1.3 → 0.2.0
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/.github/workflows/test.yml +10 -4
- data/Gemfile +1 -0
- data/Rakefile +0 -7
- data/lib/tempfile.rb +3 -1
- data/tempfile.gemspec +10 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 441e2cb96bc4f1d0c808dbde645e2985849607d7edd297b2e26fa427094eaa59
|
4
|
+
data.tar.gz: fcaf9af92f27ac9c91877ae3542dcada76e95e4c31196fbf01fa7a6213d47fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 664dd5cdf708cf51e87f1ed8b375bf754c48dfecac717c119cfff8298018132762a4debc1b65d420128071ef6db28f893e589a5f0dc6a5e13738afc167c7436b
|
7
|
+
data.tar.gz: 4237b4700b4a8d365931e286e1e199a79c362f70ce9349d1c19bc43fb2a78f461b384e4ba1e49c7ca8967d0ae474865018c45481c8813d979bf63a47561cd2bf
|
data/.github/workflows/test.yml
CHANGED
@@ -3,15 +3,21 @@ name: ubuntu
|
|
3
3
|
on: [push, pull_request]
|
4
4
|
|
5
5
|
jobs:
|
6
|
-
|
6
|
+
ruby-versions:
|
7
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
8
|
+
with:
|
9
|
+
engine: cruby
|
10
|
+
min_version: 2.5
|
11
|
+
test:
|
12
|
+
needs: ruby-versions
|
7
13
|
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
|
8
14
|
strategy:
|
9
15
|
matrix:
|
10
|
-
ruby:
|
11
|
-
os: [ ubuntu-latest, macos-latest ]
|
16
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
17
|
+
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
12
18
|
runs-on: ${{ matrix.os }}
|
13
19
|
steps:
|
14
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
15
21
|
- name: Set up Ruby
|
16
22
|
uses: ruby/setup-ruby@v1
|
17
23
|
with:
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -7,11 +7,4 @@ Rake::TestTask.new(:test) do |t|
|
|
7
7
|
t.test_files = FileList["test/**/test_*.rb"]
|
8
8
|
end
|
9
9
|
|
10
|
-
task :sync_tool do
|
11
|
-
require 'fileutils'
|
12
|
-
FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
|
13
|
-
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
|
14
|
-
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
|
15
|
-
end
|
16
|
-
|
17
10
|
task :default => :test
|
data/lib/tempfile.rb
CHANGED
@@ -57,7 +57,7 @@ require 'tmpdir'
|
|
57
57
|
# Note that Tempfile.create returns a File instance instead of a Tempfile, which
|
58
58
|
# also avoids the overhead and complications of delegation.
|
59
59
|
#
|
60
|
-
# Tempfile.
|
60
|
+
# Tempfile.create('foo') do |file|
|
61
61
|
# # ...do something with file...
|
62
62
|
# end
|
63
63
|
#
|
@@ -88,6 +88,8 @@ require 'tmpdir'
|
|
88
88
|
# mutex.
|
89
89
|
class Tempfile < DelegateClass(File)
|
90
90
|
|
91
|
+
VERSION = "0.2.0"
|
92
|
+
|
91
93
|
# Creates a file in the underlying file system;
|
92
94
|
# returns a new \Tempfile object based on that file.
|
93
95
|
#
|
data/tempfile.gemspec
CHANGED
@@ -1,6 +1,13 @@
|
|
1
|
+
name = File.basename(__FILE__, ".gemspec")
|
2
|
+
version = ["lib", Array.new(name.count("-")+1).join("/")].find do |dir|
|
3
|
+
break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
|
4
|
+
/^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
|
5
|
+
end rescue nil
|
6
|
+
end
|
7
|
+
|
1
8
|
Gem::Specification.new do |spec|
|
2
|
-
spec.name =
|
3
|
-
spec.version =
|
9
|
+
spec.name = name
|
10
|
+
spec.version = version
|
4
11
|
spec.authors = ["Yukihiro Matsumoto"]
|
5
12
|
spec.email = ["matz@ruby-lang.org"]
|
6
13
|
|
@@ -16,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
16
23
|
# Specify which files should be added to the gem when it is released.
|
17
24
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
25
|
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
-
`git ls-files -z 2
|
26
|
+
`git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
27
|
end
|
21
28
|
spec.require_paths = ["lib"]
|
22
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tempfile
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yukihiro Matsumoto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A utility class for managing temporary files.
|
14
14
|
email:
|
@@ -50,7 +50,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
50
50
|
- !ruby/object:Gem::Version
|
51
51
|
version: '0'
|
52
52
|
requirements: []
|
53
|
-
rubygems_version: 3.
|
53
|
+
rubygems_version: 3.5.0.dev
|
54
54
|
signing_key:
|
55
55
|
specification_version: 4
|
56
56
|
summary: A utility class for managing temporary files.
|