nanoc 3.6.4 → 3.6.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nanoc (3.6.4)
4
+ nanoc (3.6.5)
5
5
  cri (~> 2.3)
6
6
 
7
7
  GEM
@@ -11,43 +11,42 @@ GEM
11
11
  adsf (1.1.1)
12
12
  rack (>= 1.0.0)
13
13
  bluecloth (2.2.0)
14
- builder (3.2.0)
14
+ builder (3.2.2)
15
15
  coderay (1.0.9)
16
16
  coffee-script (2.2.0)
17
17
  coffee-script-source
18
18
  execjs
19
- coffee-script-source (1.6.2)
19
+ coffee-script-source (1.6.3)
20
20
  colored (1.2)
21
21
  commonjs (0.2.6)
22
- cri (2.3.0)
22
+ cri (2.4.0)
23
23
  colored (>= 1.2)
24
24
  erubis (2.7.0)
25
- excon (0.20.1)
26
- execjs (1.4.0)
27
- multi_json (~> 1.0)
28
- ffi (1.8.1)
29
- fog (1.10.1)
25
+ excon (0.25.3)
26
+ execjs (2.0.1)
27
+ ffi (1.9.0)
28
+ fog (1.15.0)
30
29
  builder
31
- excon (~> 0.20)
30
+ excon (~> 0.25.0)
32
31
  formatador (~> 0.2.0)
33
32
  mime-types
34
33
  multi_json (~> 1.0)
35
34
  net-scp (~> 1.1)
36
35
  net-ssh (>= 2.1.3)
37
- nokogiri (~> 1.5.0)
36
+ nokogiri (~> 1.5)
38
37
  ruby-hmac
39
38
  formatador (0.2.4)
40
- haml (4.0.2)
39
+ haml (4.0.3)
41
40
  tilt
42
41
  handlebars (0.4.0)
43
42
  commonjs (~> 0.2.3)
44
43
  therubyracer (~> 0.11.1)
45
- json (1.7.7)
46
- kramdown (1.0.1)
47
- less (2.3.2)
44
+ json (1.8.0)
45
+ kramdown (1.2.0)
46
+ less (2.3.3)
48
47
  commonjs (~> 0.2.6)
49
48
  libv8 (3.11.8.17)
50
- listen (1.0.2)
49
+ listen (1.3.0)
51
50
  rb-fsevent (>= 0.9.3)
52
51
  rb-inotify (>= 0.9)
53
52
  rb-kqueue (>= 0.2)
@@ -56,63 +55,63 @@ GEM
56
55
  maruku (0.6.1)
57
56
  syntax (>= 1.0.0)
58
57
  metaclass (0.0.1)
59
- method_source (0.8.1)
60
- mime-types (1.23)
61
- minitest (4.7.3)
62
- mocha (0.13.3)
58
+ method_source (0.8.2)
59
+ mime-types (1.25)
60
+ minitest (4.7.5)
61
+ mocha (0.14.0)
63
62
  metaclass (~> 0.0.1)
64
- multi_json (1.7.2)
63
+ multi_json (1.7.9)
65
64
  mustache (0.99.4)
66
- net-scp (1.1.0)
65
+ net-scp (1.1.2)
67
66
  net-ssh (>= 2.6.5)
68
- net-ssh (2.6.7)
69
- nokogiri (1.5.9)
70
- pandoc-ruby (0.6.1)
67
+ net-ssh (2.6.8)
68
+ nokogiri (1.5.10)
69
+ pandoc-ruby (0.7.5)
71
70
  posix-spawn (0.3.6)
72
- pry (0.9.12.1)
71
+ pry (0.9.12.2)
73
72
  coderay (~> 1.0.5)
74
73
  method_source (~> 0.8)
75
74
  slop (~> 3.4)
76
- pygments.rb (0.5.0)
75
+ pygments.rb (0.5.2)
77
76
  posix-spawn (~> 0.3.6)
78
77
  yajl-ruby (~> 1.1.0)
79
78
  rack (1.5.2)
80
79
  rainpress (1.0)
81
- rake (10.0.4)
80
+ rake (10.1.0)
82
81
  rb-fsevent (0.9.3)
83
- rb-inotify (0.9.0)
82
+ rb-inotify (0.9.1)
84
83
  ffi (>= 0.5.0)
85
84
  rb-kqueue (0.2.0)
86
85
  ffi (>= 0.5.0)
87
- rdiscount (2.0.7.2)
86
+ rdiscount (2.1.6)
88
87
  rdoc (4.0.1)
