nanoc3 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +31 -0
- data/NEWS.md +5 -0
- data/lib/nanoc3.rb +1 -1
- data/lib/nanoc3/base/compiler.rb +3 -0
- data/lib/nanoc3/base/item_rep.rb +28 -14
- metadata +4 -3
data/Gemfile
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gem "cri"
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem "minitest"
|
7
|
+
gem "mocha"
|
8
|
+
gem "yard"
|
9
|
+
end
|
10
|
+
|
11
|
+
group :extra do
|
12
|
+
gem "adsf"
|
13
|
+
gem "bluecloth"
|
14
|
+
gem "builder"
|
15
|
+
gem "coderay"
|
16
|
+
gem "erubis"
|
17
|
+
gem "haml"
|
18
|
+
gem "kramdown"
|
19
|
+
gem "less"
|
20
|
+
gem "markaby"
|
21
|
+
gem "maruku"
|
22
|
+
gem "mime-types"
|
23
|
+
gem "nokogiri"
|
24
|
+
gem "rack"
|
25
|
+
gem "rainpress"
|
26
|
+
gem "rdiscount"
|
27
|
+
gem "rdoc"
|
28
|
+
gem "RedCloth"
|
29
|
+
gem "rubypants"
|
30
|
+
gem "w3c_validators"
|
31
|
+
end
|
data/NEWS.md
CHANGED
data/lib/nanoc3.rb
CHANGED
data/lib/nanoc3/base/compiler.rb
CHANGED
@@ -156,6 +156,9 @@ module Nanoc3
|
|
156
156
|
rescue Nanoc3::Errors::UnmetDependency => e
|
157
157
|
puts "*** Attempt failed due to unmet dependency on #{e.rep.inspect}" if $DEBUG
|
158
158
|
|
159
|
+
# Reinitialize rep
|
160
|
+
rep.forget_progress
|
161
|
+
|
159
162
|
# Save rep to compile it later
|
160
163
|
inactive_reps << rep
|
161
164
|
|
data/lib/nanoc3/base/item_rep.rb
CHANGED
@@ -95,20 +95,7 @@ module Nanoc3
|
|
95
95
|
@binary = @item.binary?
|
96
96
|
|
97
97
|
# Initialize content and filenames
|
98
|
-
|
99
|
-
@filenames = {
|
100
|
-
:raw => @item.raw_filename,
|
101
|
-
:last => @item.raw_filename
|
102
|
-
}
|
103
|
-
@content = {}
|
104
|
-
else
|
105
|
-
@content = {
|
106
|
-
:raw => @item.raw_content,
|
107
|
-
:last => @item.raw_content,
|
108
|
-
:pre => @item.raw_content
|
109
|
-
}
|
110
|
-
@filenames = {}
|
111
|
-
end
|
98
|
+
initialize_content
|
112
99
|
@old_content = nil
|
113
100
|
|
114
101
|
# Reset flags
|
@@ -248,6 +235,15 @@ module Nanoc3
|
|
248
235
|
compiled_content(:snapshot => snapshot)
|
249
236
|
end
|
250
237
|
|
238
|
+
# Resets the compilation progress for this item representation. This is
|
239
|
+
# necessary when an unmet dependency is detected during compilation.
|
240
|
+
# This method should probably not be called directly.
|
241
|
+
#
|
242
|
+
# @return [void]
|
243
|
+
def forget_progress
|
244
|
+
initialize_content
|
245
|
+
end
|
246
|
+
|
251
247
|
# Runs the item content through the given filter with the given arguments.
|
252
248
|
# This method will replace the content of the `:last` snapshot with the
|
253
249
|
# filtered content of the last snapshot.
|
@@ -410,6 +406,24 @@ module Nanoc3
|
|
410
406
|
|
411
407
|
private
|
412
408
|
|
409
|
+
def initialize_content
|
410
|
+
# Initialize content and filenames
|
411
|
+
if self.binary?
|
412
|
+
@filenames = {
|
413
|
+
:raw => @item.raw_filename,
|
414
|
+
:last => @item.raw_filename
|
415
|
+
}
|
416
|
+
@content = {}
|
417
|
+
else
|
418
|
+
@content = {
|
419
|
+
:raw => @item.raw_content,
|
420
|
+
:last => @item.raw_content,
|
421
|
+
:pre => @item.raw_content
|
422
|
+
}
|
423
|
+
@filenames = {}
|
424
|
+
end
|
425
|
+
end
|
426
|
+
|
413
427
|
def filter_named(name)
|
414
428
|
Nanoc3::Filter.named(name)
|
415
429
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 3
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 3.1.
|
8
|
+
- 2
|
9
|
+
version: 3.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Denis Defreyne
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-07 00:00:00 +02:00
|
18
18
|
default_executable: nanoc3
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -44,6 +44,7 @@ extra_rdoc_files:
|
|
44
44
|
- NEWS.md
|
45
45
|
files:
|
46
46
|
- ChangeLog
|
47
|
+
- Gemfile
|
47
48
|
- LICENSE
|
48
49
|
- NEWS.md
|
49
50
|
- Rakefile
|