nanoc 2.0 → 2.0.1

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 CHANGED
@@ -1,6 +1,11 @@
1
1
  nanoc Release Notes
2
2
  ===================
3
3
 
4
+ 2.0.1
5
+ -----
6
+
7
+ * Fixed a "too many open files" error that could appear during (auto)compiling
8
+
4
9
  2.0
5
10
  ---
6
11
 
data/lib/nanoc.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  module Nanoc
2
2
 
3
- VERSION = '2.0'
3
+ VERSION = '2.0.1'
4
4
 
5
5
  def self.load_file(*path)
6
6
  full_path = [ File.dirname(__FILE__), 'nanoc' ] + path
@@ -48,12 +48,10 @@ module Nanoc
48
48
 
49
49
  # Setup child-parent links
50
50
  @pages.each do |page|
51
- # Skip pages without parent
52
- next if page.path == '/'
53
-
54
51
  # Get parent
55
52
  parent_path = page.path.sub(/[^\/]+\/$/, '')
56
53
  parent = @pages.find { |p| p.path == parent_path }
54
+ next if parent.nil? or page.path == '/'
57
55
 
58
56
  # Link
59
57
  page.parent = parent
@@ -1,5 +1,19 @@
1
1
  module Nanoc::DataSource::Filesystem
2
2
 
3
+ class FileProxy
4
+
5
+ instance_methods.each { |m| undef_method m unless m =~ /^__/ }
6
+
7
+ def initialize(path)
8
+ @path = path
9
+ end
10
+
11
+ def method_missing(sym, *args, &block)
12
+ File.new(@path).__send__(sym, *args, &block)
13
+ end
14
+
15
+ end
16
+
3
17
  class FilesystemDataSource < Nanoc::DataSource
4
18
 
5
19
  ########## Attributes ##########
@@ -117,7 +131,7 @@ module Nanoc::DataSource::Filesystem
117
131
  file = content_file_for_dir(File.dirname(filename))
118
132
  extras = {
119
133
  :path => path,
120
- :file => file,
134
+ :file => FileProxy.new(file.path),
121
135
  :uncompiled_content => file.read
122
136
  }
123
137
 
metadata CHANGED
@@ -1,33 +1,26 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: nanoc
5
3
  version: !ruby/object:Gem::Version
6
- version: "2.0"
7
- date: 2007-12-25 00:00:00 +01:00
8
- summary: a tool that runs on your local computer and compiles Markdown, Textile, Haml, ... documents into static web pages
9
- require_paths:
10
- - lib
11
- email: denis.defreyne@stoneship.org
12
- homepage: http://nanoc.stoneship.org/
13
- rubyforge_project: nanoc
14
- description: a tool that runs on your local computer and compiles Markdown, Textile, Haml, ... documents into static web pages
15
- autorequire:
16
- default_executable:
17
- bindir: bin
18
- has_rdoc: false
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 1.8.2
24
- version:
4
+ version: 2.0.1
25
5
  platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
6
  authors:
30
7
  - Denis Defreyne
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-01-21 00:00:00 +01:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: a tool that runs on your local computer and compiles Markdown, Textile, Haml, ... documents into static web pages
17
+ email: denis.defreyne@stoneship.org
18
+ executables:
19
+ - nanoc
20
+ extensions: []
21
+
22
+ extra_rdoc_files: []
23
+
31
24
  files:
32
25
  - README
33
26
  - LICENSE
@@ -66,17 +59,31 @@ files:
66
59
  - lib/nanoc/layout_processors/haml.rb
67
60
  - lib/nanoc/layout_processors/markaby.rb
68
61
  - lib/nanoc.rb
69
- test_files: []
70
-
62
+ has_rdoc: false
63
+ homepage: http://nanoc.stoneship.org/
64
+ post_install_message:
71
65
  rdoc_options: []
72
66
 
73
- extra_rdoc_files: []
74
-
75
- executables:
76
- - nanoc
77
- extensions: []
78
-
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: 1.8.2
74
+ version:
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: "0"
80
+ version:
79
81
  requirements: []
80
82
 
81
- dependencies: []
83
+ rubyforge_project: nanoc
84
+ rubygems_version: 1.0.1
85
+ signing_key:
86
+ specification_version: 2
87
+ summary: a tool that runs on your local computer and compiles Markdown, Textile, Haml, ... documents into static web pages
88
+ test_files: []
82
89