nanoc 3.3.0 → 3.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.md +7 -0
- data/README.md +1 -0
- data/bin/nanoc +7 -0
- data/lib/nanoc.rb +1 -1
- data/lib/nanoc/base/compilation/filter.rb +1 -1
- data/lib/nanoc/base/plugin_registry.rb +6 -0
- data/lib/nanoc/cli/commands/deploy.rb +3 -2
- data/lib/nanoc/cli/error_handler.rb +1 -0
- data/lib/nanoc3.rb +3 -0
- data/lib/nanoc3/cli.rb +3 -0
- data/lib/nanoc3/tasks.rb +3 -0
- data/test/cli/commands/test_deploy.rb +28 -0
- metadata +18 -15
data/NEWS.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# nanoc news
|
2
2
|
|
3
|
+
## 3.3.1 (2012-02-18)
|
4
|
+
|
5
|
+
* Fixed issue with long paths on Windows
|
6
|
+
* Fixed a few deployer crashes
|
7
|
+
* Added nanoc3.rb, nanoc3/tasks.rb, … for compatibility with older versions
|
8
|
+
* Made nanoc setup Bundler at startup [John Nishinaga]
|
9
|
+
|
3
10
|
## 3.3 (2012-02-12)
|
4
11
|
|
5
12
|
Base:
|
data/README.md
CHANGED
data/bin/nanoc
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# encoding: utf-8
|
3
3
|
|
4
|
+
# Try loading bundler if it's possible
|
5
|
+
begin
|
6
|
+
require 'bundler/setup'
|
7
|
+
rescue LoadError
|
8
|
+
# no problem
|
9
|
+
end
|
10
|
+
|
4
11
|
# Add lib to load path
|
5
12
|
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
|
6
13
|
|
data/lib/nanoc.rb
CHANGED
@@ -117,7 +117,7 @@ module Nanoc
|
|
117
117
|
def output_filename
|
118
118
|
@output_filename ||= begin
|
119
119
|
FileUtils.mkdir_p(TMP_BINARY_ITEMS_DIR)
|
120
|
-
tempfile = Tempfile.new(
|
120
|
+
tempfile = Tempfile.new('', TMP_BINARY_ITEMS_DIR)
|
121
121
|
new_filename = tempfile.path
|
122
122
|
tempfile.close!
|
123
123
|
|
@@ -50,6 +50,12 @@ module Nanoc
|
|
50
50
|
registry.register(klass, class_or_name, *identifiers)
|
51
51
|
end
|
52
52
|
|
53
|
+
# @return [Hash<Symbol, Class>] All plugins of this type, with keys
|
54
|
+
# being the identifiers and values the plugin classes
|
55
|
+
def all
|
56
|
+
Nanoc::Plugin.find_all(self)
|
57
|
+
end
|
58
|
+
|
53
59
|
# Returns the plugin with the given name (identifier)
|
54
60
|
#
|
55
61
|
# @param [String] name The name of the plugin class to find
|
@@ -53,14 +53,15 @@ module Nanoc::CLI::Commands
|
|
53
53
|
end
|
54
54
|
|
55
55
|
# Get deployer
|
56
|
+
names = Nanoc::Extra::Deployer.all.keys
|
56
57
|
name = config.fetch(:kind) do
|
57
58
|
$stderr.puts "The specified deploy target does not have a kind."
|
58
|
-
$stderr.puts "(expected one of #{
|
59
|
+
$stderr.puts "(expected one of #{names.join(', ')})"
|
59
60
|
exit 1
|
60
61
|
end
|
61
62
|
deployer_class = Nanoc::Extra::Deployer.named(name) do
|
62
63
|
$stderr.puts "The specified deploy target has an unrecognised kind (#{kind})."
|
63
|
-
$stderr.puts "(expected one of #{
|
64
|
+
$stderr.puts "(expected one of #{names.join(', ')})"
|
64
65
|
exit 1
|
65
66
|
end
|
66
67
|
|
data/lib/nanoc3.rb
ADDED
data/lib/nanoc3/cli.rb
ADDED
data/lib/nanoc3/tasks.rb
ADDED
@@ -71,4 +71,32 @@ class Nanoc::CLI::Commands::DeployTest < MiniTest::Unit::TestCase
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
+
def test_deploy_without_kind
|
75
|
+
if_have 'systemu' do
|
76
|
+
with_site do |site|
|
77
|
+
File.open('config.yaml', 'w') do |io|
|
78
|
+
io.write "deploy:\n"
|
79
|
+
io.write " public:\n"
|
80
|
+
io.write " dst: mydestination"
|
81
|
+
end
|
82
|
+
|
83
|
+
FileUtils.mkdir_p('output')
|
84
|
+
File.open('output/blah.html', 'w') { |io| io.write 'moo' }
|
85
|
+
|
86
|
+
ios = capturing_stdio do
|
87
|
+
assert_raises SystemExit do
|
88
|
+
Nanoc::CLI.run %w( deploy -t public )
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
assert ios[:stdout].empty?
|
93
|
+
assert ios[:stderr].include?('The specified deploy target does not have a kind.')
|
94
|
+
assert ios[:stderr].include?('(expected one of ')
|
95
|
+
|
96
|
+
refute File.directory?('mydestination')
|
97
|
+
refute File.file?('mydestination/blah.html')
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
74
102
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cri
|
16
|
-
requirement: &
|
16
|
+
requirement: &70230609637420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '2.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70230609637420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: minitest
|
27
|
-
requirement: &
|
27
|
+
requirement: &70230609637020 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70230609637020
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: mocha
|
38
|
-
requirement: &
|
38
|
+
requirement: &70230609636560 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70230609636560
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &70230609652500 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70230609652500
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rdiscount
|
60
|
-
requirement: &
|
60
|
+
requirement: &70230609652080 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70230609652080
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: yard
|
71
|
-
requirement: &
|
71
|
+
requirement: &70230609651660 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70230609651660
|
80
80
|
description: nanoc is a simple but very flexible static site generator written in
|
81
81
|
Ruby. It operates on local files, and therefore does not run on the server. nanoc
|
82
82
|
“compiles” the local source files into HTML (usually), by evaluating eRuby, Markdown,
|
@@ -228,6 +228,9 @@ files:
|
|
228
228
|
- lib/nanoc/tasks/validate.rake
|
229
229
|
- lib/nanoc/tasks.rb
|
230
230
|
- lib/nanoc.rb
|
231
|
+
- lib/nanoc3/cli.rb
|
232
|
+
- lib/nanoc3/tasks.rb
|
233
|
+
- lib/nanoc3.rb
|
231
234
|
- tasks/doc.rake
|
232
235
|
- tasks/test.rake
|
233
236
|
- test/base/core_ext/array_spec.rb
|
@@ -366,7 +369,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
369
|
version: '0'
|
367
370
|
requirements: []
|
368
371
|
rubyforge_project:
|
369
|
-
rubygems_version: 1.8.
|
372
|
+
rubygems_version: 1.8.16
|
370
373
|
signing_key:
|
371
374
|
specification_version: 3
|
372
375
|
summary: a web publishing system written in Ruby for building small to medium-sized
|