aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Étienne Deparis 2020-03-22 14:44:21 +0100
committerGravatar Étienne Deparis 2020-03-22 14:44:21 +0100
commit13fda5e9bfbb9e76b4dd162a282f104782c1ea1c (patch)
treecc3e0d457d4f31a85b583ff6792dae8d706fb677
parent41f6009055520a83bb61e1521bf97860ab0fbb43 (diff)
downloadneruda-13fda5e9bfbb9e76b4dd162a282f104782c1ea1c.zip
neruda-13fda5e9bfbb9e76b4dd162a282f104782c1ea1c.tar.gz
neruda-13fda5e9bfbb9e76b4dd162a282f104782c1ea1c.tar.xz
Use throbber for publishing task too
And use the right word for the right task: publishing for publishing and building for building (was publishing for building…)
-rw-r--r--lib/tasks/site.rake4
-rw-r--r--lib/tasks/sync.rake8
2 files changed, 8 insertions, 4 deletions
diff --git a/lib/tasks/site.rake b/lib/tasks/site.rake
index 610f41b..ae60393 100644
--- a/lib/tasks/site.rake
+++ b/lib/tasks/site.rake
@@ -29,7 +29,7 @@ namespace :site do
Neruda::OrgFile.new(nil, verbose: Rake::FileUtilsExt.verbose_flag).publish
end
begin
- Neruda::Utils.throbber(build_html, 'Publishing:')
+ Neruda::Utils.throbber(build_html, 'Building:')
rescue RuntimeError
warn 'Aborting'
next
@@ -55,7 +55,7 @@ namespace :site do
Neruda::OrgFile.new(args[:source], verbose: verbose).publish
end
begin
- Neruda::Utils.throbber(o, 'Publishing:')
+ Neruda::Utils.throbber(o, 'Building:')
rescue RuntimeError
warn 'Aborting'
next
diff --git a/lib/tasks/sync.rake b/lib/tasks/sync.rake
index 78a4fc9..77dc6dc 100644
--- a/lib/tasks/sync.rake
+++ b/lib/tasks/sync.rake
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'neruda/config'
+require 'neruda/utils'
def rsync_command(verbose, test = nil)
rsync_command = Neruda::Config.settings['rsync']
@@ -24,7 +25,10 @@ namespace :sync do
next
end
public_folder = Neruda::Config.settings['public_folder']
- sh [rsync_command(Rake::FileUtilsExt.verbose_flag, args[:test?]),
- "#{public_folder}/", remote_path].join(' ')
+ publish_thread = Thread.new do
+ sh [rsync_command(Rake::FileUtilsExt.verbose_flag, args[:test?]),
+ "#{public_folder}/", remote_path].join(' ')
+ end
+ Neruda::Utils.throbber(publish_thread, 'Publishing:')
end
end