nanoc 2.1.6 → 2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ChangeLog +3 -221
- data/Rakefile +9 -51
- data/bin/nanoc +5 -2
- data/lib/nanoc.rb +9 -31
- data/lib/nanoc/base.rb +26 -0
- data/lib/nanoc/base/core_ext.rb +2 -0
- data/lib/nanoc/base/filter.rb +11 -41
- data/lib/nanoc/base/layout.rb +1 -5
- data/lib/nanoc/base/page_rep.rb +1 -1
- data/lib/nanoc/base/proxies.rb +5 -0
- data/lib/nanoc/base/site.rb +4 -2
- data/lib/nanoc/binary_filters.rb +1 -0
- data/lib/nanoc/cli.rb +9 -1
- data/lib/nanoc/cli/base.rb +41 -129
- data/lib/nanoc/cli/commands.rb +10 -0
- data/lib/nanoc/cli/commands/autocompile.rb +1 -1
- data/lib/nanoc/cli/commands/compile.rb +51 -13
- data/lib/nanoc/cli/commands/create_layout.rb +1 -1
- data/lib/nanoc/cli/commands/create_page.rb +1 -1
- data/lib/nanoc/cli/commands/create_site.rb +1 -1
- data/lib/nanoc/cli/commands/create_template.rb +1 -1
- data/lib/nanoc/cli/commands/help.rb +1 -1
- data/lib/nanoc/cli/commands/info.rb +1 -1
- data/lib/nanoc/cli/commands/switch.rb +1 -1
- data/lib/nanoc/cli/commands/update.rb +1 -1
- data/lib/nanoc/cli/logger.rb +13 -7
- data/lib/nanoc/data_sources.rb +2 -0
- data/lib/nanoc/data_sources/filesystem.rb +3 -38
- data/lib/nanoc/extra.rb +6 -0
- data/lib/nanoc/extra/core_ext.rb +2 -0
- data/lib/nanoc/extra/vcses.rb +5 -0
- data/lib/nanoc/filters.rb +14 -0
- data/lib/nanoc/filters/erb.rb +3 -2
- data/lib/nanoc/filters/haml.rb +1 -1
- data/lib/nanoc/filters/markaby.rb +0 -1
- data/lib/nanoc/filters/rainpress.rb +13 -0
- data/lib/nanoc/filters/relativize_paths.rb +25 -0
- data/lib/nanoc/filters/sass.rb +1 -0
- data/lib/nanoc/helpers.rb +9 -0
- data/lib/nanoc/helpers/blogging.rb +55 -12
- data/lib/nanoc/helpers/filtering.rb +54 -0
- data/lib/nanoc/helpers/link_to.rb +40 -0
- data/lib/nanoc/helpers/text.rb +38 -0
- data/lib/nanoc/helpers/xml_sitemap.rb +3 -2
- data/lib/nanoc/routers.rb +3 -0
- data/vendor/cri/ChangeLog +0 -0
- data/vendor/cri/LICENSE +19 -0
- data/vendor/cri/NEWS +0 -0
- data/vendor/cri/README +4 -0
- data/vendor/cri/Rakefile +25 -0
- data/vendor/cri/lib/cri.rb +12 -0
- data/vendor/cri/lib/cri/base.rb +153 -0
- data/{lib/nanoc/cli → vendor/cri/lib/cri}/command.rb +5 -6
- data/vendor/cri/lib/cri/core_ext.rb +8 -0
- data/vendor/cri/lib/cri/core_ext/string.rb +41 -0
- data/{lib/nanoc/cli → vendor/cri/lib/cri}/option_parser.rb +35 -17
- data/vendor/cri/test/test_base.rb +6 -0
- data/vendor/cri/test/test_command.rb +6 -0
- data/vendor/cri/test/test_core_ext.rb +21 -0
- data/vendor/cri/test/test_option_parser.rb +279 -0
- data/vendor/mime-types/lib/mime/types.rb +1558 -0
- metadata +45 -9
- data/lib/nanoc/base/enhancements.rb +0 -14
- data/lib/nanoc/cli/cli.rb +0 -16
- data/lib/nanoc/cli/ext.rb +0 -37
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: 2.
|
4
|
+
version: "2.2"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-04-06 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -38,9 +38,9 @@ files:
|
|
38
38
|
- lib/nanoc/base/core_ext
|
39
39
|
- lib/nanoc/base/core_ext/hash.rb
|
40
40
|
- lib/nanoc/base/core_ext/string.rb
|
41
|
+
- lib/nanoc/base/core_ext.rb
|
41
42
|
- lib/nanoc/base/data_source.rb
|
42
43
|
- lib/nanoc/base/defaults.rb
|
43
|
-
- lib/nanoc/base/enhancements.rb
|
44
44
|
- lib/nanoc/base/filter.rb
|
45
45
|
- lib/nanoc/base/layout.rb
|
46
46
|
- lib/nanoc/base/notification_center.rb
|
@@ -54,16 +54,17 @@ files:
|
|
54
54
|
- lib/nanoc/base/proxies/layout_proxy.rb
|
55
55
|
- lib/nanoc/base/proxies/page_proxy.rb
|
56
56
|
- lib/nanoc/base/proxies/page_rep_proxy.rb
|
57
|
+
- lib/nanoc/base/proxies.rb
|
57
58
|
- lib/nanoc/base/proxy.rb
|
58
59
|
- lib/nanoc/base/router.rb
|
59
60
|
- lib/nanoc/base/site.rb
|
60
61
|
- lib/nanoc/base/template.rb
|
62
|
+
- lib/nanoc/base.rb
|
61
63
|
- lib/nanoc/binary_filters
|
62
64
|
- lib/nanoc/binary_filters/image_science_thumbnail.rb
|
65
|
+
- lib/nanoc/binary_filters.rb
|
63
66
|
- lib/nanoc/cli
|
64
67
|
- lib/nanoc/cli/base.rb
|
65
|
-
- lib/nanoc/cli/cli.rb
|
66
|
-
- lib/nanoc/cli/command.rb
|
67
68
|
- lib/nanoc/cli/commands
|
68
69
|
- lib/nanoc/cli/commands/autocompile.rb
|
69
70
|
- lib/nanoc/cli/commands/compile.rb
|
@@ -75,19 +76,20 @@ files:
|
|
75
76
|
- lib/nanoc/cli/commands/info.rb
|
76
77
|
- lib/nanoc/cli/commands/switch.rb
|
77
78
|
- lib/nanoc/cli/commands/update.rb
|
78
|
-
- lib/nanoc/cli/
|
79
|
+
- lib/nanoc/cli/commands.rb
|
79
80
|
- lib/nanoc/cli/logger.rb
|
80
|
-
- lib/nanoc/cli/option_parser.rb
|
81
81
|
- lib/nanoc/cli.rb
|
82
82
|
- lib/nanoc/data_sources
|
83
83
|
- lib/nanoc/data_sources/filesystem.rb
|
84
84
|
- lib/nanoc/data_sources/filesystem_combined.rb
|
85
|
+
- lib/nanoc/data_sources.rb
|
85
86
|
- lib/nanoc/extra
|
86
87
|
- lib/nanoc/extra/auto_compiler.rb
|
87
88
|
- lib/nanoc/extra/context.rb
|
88
89
|
- lib/nanoc/extra/core_ext
|
89
90
|
- lib/nanoc/extra/core_ext/hash.rb
|
90
91
|
- lib/nanoc/extra/core_ext/time.rb
|
92
|
+
- lib/nanoc/extra/core_ext.rb
|
91
93
|
- lib/nanoc/extra/file_proxy.rb
|
92
94
|
- lib/nanoc/extra/vcs.rb
|
93
95
|
- lib/nanoc/extra/vcses
|
@@ -96,6 +98,8 @@ files:
|
|
96
98
|
- lib/nanoc/extra/vcses/git.rb
|
97
99
|
- lib/nanoc/extra/vcses/mercurial.rb
|
98
100
|
- lib/nanoc/extra/vcses/subversion.rb
|
101
|
+
- lib/nanoc/extra/vcses.rb
|
102
|
+
- lib/nanoc/extra.rb
|
99
103
|
- lib/nanoc/filters
|
100
104
|
- lib/nanoc/filters/bluecloth.rb
|
101
105
|
- lib/nanoc/filters/erb.rb
|
@@ -104,35 +108,67 @@ files:
|
|
104
108
|
- lib/nanoc/filters/markaby.rb
|
105
109
|
- lib/nanoc/filters/maruku.rb
|
106
110
|
- lib/nanoc/filters/old.rb
|
111
|
+
- lib/nanoc/filters/rainpress.rb
|
107
112
|
- lib/nanoc/filters/rdiscount.rb
|
108
113
|
- lib/nanoc/filters/rdoc.rb
|
109
114
|
- lib/nanoc/filters/redcloth.rb
|
115
|
+
- lib/nanoc/filters/relativize_paths.rb
|
110
116
|
- lib/nanoc/filters/rubypants.rb
|
111
117
|
- lib/nanoc/filters/sass.rb
|
118
|
+
- lib/nanoc/filters.rb
|
112
119
|
- lib/nanoc/helpers
|
113
120
|
- lib/nanoc/helpers/blogging.rb
|
114
121
|
- lib/nanoc/helpers/capturing.rb
|
122
|
+
- lib/nanoc/helpers/filtering.rb
|
115
123
|
- lib/nanoc/helpers/html_escape.rb
|
116
124
|
- lib/nanoc/helpers/link_to.rb
|
117
125
|
- lib/nanoc/helpers/render.rb
|
118
126
|
- lib/nanoc/helpers/tagging.rb
|
127
|
+
- lib/nanoc/helpers/text.rb
|
119
128
|
- lib/nanoc/helpers/xml_sitemap.rb
|
129
|
+
- lib/nanoc/helpers.rb
|
120
130
|
- lib/nanoc/routers
|
121
131
|
- lib/nanoc/routers/default.rb
|
122
132
|
- lib/nanoc/routers/no_dirs.rb
|
123
133
|
- lib/nanoc/routers/versioned.rb
|
134
|
+
- lib/nanoc/routers.rb
|
124
135
|
- lib/nanoc.rb
|
136
|
+
- vendor/cri
|
137
|
+
- vendor/cri/ChangeLog
|
138
|
+
- vendor/cri/lib
|
139
|
+
- vendor/cri/lib/cri
|
140
|
+
- vendor/cri/lib/cri/base.rb
|
141
|
+
- vendor/cri/lib/cri/command.rb
|
142
|
+
- vendor/cri/lib/cri/core_ext
|
143
|
+
- vendor/cri/lib/cri/core_ext/string.rb
|
144
|
+
- vendor/cri/lib/cri/core_ext.rb
|
145
|
+
- vendor/cri/lib/cri/option_parser.rb
|
146
|
+
- vendor/cri/lib/cri.rb
|
147
|
+
- vendor/cri/LICENSE
|
148
|
+
- vendor/cri/NEWS
|
149
|
+
- vendor/cri/Rakefile
|
150
|
+
- vendor/cri/README
|
151
|
+
- vendor/cri/test
|
152
|
+
- vendor/cri/test/test_base.rb
|
153
|
+
- vendor/cri/test/test_command.rb
|
154
|
+
- vendor/cri/test/test_core_ext.rb
|
155
|
+
- vendor/cri/test/test_option_parser.rb
|
156
|
+
- vendor/mime-types
|
157
|
+
- vendor/mime-types/lib
|
158
|
+
- vendor/mime-types/lib/mime
|
159
|
+
- vendor/mime-types/lib/mime/types.rb
|
125
160
|
has_rdoc: true
|
126
161
|
homepage: http://nanoc.stoneship.org/
|
127
162
|
post_install_message: |-
|
128
163
|
------------------------------------------------------------------------------
|
129
|
-
Thanks for installing nanoc 2.
|
164
|
+
Thanks for installing nanoc 2.2! Here are some resources to help you get started:
|
130
165
|
|
131
166
|
* The tutorial at <http://nanoc.stoneship.org/help/tutorial/>
|
132
167
|
* The manual at <http://nanoc.stoneship.org/help/manual/>
|
133
168
|
* The discussion group at <http://groups.google.com/group/nanoc>
|
134
169
|
|
135
|
-
|
170
|
+
Be sure to check out the nanoc blog at <http://nanoc.stoneship.org/blog/> for
|
171
|
+
details about this release.
|
136
172
|
|
137
173
|
Enjoy!
|
138
174
|
------------------------------------------------------------------------------
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Convenience function for printing warnings
|
2
|
-
def warn(s, pre='WARNING')
|
3
|
-
$stderr.puts "#{pre}: #{s}"
|
4
|
-
end
|
5
|
-
|
6
|
-
############################# OLD AND DEPRECATED #############################
|
7
|
-
|
8
|
-
def nanoc_require(x)
|
9
|
-
warn(
|
10
|
-
"'nanoc_require' is deprecated and will be removed in a future version. Please use 'require' instead.",
|
11
|
-
'DEPRECATION WARNING'
|
12
|
-
)
|
13
|
-
require x
|
14
|
-
end
|
data/lib/nanoc/cli/cli.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Nanoc::CLI # :nodoc:
|
2
|
-
end
|
3
|
-
|
4
|
-
# Load extensions
|
5
|
-
Nanoc.load('cli', 'ext.rb')
|
6
|
-
Nanoc.load('cli', 'option_parser.rb')
|
7
|
-
|
8
|
-
# Load logger
|
9
|
-
Nanoc.load('cli', 'logger.rb')
|
10
|
-
|
11
|
-
# Load commands
|
12
|
-
Nanoc.load('cli', 'command.rb')
|
13
|
-
Nanoc.load('cli', 'commands', '*.rb')
|
14
|
-
|
15
|
-
# Load base
|
16
|
-
Nanoc.load('cli', 'base.rb')
|
data/lib/nanoc/cli/ext.rb
DELETED
@@ -1,37 +0,0 @@
|
|
1
|
-
class String
|
2
|
-
|
3
|
-
# Word-wraps and indents the string.
|
4
|
-
#
|
5
|
-
# +width+:: The maximal width of each line. This also includes indentation,
|
6
|
-
# i.e. the actual maximal width of the text is width-indentation.
|
7
|
-
#
|
8
|
-
# +indentation+:: The number of spaces to indent each wrapped line.
|
9
|
-
def wrap_and_indent(width, indentation)
|
10
|
-
# Split into paragraphs
|
11
|
-
paragraphs = self.split("\n").map { |p| p.strip }.reject { |p| p == '' }
|
12
|
-
|
13
|
-
# Wrap and indent each paragraph
|
14
|
-
paragraphs.map do |paragraph|
|
15
|
-
# Initialize
|
16
|
-
lines = []
|
17
|
-
line = ''
|
18
|
-
|
19
|
-
# Split into words
|
20
|
-
paragraph.split(/\s/).each do |word|
|
21
|
-
# Begin new line if it's too long
|
22
|
-
if (line + ' ' + word).length >= width
|
23
|
-
lines << line
|
24
|
-
line = ''
|
25
|
-
end
|
26
|
-
|
27
|
-
# Add word to line
|
28
|
-
line += (line == '' ? '' : ' ' ) + word
|
29
|
-
end
|
30
|
-
lines << line
|
31
|
-
|
32
|
-
# Join lines
|
33
|
-
lines.map { |l| ' '*indentation + l }.join("\n")
|
34
|
-
end.join("\n\n")
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|