Skip to content

Commit 9709834

Browse files
Merge pull request #8 from adampweb/master
Fix: delete empty files, Compose command fixes
2 parents 780e453 + 7799837 commit 9709834

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ services:
66
image: wayback_machine_downloader:latest
77
container_name: wayback_machine_downloader
88
environment:
9-
- DEVELOPMENT=${DEVELOPMENT:-production}
9+
- ENVIRONMENT=${DEVELOPMENT:-production}
1010
- OPTIONS=${OPTIONS:-""}
1111
- TARGET_URL=${TARGET_URL}
1212
volumes:
1313
- .:/build:rw
14-
- ./websites:/build/websites:rw
15-
command: --directory /build/websites ${OPTIONS} ${TARGET_URL}
14+
- ./websites:/websites:rw
15+
command: /build/bin/wayback_machine_downloader ${TARGET_URL} ${OPTIONS}

lib/wayback_machine_downloader.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def download_file (file_remote_info, http)
567567
"#{file_url} -> #{file_path} (#{@processed_file_count + 1}/#{@total_to_download})"
568568
rescue StandardError => e
569569
msg = "Failed: #{file_url} # #{e} (#{@processed_file_count + 1}/#{@total_to_download})"
570-
if not @all and File.exist?(file_path) and File.size(file_path) == 0
570+
if File.exist?(file_path) and File.size(file_path) == 0
571571
File.delete(file_path)
572572
msg += "\n#{file_path} was empty and was removed."
573573
end

wayback_machine_downloader.gemspec

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
require './lib/wayback_machine_downloader'
2-
31
Gem::Specification.new do |s|
42
s.name = "wayback_machine_downloader_straw"
5-
s.version = WaybackMachineDownloader::VERSION
3+
s.version = "2.3.5"
64
s.executables << "wayback_machine_downloader"
75
s.summary = "Download an entire website from the Wayback Machine."
86
s.description = "Download complete websites from the Internet Archive's Wayback Machine. While the Wayback Machine (archive.org) excellently preserves web history, it lacks a built-in export functionality; this gem does just that, allowing you to download entire archived websites. (This is a significant rewrite of the original wayback_machine_downloader gem by hartator, with enhanced features and performance improvements.)"
@@ -11,7 +9,7 @@ Gem::Specification.new do |s|
119
s.files = ["lib/wayback_machine_downloader.rb", "lib/wayback_machine_downloader/tidy_bytes.rb", "lib/wayback_machine_downloader/to_regex.rb", "lib/wayback_machine_downloader/archive_api.rb"]
1210
s.homepage = "https://github.com/StrawberryMaster/wayback-machine-downloader"
1311
s.license = "MIT"
14-
s.required_ruby_version = ">= 1.9.2"
12+
s.required_ruby_version = ">= 3.4.3"
1513
s.add_runtime_dependency "concurrent-ruby", "~> 1.3", ">= 1.3.4"
1614
s.add_development_dependency "rake", "~> 12.2"
1715
s.add_development_dependency "minitest", "~> 5.2"

0 commit comments

Comments
 (0)