89
88
  json (~> 1.4)
90
- redcarpet (2.2.2)
91
- ref (1.0.4)
89
+ redcarpet (3.0.0)
90
+ ref (1.0.5)
92
91
  ruby-hmac (0.4.0)
93
92
  rubypants (0.2.0)
94
- sass (3.2.8)
95
- slim (1.3.8)
96
- temple (~> 0.6.3)
97
- tilt (~> 1.3.3)
98
- slop (3.4.4)
93
+ sass (3.2.10)
94
+ slim (2.0.1)
95
+ temple (~> 0.6.6)
96
+ tilt (>= 1.3.3, < 2.1)
97
+ slop (3.4.6)
99
98
  syntax (1.0.0)
100
99
  systemu (2.5.2)
101
- temple (0.6.4)
100
+ temple (0.6.6)
102
101
  therubyracer (0.11.4)
103
102
  libv8 (~> 3.11.8.12)
104
103
  ref
105
- tilt (1.3.7)
106
- typogruby (1.0.15)
104
+ tilt (1.4.1)
105
+ typogruby (1.0.16)
107
106
  rubypants
108
- uglifier (2.0.1)
107
+ uglifier (2.2.1)
109
108
  execjs (>= 0.3.0)
110
109
  multi_json (~> 1.0, >= 1.0.2)
111
110
  w3c_validators (1.2)
112
111
  json
113
112
  nokogiri
114
113
  yajl-ruby (1.1.0)
115
- yard (0.8.6.1)
114
+ yard (0.8.7)
116
115
  yuicompressor (1.2.1)
117
116
 
118
117
  PLATFORMS
@@ -135,7 +134,7 @@ DEPENDENCIES
135
134
  markaby
136
135
  maruku
137
136
  mime-types
138
- minitest
137
+ minitest (~> 4.0)
139
138
  mocha
140
139
  mustache
141
140
  nanoc!
data/NEWS.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # nanoc news
2
2
 
3
+ ## 3.6.5 (2013-09-29)
4
+
5
+ Fixes:
6
+
7
+ * Fixed bug which could cause incorrect dependencies to be generated in some cases
8
+ * Fixed handling of index filenames when allowing periods in identifiers
9
+
3
10
  ## 3.6.4 (2013-05-29)
4
11
 
5
12
  Enhancements:
@@ -154,7 +161,7 @@ Improvements:
154
161
  ## 3.4 (2012-06-09)
155
162
 
156
163
  * Improved error output and added crash log
157
- * Renamed `debug` and `info` commands to `show-data` and `show-plugins`, respectively
164
+ * Renamed `debug` and `info` commands to `show-data` and `show-plugins`, respectively
158
165
  * Added `show-rules` command (aka `explain`)
159
166
 
160
167
  Extensions:
@@ -3,7 +3,7 @@
3
3
  module Nanoc
4
4
 
5
5
  # The current nanoc version.
6
- VERSION = '3.6.4'
6
+ VERSION = '3.6.5'
7
7
 
8
8
  # @return [String] A string containing information about this nanoc version
9
9
  # and its environment (Ruby engine and version, Rubygems version if any).
@@ -389,13 +389,14 @@ module Nanoc
389
389
  rep.compiled = true
390
390
  compiled_content_cache[rep] = rep.content
391
391
 
392
- Nanoc::NotificationCenter.post(:visit_ended, rep.item)
393
392
  Nanoc::NotificationCenter.post(:processing_ended, rep)
394
393
  Nanoc::NotificationCenter.post(:compilation_ended, rep)
395
394
  rescue => e
396
395
  rep.forget_progress
397
396
  Nanoc::NotificationCenter.post(:compilation_failed, rep, e)
398
397
  raise e
398
+ ensure
399
+ Nanoc::NotificationCenter.post(:visit_ended, rep.item)
399
400
  end
400
401
 
401
402
  # Clears the list of dependencies for items that will be recompiled.
@@ -70,6 +70,11 @@ module Nanoc
70
70
  #
71
71
  # @return [void]
72
72
  def stop
73
+ # Sanity check
74
+ if !@stack.empty?
75
+ raise "Internal inconsistency: dependency tracker stack not empty at end of compilation"
76
+ end
77
+
73
78
  # Unregister
74
79
  Nanoc::NotificationCenter.remove(:visit_started, self)
75
80
  Nanoc::NotificationCenter.remove(:visit_ended, self)
@@ -36,7 +36,7 @@ module Nanoc::DataSources
36
36
  #
37
37
  # (`allow_periods_in_identifiers` set to true)
