nanoc 3.3.1 → 3.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock ADDED
@@ -0,0 +1,111 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ nanoc (3.3.2)
5
+ cri (~> 2.2)
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ RedCloth (4.2.9)
11
+ albino (1.3.3)
12
+ posix-spawn (>= 0.3.6)
13
+ bluecloth (2.2.0)
14
+ builder (3.0.0)
15
+ coderay (1.0.5)
16
+ coffee-script (2.2.0)
17
+ coffee-script-source
18
+ execjs
19
+ coffee-script-source (1.2.0)
20
+ commonjs (0.2.0)
21
+ therubyracer (~> 0.9.9)
22
+ cri (2.2.0)
23
+ erubis (2.7.0)
24
+ execjs (1.3.0)
25
+ multi_json (~> 1.0)
26
+ haml (3.1.4)
27
+ json (1.6.5)
28
+ kramdown (0.13.5)
29
+ less (2.0.9)
30
+ commonjs (~> 0.2.0)
31
+ therubyracer (~> 0.9.9)
32
+ libv8 (3.3.10.4)
33
+ markaby (0.7.2)
34
+ builder (>= 2.0.0)
35
+ maruku (0.6.0)
36
+ syntax (>= 1.0.0)
37
+ metaclass (0.0.1)
38
+ mime-types (1.17.2)
39
+ minitest (2.11.3)
40
+ mocha (0.10.5)
41
+ metaclass (~> 0.0.1)
42
+ multi_json (1.1.0)
43
+ mustache (0.99.4)
44
+ nokogiri (1.5.0)
45
+ posix-spawn (0.3.6)
46
+ rack (1.4.1)
47
+ rainpress (1.0)
48
+ rake (0.9.2.2)
49
+ rdiscount (1.6.8)
50
+ rdoc (3.12)
51
+ json (~> 1.4)
52
+ redcarpet (2.1.0)
53
+ rubypants (0.2.0)
54
+ sass (3.1.15)
55
+ slim (1.1.1)
56
+ temple (~> 0.4.0)
57
+ tilt (~> 1.3.2)
58
+ syntax (1.0.0)
59
+ systemu (2.4.2)
60
+ temple (0.4.0)
61
+ therubyracer (0.9.9)
62
+ libv8 (~> 3.3.10)
63
+ tilt (1.3.3)
64
+ typogruby (1.0.14)
65
+ rubypants
66
+ uglifier (1.2.3)
67
+ execjs (>= 0.3.0)
68
+ multi_json (>= 1.0.2)
69
+ w3c_validators (1.2)
70
+ json
71
+ nokogiri
72
+ yard (0.7.5)
73
+ yuicompressor (1.2.0)
74
+
75
+ PLATFORMS
76
+ ruby
77
+
78
+ DEPENDENCIES
79
+ RedCloth
80
+ albino
81
+ bluecloth
82
+ builder
83
+ coderay
84
+ coffee-script
85
+ erubis
86
+ haml
87
+ kramdown
88
+ less (~> 2.0)
89
+ markaby
90
+ maruku
91
+ mime-types
92
+ minitest
93
+ mocha
94
+ mustache
95
+ nanoc!
96
+ nokogiri
97
+ rack
98
+ rainpress
99
+ rake
100
+ rdiscount
101
+ rdoc
102
+ redcarpet
103
+ rubypants
104
+ sass (~> 3.1)
105
+ slim
106
+ systemu
107
+ typogruby
108
+ uglifier
109
+ w3c_validators
110
+ yard
111
+ yuicompressor
data/NEWS.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # nanoc news
2
2
 
3
+ ## 3.3.2 (2012-03-16)
4
+
5
+ * Removed bin/nanoc3 (use nanoc3 gem if you want it)
6
+ * Fixed wrong “no such snapshot” errors
7
+ * Made deployer default to rsync for backwards compatibility
8
+ * Fixed missing Nanoc::CLI in deployment tasks
9
+ * Fixed “unrecognised kind” deployer error
10
+
3
11
  ## 3.3.1 (2012-02-18)
4
12
 
5
13
  * Fixed issue with long paths on Windows
data/README.md CHANGED
@@ -90,6 +90,7 @@ may be interested in the development dependencies:
90
90
  * Felix Hanley
91
91
  * Justin Hileman
92
92
  * Starr Horne
93
+ * Daniel Hofstetter
93
94
  * Tuomas Kareinen
94
95
  * Matt Keveney
95
96
  * Kevin Lynagh
