nandoc 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/nandoc/deployers/rsync.rb +13 -0
- data/lib/nandoc/tasks/nandoc/deploy.rake +16 -0
- data/lib/nandoc/tasks.rb +11 -0
- data/proto/default/Rakefile +1 -0
- data/proto/default/config.yaml +4 -4
- metadata +6 -3
@@ -0,0 +1,13 @@
|
|
1
|
+
module NanDoc::Deployers
|
2
|
+
class Rsync < ::Nanoc3::Extra::Deployers::Rsync
|
3
|
+
#
|
4
|
+
# just shows the command to $stdout before running it for debugging
|
5
|
+
#
|
6
|
+
|
7
|
+
def run_shell_cmd(args)
|
8
|
+
$stdout.puts "rsync command: "
|
9
|
+
$stdout.puts args.join(' ') # we should be shelljoining but whatever
|
10
|
+
super(args)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
namespace :nandoc do
|
2
|
+
namespace :deploy do
|
3
|
+
prefix = ::NanDoc::Tasks::Prefix
|
4
|
+
desc "#{prefix} Upload the compiled site using rsync, shows command"
|
5
|
+
task :rsync do
|
6
|
+
require 'nandoc/deployers/rsync'
|
7
|
+
|
8
|
+
dry_run = !!ENV['dry_run']
|
9
|
+
config_name = ENV['config'] || :default
|
10
|
+
|
11
|
+
deployer = NanDoc::Deployers::Rsync.new
|
12
|
+
|
13
|
+
deployer.run(:config_name => config_name, :dry_run => dry_run)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/nandoc/tasks.rb
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# copy-paste-altered from nanoc3
|
2
|
+
|
3
|
+
require 'nandoc'
|
4
|
+
require 'rake'
|
5
|
+
|
6
|
+
module NanDoc::Tasks
|
7
|
+
Prefix = "\e[35mnanDoc\e[0m " # @todo etc
|
8
|
+
end
|
9
|
+
|
10
|
+
# Dir[File.dirname(__FILE__) + '/tasks/**/*.rb'].each { |f| load f }
|
11
|
+
Dir[File.dirname(__FILE__) + '/tasks/**/*.rake'].each { |f| Rake.application.add_import(f) }
|
data/proto/default/Rakefile
CHANGED
data/proto/default/config.yaml
CHANGED
@@ -20,13 +20,13 @@ index_filenames: [ 'index.html' ]
|
|
20
20
|
enable_output_diff: false
|
21
21
|
|
22
22
|
|
23
|
-
# nanDoc: here is an example deployment config node.
|
24
|
-
# uncomment this, get it right, and try `rake deploy:rsync` from your mysite
|
23
|
+
# nanDoc: here is an example deployment config node.
|
24
|
+
# uncomment this, get it right, and try `rake deploy:rsync` from your mysite
|
25
25
|
# directory
|
26
26
|
# deploy:
|
27
27
|
# default:
|
28
|
-
# dst: "hipeland.org:/var/
|
29
|
-
#
|
28
|
+
# dst: "hipeland.org:/var/sites/nandoc.hipeland.org"
|
29
|
+
#
|
30
30
|
|
31
31
|
# The data sources where nanoc loads its data from. This is an array of
|
32
32
|
# hashes; each array element represents a single data source. By default,
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Chip Malice
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-12 00:00:00 -04:00
|
18
18
|
default_executable: nandoc
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -85,6 +85,7 @@ files:
|
|
85
85
|
- lib/nandoc/config.rb
|
86
86
|
- lib/nandoc/cri-hacks.rb
|
87
87
|
- lib/nandoc/data-source.rb
|
88
|
+
- lib/nandoc/deployers/rsync.rb
|
88
89
|
- lib/nandoc/filters.rb
|
89
90
|
- lib/nandoc/helpers.rb
|
90
91
|
- lib/nandoc/helpers/menu-bouncy.rb
|
@@ -110,6 +111,8 @@ files:
|
|
110
111
|
- lib/nandoc/support/site-merge.rb
|
111
112
|
- lib/nandoc/support/site-methods.rb
|
112
113
|
- lib/nandoc/support/stream-colorizer.rb
|
114
|
+
- lib/nandoc/tasks.rb
|
115
|
+
- lib/nandoc/tasks/nandoc/deploy.rake
|
113
116
|
- lib/nandoc/test/diff-to-string.rb
|
114
117
|
- lib/nandoc/test/minitest-extlib.rb
|
115
118
|
- lib/nandoc/treebis/NOGIT-DOCS/NEWS.md
|