38
38
  # foo.entry.html → /foo.entry/
39
- #
39
+ #
40
40
  # (`allow_periods_in_identifiers` set to false)
41
41
  # foo.html.erb → /foo/
42
42
  #
@@ -108,8 +108,8 @@ module Nanoc::DataSources
108
108
  # Returns the identifier derived from the given filename, first stripping
109
109
  # the given directory name off the filename.
110
110
  def identifier_for_filename(filename)
111
- if filename =~ /(^|\/)index\.[^\/]+$/
112
- regex = ((@config && @config[:allow_periods_in_identifiers]) ? /\/?index\.[^\/\.]+$/ : /\/?index\.[^\/]+$/)
111
+ if filename =~ /(^|\/)index(\.[^\/]+)?$/
112
+ regex = ((@config && @config[:allow_periods_in_identifiers]) ? /\/?(index)?(\.[^\/\.]+)?$/ : /\/?index(\.[^\/]+)?$/)
113
113
  else
114
114
  regex = ((@config && @config[:allow_periods_in_identifiers]) ? /\.[^\/\.]+$/ : /\.[^\/]+$/)
115
115
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
26
26
 
27
27
  s.add_runtime_dependency('cri', '~> 2.3')
28
28
 
29
- s.add_development_dependency('minitest')
29
+ s.add_development_dependency('minitest', '~> 4.0')
30
30
  s.add_development_dependency('mocha')
31
31
  s.add_development_dependency('rake')
32
32
  s.add_development_dependency('rdiscount')
@@ -556,4 +556,38 @@ class Nanoc::CompilerTest < Nanoc::TestCase
556
556
  end
557
557
  end
558
558
 
559
+ def test_compiler_dependency_on_unmet_dependency
560
+ with_site do
561
+ File.open('content/a.html', 'w') do |io|
562
+ io.write('<% @items["/b/"].compiled_content %>')
563
+ end
564
+ File.open('content/b.html', 'w') do |io|
565
+ io.write('I am feeling so dependent!')
566
+ end
567
+ File.open('Rules', 'w') do |io|
568
+ io.write "compile '*' do\n"
569
+ io.write " filter :erb\n"
570
+ io.write "end\n"
571
+ io.write "\n"
572
+ io.write "route '*' do\n"
573
+ io.write " item.identifier.chop + '.' + item[:extension]\n"
574
+ io.write "end\n"
575
+ io.write "\n"
576
+ io.write "layout '*', :erb\n"
577
+ end
578
+
579
+ site = Nanoc::Site.new('.')
580
+ rep = site.items['/a/'].reps[0]
581
+ dt = site.compiler.dependency_tracker
582
+ dt.start
583
+ assert_raises Nanoc::Errors::UnmetDependency do
584
+ site.compiler.send :compile_rep, rep
585
+ end
586
+ dt.stop
587
+
588
+ stack = dt.instance_eval { @stack }
589
+ assert_empty stack
590
+ end
591
+ end
592
+
559
593
  end
@@ -238,6 +238,46 @@ class Nanoc::DataSources::FilesystemUnifiedTest < Nanoc::TestCase
238
238
  end
239
239
  end
240
240
 
241
+ def test_identifier_for_filename_with_index_filenames_allowing_periods_in_identifier
242
+ expected = {
243
+ '/index.html.erb' => '/index.html/',
244
+ '/index.html' => '/',
245
+ '/index' => '/',
246
+ '/foo/index.html.erb' => '/foo/index.html/',
247
+ '/foo/index.html' => '/foo/',
248
+ '/foo/index' => '/foo/',
249
+ }
250
+
251
+ data_source = new_data_source(:allow_periods_in_identifiers => true)
252
+ expected.each_pair do |input, expected_output|
253
+ actual_output = data_source.send(:identifier_for_filename, input)
254
+ assert_equal(
255
+ expected_output, actual_output,
256
+ "identifier_for_filename(#{input.inspect}) should equal #{expected_output.inspect}, not #{actual_output.inspect}"
257
+ )
258
+ end
259
+ end
260
+
261
+ def test_identifier_for_filename_with_index_filenames_disallowing_periods_in_identifier
262
+ expected = {
263
+ '/index.html.erb' => '/',
264
+ '/index.html' => '/',
265
+ '/index' => '/',
266
+ '/foo/index.html.erb' => '/foo/',
267
+ '/foo/index.html' => '/foo/',
268
+ '/foo/index' => '/foo/',
269
+ }
270
+
271
+ data_source = new_data_source
272
+ expected.each_pair do |input, expected_output|
273
+ actual_output = data_source.send(:identifier_for_filename, input)
274
+ assert_equal(
275
+ expected_output, actual_output,
276
+ "identifier_for_filename(#{input.inspect}) should equal #{expected_output.inspect}, not #{actual_output.inspect}"
277
+ )
278
+ end
279
+ end
280
+
241
281
  def test_load_objects_allowing_periods_in_identifiers
