mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 08:11:56 +02:00
mostly finished port to ruby3
This commit is contained in:
parent
a9dd102383
commit
0ca1473d22
30 changed files with 765 additions and 731 deletions
|
@ -13,6 +13,7 @@ class Archive < Sequel::Model
|
|||
end
|
||||
|
||||
def unpin
|
||||
return nil
|
||||
# Not ideal. An SoA version is in progress.
|
||||
if ENV['RACK_ENV'] == 'production' && $config['ipfs_ssh_host'] && $config['ipfs_ssh_user']
|
||||
rbox = Rye::Box.new $config['ipfs_ssh_host'], :user => $config['ipfs_ssh_user']
|
||||
|
|
|
@ -763,10 +763,11 @@ class Site < Sequel::Model
|
|||
purge_cache path
|
||||
end
|
||||
|
||||
Rye::Cmd.add_command :ipfs
|
||||
#Rye::Cmd.add_command :ipfs
|
||||
|
||||
def add_to_ipfs
|
||||
# Not ideal. An SoA version is in progress.
|
||||
return nil
|
||||
|
||||
if archives_dataset.count > Archive::MAXIMUM_ARCHIVES_PER_SITE
|
||||
archives_dataset.order(:updated_at).first.destroy
|
||||
|
@ -833,7 +834,7 @@ class Site < Sequel::Model
|
|||
path = scrubbed_path path
|
||||
relative_path = files_path path
|
||||
|
||||
if Dir.exists?(relative_path) || File.exist?(relative_path)
|
||||
if Dir.exist?(relative_path) || File.exist?(relative_path)
|
||||
return 'Directory (or file) already exists.'
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue