extract-repo 1.0.0 → 1.0.1

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/lib/extract_repo.rb +10 -9
  4. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 279cf409025efec16fd9702f281e213c19ee215e41340c78e7cc62b35aa8037e
4
- data.tar.gz: bd23103eaeff5ff2868be10536d7a9b39ff34638d400ec9e229c7e923812de0b
3
+ metadata.gz: 15cf547876dbeff2a89010599da34fa02508c979804787b36f608d3f4db0ca3f
4
+ data.tar.gz: 4f69d206da7c660fe30b9b10121c1660aa2032fac8530089e76329967cc4c91f
5
5
  SHA512:
6
- metadata.gz: 416ff6088a903de40c826759ddea2b2a9c832694b28337c98f68bd1c79eb6a1df7d2fa45abc3bc93ff94ee0d921040f5f28acda92365d67cfb4c92f4f033df77
7
- data.tar.gz: 365e8e721796a98af15384a837b929a70402235e5706d3cfc440546b68ec322e1ab47d8ecb29e9d51ae5fc80db7e8b578fcca5558f0dd5ecfb4afaed87c454ed
6
+ metadata.gz: 48e031237d42eb395e351100584d8aaa50c2b90cf48415fe7303ecf98b06144efed583099719efcd3f5f9f163f8ae6953310d029fa913026e206bff3a8ee00c4
7
+ data.tar.gz: 2b2bdd9407d33713b01bdde2d4b9a63dceb64e59d14143ba95935ef7b957c687db1632c6c78156734a752fe6ccb4e40c1349bf6eff01b75514049747207992eb
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## [1.0.1] - 2026-11-04
2
+
3
+ - Handle FileUtils not being loaded in Ruby 4
4
+ - Support appending file paths with "/" without breaking things
5
+
1
6
  ## [0.0.14] - 2025-07-31
2
7
 
3
8
  - Bump deps and use 1.x.x versions of foobara gems
data/lib/extract_repo.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "uri"
2
2
  require "English"
3
+ require "fileutils"
3
4
 
4
5
  require "foobara/all"
5
6
 
@@ -79,9 +80,9 @@ class ExtractRepo < Foobara::Command
79
80
  replace_sha1s = replace_sha1s.chomp.split("\n")
80
81
  replace_sha1s.each do |replace_sha1|
81
82
  # It seems like some versions of git do not create replace markers when doing this
82
- # :nocov:
83
+ # simplecov:disable
83
84
  sh "git replace -d #{replace_sha1}"
84
- # :nocov:
85
+ # simplecov:enable
85
86
  end
86
87
  end
87
88
  end
@@ -92,20 +93,20 @@ class ExtractRepo < Foobara::Command
92
93
 
93
94
  paths.each do |path|
94
95
  unless File.exist?(path)
95
- # :nocov:
96
+ # simplecov:disable
96
97
  raise "Path #{path} does not exist in repo #{output_path}"
97
- # :nocov:
98
+ # simplecov:enable
98
99
  end
99
100
 
100
101
  if File.directory?(path)
101
- Dir.glob("#{path}/**/*").each do |file|
102
+ Dir.glob(File.join(path, "/**/*")).each do |file|
102
103
  file_paths << file if File.file?(file)
103
104
  end
104
105
  else
105
106
  # TODO: test this path
106
- # :nocov:
107
+ # simplecov:disable
107
108
  file_paths << path
108
- # :nocov:
109
+ # simplecov:enable
109
110
  end
110
111
  end
111
112
  end
@@ -199,9 +200,9 @@ class ExtractRepo < Foobara::Command
199
200
  result = `#{cmd}`
200
201
 
201
202
  unless $CHILD_STATUS.success?
202
- # :nocov:
203
+ # simplecov:disable
203
204
  raise "Command #{cmd} failed with status #{$CHILD_STATUS.exitstatus}: #{result}"
204
- # :nocov:
205
+ # simplecov:enable
205
206
  end
206
207
 
207
208
  result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extract-repo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -71,13 +71,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
71
  - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: 3.4.0
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: '4.1'
74
77
  required_rubygems_version: !ruby/object:Gem::Requirement
75
78
  requirements:
76
79
  - - ">="
77
80
  - !ruby/object:Gem::Version
78
81
  version: '0'
79
82
  requirements: []
80
- rubygems_version: 3.6.9
83
+ rubygems_version: 4.0.20
81
84
  specification_version: 4
82
85
  summary: Extract code from one repository into a new repository, preserving history
83
86
  of the extracted files.