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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 59da517113ac08b4c37ae3dcbaa3df4eb990f5f580a7b039830b7dcd3dd23e1b
4
- data.tar.gz: e6e6efb2cdf60669ad754f9d88448c5ef131e101aed975a05b190b7366c41c11
3
+ metadata.gz: 441e2cb96bc4f1d0c808dbde645e2985849607d7edd297b2e26fa427094eaa59
4
+ data.tar.gz: fcaf9af92f27ac9c91877ae3542dcada76e95e4c31196fbf01fa7a6213d47fea
5
5
  SHA512:
6
- metadata.gz: 2e91fa0f70049a3bd1c666c8378423598b1a42dd8d5592d6a048c78d3de2522bd424b76e4701164f6e04e2a377b074a7eefa3e21bb0e9313baf8eed1aca5e532
7
- data.tar.gz: e28714f6b8d3a724d688289e6eabca3362e56ba0bd4104e9ea973bebfd97ee1fdfd509b3048243fdb241d54d8c18541b7b79a162aff4bc85f3d2b9fffa3b365c
6
+ metadata.gz: 664dd5cdf708cf51e87f1ed8b375bf754c48dfecac717c119cfff8298018132762a4debc1b65d420128071ef6db28f893e589a5f0dc6a5e13738afc167c7436b
7
+ data.tar.gz: 4237b4700b4a8d365931e286e1e199a79c362f70ce9349d1c19bc43fb2a78f461b384e4ba1e49c7ca8967d0ae474865018c45481c8813d979bf63a47561cd2bf
@@ -3,15 +3,21 @@ name: ubuntu
3
3
  on: [push, pull_request]
4
4
 
5
5
  jobs:
6
- build:
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: [ 3.1, '3.0', 2.7, 2.6, 2.5, head ]
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@v3
20
+ - uses: actions/checkout@v4
15
21
  - name: Set up Ruby
16
22
  uses: ruby/setup-ruby@v1
17
23
  with:
data/Gemfile CHANGED
@@ -4,3 +4,4 @@ gemspec
4
4
 
5
5
  gem "rake"
6
6
  gem "test-unit"
7
+ gem "test-unit-ruby-core"
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.open('foo') do |file|
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 = "tempfile"
3
- spec.version = "0.1.3"
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>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
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.1.3
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: 2022-12-14 00:00:00.000000000 Z
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.4.0.dev
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.