@@ -321,6 +321,11 @@ module Nanoc
321
321
  Nanoc::NotificationCenter.on(:processing_started, self) { |obj| @stack.push(obj) }
322
322
  Nanoc::NotificationCenter.on(:processing_ended, self) { |obj| @stack.pop }
323
323
 
324
+ # Assign snapshots
325
+ reps.each do |rep|
326
+ rep.snapshots = rules_collection.snapshots_for(rep)
327
+ end
328
+
324
329
  # Attempt to compile all active reps
325
330
  loop do
326
331
  # Find rep to compile
@@ -365,9 +370,6 @@ module Nanoc
365
370
  # Calculate rule memory if we haven’t yet done do
366
371
  rules_collection.new_rule_memory_for_rep(rep)
367
372
 
368
- # Assign snapshots
369
- rep.snapshots = rules_collection.snapshots_for(rep)
370
-
371
373
  if !outdatedness_checker.outdated?(rep) && compiled_content_cache[rep]
372
374
  # Reuse content
373
375
  Nanoc::NotificationCenter.post(:cached_content_used, rep)
@@ -55,12 +55,12 @@ module Nanoc::CLI::Commands
55
55
  # Get deployer
56
56
  names = Nanoc::Extra::Deployer.all.keys
57
57
  name = config.fetch(:kind) do
58
- $stderr.puts "The specified deploy target does not have a kind."
59
- $stderr.puts "(expected one of #{names.join(', ')})"
60
- exit 1
58
+ $stderr.puts "Warning: The specified deploy target does not have a kind attribute. Assuming rsync."
59
+ 'rsync'
61
60
  end
62
- deployer_class = Nanoc::Extra::Deployer.named(name) do
63
- $stderr.puts "The specified deploy target has an unrecognised kind (#{kind})."
61
+ deployer_class = Nanoc::Extra::Deployer.named(name)
62
+ if deployer_class.nil?
63
+ $stderr.puts "The specified deploy target has an unrecognised kind (#{name})."
64
64
  $stderr.puts "(expected one of #{names.join(', ')})"
65
65
  exit 1
66
66
  end
@@ -66,7 +66,7 @@ module Nanoc::CLI
66
66
  def print_error(error)
67
67
  # Header
68
68
  $stderr.puts
69
- $stderr.puts "Captain! We’ve been hit!"
69
+ $stderr.puts "Captain! We’ve been hit!".make_compatible_with_env
70
70
 
71
71
  # Exception and resolution (if any)
72
72
  $stderr.puts
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require 'nanoc/cli'
4
+
3
5
  namespace :deploy do
4
6
 
5
7
  desc 'Upload the compiled site using rsync'
data/lib/nanoc.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Nanoc
4
4
 
5
5
  # The current nanoc version.
6
- VERSION = '3.3.1'
6
+ VERSION = '3.3.2'
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).
data/nanoc.gemspec CHANGED
@@ -17,13 +17,13 @@ Gem::Specification.new do |s|
17
17
  Dir['doc/yardoc_templates/**/*'] +
18
18
  Dir['{bin,lib,tasks,test}/**/*'] +
19
19
  [ 'nanoc.gemspec', '.gemtest' ]
20
- s.executables = [ 'nanoc', 'nanoc3' ]
20
+ s.executables = [ 'nanoc' ]
21
21
  s.require_paths = [ 'lib' ]
22
22
 
23
23
  s.rdoc_options = [ '--main', 'README.md' ]
24
24
  s.extra_rdoc_files = [ 'ChangeLog', 'LICENSE', 'README.md', 'NEWS.md' ]
25
25
 
26
- s.add_runtime_dependency('cri', '~> 2.1')
26
+ s.add_runtime_dependency('cri', '~> 2.2')
27
27
 
28
28
  s.add_development_dependency('minitest')
29
29
  s.add_development_dependency('mocha')
@@ -371,6 +371,40 @@ class Nanoc::CompilerTest < MiniTest::Unit::TestCase
371
371
  end
372
372
  end
373
373
 