242
282
  # Create data source
243
283
  data_source = new_data_source(:allow_periods_in_identifiers => true)
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.4
4
+ version: 3.6.5
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Denis Defreyne
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-05-29 00:00:00.000000000 Z
12
+ date: 2013-09-29 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: cri
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,20 +30,23 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: minitest
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - ! '>='
35
+ - - ~>
32
36
  - !ruby/object:Gem::Version
33
- version: '0'
37
+ version: '4.0'
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - ! '>='
43
+ - - ~>
39
44
  - !ruby/object:Gem::Version
40
- version: '0'
45
+ version: '4.0'
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: mocha
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rake
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rdiscount
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :development
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: yard
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :development
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -108,7 +121,6 @@ extra_rdoc_files:
108
121
  - README.md
109
122
  - NEWS.md
110
123
  files:
111
- - Architecture.md
112
124
  - ChangeLog
113
125
  - CONTRIBUTING.md
114
126
  - Gemfile
@@ -117,7 +129,6 @@ files:
117
129
  - NEWS.md
118
130
  - Rakefile
119
131
  - README.md
120
- - TODO.md
121
132
  - doc/yardoc_templates/default/layout/html/footer.erb
122
133
  - bin/nanoc
123
134
  - lib/nanoc/base/compilation/checksum_store.rb
@@ -395,7 +406,6 @@ files:
395
406
  homepage: http://nanoc.ws/
396
407
  licenses:
397
408
  - MIT
398
- metadata: {}
399
409
  post_install_message:
400
410
  rdoc_options:
401
411
  - --main
@@ -403,20 +413,22 @@ rdoc_options:
403
413
  require_paths:
404
414
  - lib
405
415
  required_ruby_version: !ruby/object:Gem::Requirement
416
+ none: false
406
417
  requirements:
407
418
  - - ! '>='
408
419
  - !ruby/object:Gem::Version
409
420
  version: '0'
410
421
  required_rubygems_version: !ruby/object:Gem::Requirement
422
+ none: false
411
423
  requirements:
412
424
  - - ! '>='
413
425
  - !ruby/object:Gem::Version
414
426
  version: '0'
415
427
  requirements: []
416
428
  rubyforge_project:
417
- rubygems_version: 2.0.3
429
+ rubygems_version: 1.8.23
418
430
  signing_key:
419
- specification_version: 4
431
+ specification_version: 3
420
432
  summary: a web publishing system written in Ruby for building small to medium-sized
421
433
  websites.
422
434
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NzhlOGM4MmEyNTNlMTNmZGU1Y2MzN2E1MzBjNzE2ZTdmNjgxYTQ2OA==
5
- data.tar.gz: !binary |-
6
- ZmY2MDVlNjQyMGViOTdlZDg4NDA3YWUzN2E4YjcwODI3YjUwOTZhMg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- YzU3ZGNlMTcwOGExMTgzNGQzNmFhNzc2OTc2ZmU2NDJlMDFhZjc0YzMxNGQz
10
- NTRiNzk3OWU4ZWIyNTRjMTU2MzRjZDg5YmFmNzQ3MGFkZWNlYmQ1NjYzNzM4
11
- ZTY1MjhlN2EzZmQyMTFlOWNkZmFiNDNiNWVlNGU1ZWNiYjcwZTg=
12
- data.tar.gz: !binary |-
13
- NzNiMjNjOTA0NTI5NTc0ZjhlOGYwNGIxNTgzZTZkOTNiMGNmMjZhM2MzYmM3
14
- ODQwMmQ3NTYwMThhN2QzZTUzMTQ5MmY3MmVmMDAwODEyOWQwMTg4MWNhZDll
15
- YjRiMzA3MmJhMTIzMjZiNzYzNTczMGNhNDQ1ZDA5MDhhYmFlNmE=
@@ -1,70 +0,0 @@
1
- nanoc Architecture
2
- ==================
3
-
4
- Independent
5
- -----------
6
-
7
- * Context
8
- * DirectedGraph
9
- * NotificationCenter
10
- * PluginRegistry
11
- * Memoization
12
-
13
- Interactors
14
- -----------
15
-
16
- * Compiler
17
-
18
- Entities
19
- --------
20
-
21
- * Site
22
- * Item
23
- * ItemRep
24
- * Layout
25
- * Rule
26
- * RulesCollection
27
- * CodeSnippet
28
- * Configuration
29
-
30
- Stores
31
- ------
32
-
33
- * DataSource
34
- * FilesystemDataSource
35
- * RulesStore
36
- * FilesystemRulesStore + CompilerDSL
37
- * SnapshotStore
38
- * InMemorySnapshotStore
39
- * SQLite3SnapshotStore
40
-
41
- ### Ugly
42
-
43
- * ChecksumStore
44
- * CompiledContentCache
45
- * RuleMemoryStore
46
-
47
- Meh
48
- ---
49
-
50
- * proxies
51
- * ItemRepProxy (used in Rules)
52
- * ItemRepRecorderProxy (used in determining Rules changes)
53
- * DependencyTracker
54
- * Filter
55
- * OutdatednessChecker
56
- * RuleContext
57
- * RuleMemoryCalculator
58
- * Store
59
-
60
- ### Not classes
61
-
62
- * OutdatednessReasons
63
- * Errors
64
-
65
- ### Extensions
66
-
67
- * ArrayExtensions
68
- * HashExtensions
69
- * PathnameExtensions
70
- * StringExtensions
data/TODO.md DELETED
@@ -1,114 +0,0 @@
1
- To Do for nanoc 4.0
2
- ===================
3
-
4
- New
5
- ---
6
-
7
- * [3.x] assert that textual filter must return string
8
- * Get rid of notification center (use delegation)
9
- * Get rid of core ext
10
- * Don't recursively clean attributes
11
- * All stores should be pluggable
12
- * filters should accept content, not a string
13
- * Layouts could be binary too! (maybe not super useful)
14
-
15
- Proxies
16
- -------
17
-
18
- Item should not contain a list of item reps
19
- Instead, there should be an ItemRepsCollection that you can query
20
- item_reps_for(item)
21
-
22
- Item-per-item compilation
23
- -------------------------
24
-
25
- There should be a transaction around each item compilation, instead of around the entire site.
26
-
27
- True partials?
28
- --------------
29
-
30
- Rendering layouts is ugly! What about partial layouts though? (render box do ... end)
31
-
32
- Populate in data sources
33
- ------------------------
34
-
35
- `Nanoc::DEFAULT_CONTENT`
36
-
37
- all data sources are told to populate
38
-
39
- Finding modified items
40
- ----------------------
41
-
42
- Data sources should be queried to find out removed, added and changed items.
43
-
44
- Item proxies
45
- ------------
46
-
47
- Maybe this can be implemented as decorators.
48
-
49
- * core
50
- * proxies
51
- * while in rules
52
- * while being filtered
53
-
54
- ### Core
55
-
56
- Nanoc::Core::Item
57
- identifier
58
- content
59
- attributes
60
-
61
- Nanoc::Core::ItemRep
62
- item_identifier
63
- name
64
-
65
- Nanoc::Core::ItemRepSnapshot
66
- item_identifier
67
- item_rep_name
68
- name
69
- content
70
-
71
- ### Proxies
72
-
73
- Nanoc::???::Item
74
- site
75
- children
76
- parent
77
- reps
78
- compiled_content
79
-
80
- Nanoc::???::ItemRep
81
- item_identifier
82
- item (weak ref?)
83
- compiled_content
84
-
85
- Nanoc::???::ItemRepSnapshot
86
- item_identifier
87
- item_rep_name
88
- item_rep (weak ref?)
89
-
90
- Dependency types
91
- ----------------
92
-
93
- * Item -> Item
94
- * Item -> All items (@items.select { ... })
95
- * Item -> Pattern (@item.children)
96
-
97
- Query language
98
- --------------
99
-
100
- Is this strictly necessary? Maybe create an @items proxy that detects whether #find, #detect, #select, #each, ... are called. #[] would create a direct dependency. @items.children would also create a dependency on all its children and possible future ones (pattern dependency?).
101
-
102
- ### Capabilities
103
-
104
- * @item.parent
105
- * @item.children
106
- * @items.select{ |i| i[:kind] == 'article' }
107
-
108
- ### Examples
109
-
110
- @items.query(:identifier, equals: '/foo/')
111
- @items.query(:identifier, starts_with: '/reviews/')
112
- @items.query(
113
-
114
- -> how to distinguish between identifier and attributes?