374
+ def test_mutually_include_compiled_content_at_previous_snapshot
375
+ with_site do |site|
376
+ # Create items
377
+ File.open('content/a.html', 'w') do |io|
378
+ io.write('[<%= @items.find { |i| i.identifier == "/z/" }.compiled_content(:snapshot => :guts) %>]')
379
+ end
380
+ File.open('content/z.html', 'w') do |io|
381
+ io.write('stuff')
382
+ end
383
+
384
+ # Create routes
385
+ File.open('Rules', 'w') do |io|
386
+ io.write "compile '*' do\n"
387
+ io.write " snapshot :guts\n"
388
+ io.write " filter :erb\n"
389
+ io.write "end\n"
390
+ io.write "\n"
391
+ io.write "route '*' do\n"
392
+ io.write " item.identifier + 'index.html'\n"
393
+ io.write "end\n"
394
+ io.write "\n"
395
+ io.write "layout '*', :erb\n"
396
+ end
397
+
398
+ # Compile
399
+ site = Nanoc::Site.new('.')
400
+ site.compile
401
+
402
+ # Check
403
+ assert_equal '[stuff]', File.read('output/a/index.html')
404
+ assert_equal 'stuff', File.read('output/z/index.html')
405
+ end
406
+ end
407
+
374
408
  def test_layout_with_extra_filter_args
375
409
  with_site do |site|
376
410
  # Create item
@@ -84,17 +84,13 @@ class Nanoc::CLI::Commands::DeployTest < MiniTest::Unit::TestCase
84
84
  File.open('output/blah.html', 'w') { |io| io.write 'moo' }
85
85
 
86
86
  ios = capturing_stdio do
87
- assert_raises SystemExit do
88
- Nanoc::CLI.run %w( deploy -t public )
89
- end
87
+ Nanoc::CLI.run %w( deploy -t public )
90
88
  end
91
89
 
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 ')
90
+ assert ios[:stderr].include?('Warning: The specified deploy target does not have a kind attribute. Assuming rsync.')
95
91
 
96
- refute File.directory?('mydestination')
97
- refute File.file?('mydestination/blah.html')
92
+ assert File.directory?('mydestination')
93
+ assert File.file?('mydestination/blah.html')
98
94
  end
99
95
  end
100
96
  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.1
4
+ version: 3.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-18 00:00:00.000000000 Z
12
+ date: 2012-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cri
16
- requirement: &70230609637420 !ruby/object:Gem::Requirement
16
+ requirement: &70355075174180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '2.1'
21
+ version: '2.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70230609637420
24
+ version_requirements: *70355075174180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: minitest
27
- requirement: &70230609637020 !ruby/object:Gem::Requirement
27
+ requirement: &70355075173560 !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: *70230609637020
35
+ version_requirements: *70355075173560
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mocha
38
- requirement: &70230609636560 !ruby/object:Gem::Requirement
38
+ requirement: &70355075172820 !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: *70230609636560
46
+ version_requirements: *70355075172820
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &70230609652500 !ruby/object:Gem::Requirement
49
+ requirement: &70355075309900 !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: *70230609652500
57
+ version_requirements: *70355075309900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rdiscount
60
- requirement: &70230609652080 !ruby/object:Gem::Requirement
60
+ requirement: &70355075308600 !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: *70230609652080
68
+ version_requirements: *70355075308600
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
- requirement: &70230609651660 !ruby/object:Gem::Requirement
71
+ requirement: &70355075306460 !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: *70230609651660
79
+ version_requirements: *70355075306460
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,
@@ -84,7 +84,6 @@ description: nanoc is a simple but very flexible static site generator written i
84
84
  email: denis.defreyne@stoneship.org
85
85
  executables:
86
86
  - nanoc
87
- - nanoc3
88
87
  extensions: []
89
88
  extra_rdoc_files:
90
89
  - ChangeLog
@@ -94,13 +93,13 @@ extra_rdoc_files:
94
93
  files:
95
94
  - ChangeLog
96
95
  - Gemfile
96
+ - Gemfile.lock
97
97
  - LICENSE
98
98
  - NEWS.md
99
99
  - Rakefile
100
100
  - README.md
101
101
  - doc/yardoc_templates/default/layout/html/footer.erb
102
102
  - bin/nanoc
103
- - bin/nanoc3
104
103
  - lib/nanoc/base/compilation/checksum_store.rb
105
104
  - lib/nanoc/base/compilation/compiled_content_cache.rb
106
105
  - lib/nanoc/base/compilation/compiler.rb
@@ -369,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
369
368
  version: '0'
370
369
  requirements: []
371
370
  rubyforge_project:
372
- rubygems_version: 1.8.16
371
+ rubygems_version: 1.8.17
373
372
  signing_key:
374
373
  specification_version: 3
375
374
  summary: a web publishing system written in Ruby for building small to medium-sized
data/bin/nanoc3 DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- exec File.dirname(__FILE__) + '/nanoc', *ARGV