nanoc 4.4.2 → 4.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 321bc54ed62384061039f82d10745b494012e4ff
4
- data.tar.gz: ec7e38daa14af1a0b6cc64bd71e3492585de9865
3
+ metadata.gz: 949b7676e2070a525cf434e0157e0423e1f694af
4
+ data.tar.gz: 2b1c582dd18c89efdec5ba5c8d89803dd938930f
5
5
  SHA512:
6
- metadata.gz: 4e4fcde666aba2b332294e99ddb1381b3d988371f6cb8ee7a23501917f279694a69a0af19c9465c3c0608104243aecc3480732cf88c9e9d83ac9f313ee259a30
7
- data.tar.gz: c233e8b716f68bc31569732bf7a1092ae7c4450b820281ccbc9c853ab63d3cbbd105a20dbead2f6cbef59ede2d9583d1df05a76548b5494263e7c1ea1df371c2
6
+ metadata.gz: cb85fb348177d808a2bc17d47b33564a4f226d98adbfb08bbbf543ab7a2efc6dc65710f7040b877f47d547a08daa5bad8726b4ab99f5fb9dd2a12ad6d1425179
7
+ data.tar.gz: 77d463b8d56a22823571ec42d870f044aaf33f8ded0fff69da80ddbaef09c19a9dc4ca163760a4b460a58858ce22d96c4a3a6eb1382f4640d3f2d20d5e7d4697
data/Gemfile.lock CHANGED
@@ -1,15 +1,15 @@
1
1
  GIT
2
2
  remote: git://github.com/tmm1/pygments.rb.git
3
- revision: 4ed8701d65f6db7d8778cc56291999a0a87c7eda
3
+ revision: fc7e79ef1a5c215abe5f3e5ac7d5fdd12dd8b73d
4
4
  specs:
5
- pygments.rb (0.6.3)
5
+ pygments.rb (1.0.0)
6
6
  posix-spawn (~> 0.3.6)
7
7
  yajl-ruby (~> 1.2)
8
8
 
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- nanoc (4.4.1)
12
+ nanoc (4.4.3)
13
13
  cri (~> 2.3)
14
14
  hamster (~> 3.0)
15
15
  parallel (~> 1.9)
@@ -36,7 +36,7 @@ GEM
36
36
  coffee-script (2.4.1)
37
37
  coffee-script-source
38
38
  execjs
39
- coffee-script-source (1.11.1)
39
+ coffee-script-source (1.12.2)
40
40
  colored (1.2)
41
41
  commonjs (0.2.7)
42
42
  compass (1.0.3)
@@ -53,15 +53,15 @@ GEM
53
53
  sass (>= 3.2, < 3.5)
54
54
  concurrent-ruby (1.0.2)
55
55
  contracts (0.14.0)
56
- coveralls (0.8.16)
56
+ coveralls (0.8.17)
57
57
  json (>= 1.8, < 3)
58
58
  simplecov (~> 0.12.0)
59
- term-ansicolor (~> 1.3.0)
59
+ term-ansicolor (~> 1.3)
60
60
  thor (~> 0.19.1)
61
- tins (>= 1.6.0, < 2)
61
+ tins (~> 1.6)
62
62
  crack (0.4.3)
63
63
  safe_yaml (~> 1.0.0)
64
- cri (2.7.0)
64
+ cri (2.7.1)
65
65
  colored (~> 1.2)
66
66
  diff-lcs (1.2.5)
67
67
  docile (1.1.5)
@@ -108,7 +108,7 @@ GEM
108
108
  fog-atmos (0.1.0)
109
109
  fog-core
110
110
  fog-xml
111
- fog-aws (0.12.0)
111
+ fog-aws (1.1.0)
112
112
  fog-core (~> 1.38)
113
113
  fog-json (~> 1.0)
114
114
  fog-xml (~> 0.1)
@@ -187,7 +187,7 @@ GEM
187
187
  fog-voxel (0.1.0)
188
188
  fog-core
189
189
  fog-xml
190
- fog-vsphere (1.5.1)
190
+ fog-vsphere (1.5.2)
191
191
  fog-core
192
192
  rbvmomi (~> 1.9)
193
193
  fog-xenserver (0.2.3)
@@ -242,7 +242,7 @@ GEM
242
242
  mime-types-data (~> 3.2015)
243
243
  mime-types-data (3.2016.0521)
244
244
  mini_portile2 (2.1.0)
245
- minitest (5.9.1)
245
+ minitest (5.10.1)
246
246
  mocha (1.2.1)
247
247
  metaclass (~> 0.0.1)
248
248
  multi_json (1.12.1)
@@ -255,7 +255,7 @@ GEM
255
255
  shellany (~> 0.0)
256
256
  pandoc-ruby (2.0.1)
257
257
  parallel (1.10.0)
258
- parser (2.3.2.0)
258
+ parser (2.3.3.1)
259
259
  ast (~> 2.2)
260
260
  posix-spawn (0.3.12)
261
261
  powerpack (0.1.1)
@@ -267,7 +267,7 @@ GEM
267
267
  rack (2.0.1)
268
268
  rainbow (2.1.0)
269
269
  rainpress (1.0)
270
- rake (11.3.0)
270
+ rake (12.0.0)
271
271
  rb-fsevent (0.9.8)
272
272
  rb-inotify (0.9.7)
273
273
  ffi (>= 0.5.0)
@@ -294,7 +294,7 @@ GEM
294
294
  diff-lcs (>= 1.2.0, < 2.0)
295
295
  rspec-support (~> 3.5.0)
296
296
  rspec-support (3.5.0)
297
- rubocop (0.45.0)
297
+ rubocop (0.46.0)
298
298
  parser (>= 2.3.1.1, < 3.0)
299
299
  powerpack (~> 0.1)
300
300
  rainbow (>= 1.99.1, < 3.0)
@@ -316,26 +316,26 @@ GEM
316
316
  tilt (>= 1.3.3, < 2.1)
317
317
  slop (3.6.0)
318
318
  temple (0.7.7)
319
- term-ansicolor (1.3.2)
319
+ term-ansicolor (1.4.0)
320
320
  tins (~> 1.0)
321
321
  therubyracer (0.12.2)
322
322
  libv8 (~> 3.16.14.0)
323
323
  ref
324
- thor (0.19.3)
324
+ thor (0.19.4)
325
325
  tilt (2.0.5)
326
326
  timecop (0.8.1)
327
327
  tins (1.13.0)
328
328
  trollop (2.1.2)
329
329
  typogruby (1.0.18)
330
330
  rubypants
331
- uglifier (3.0.3)
331
+ uglifier (3.0.4)
332
332
  execjs (>= 0.3.0, < 3)
333
- unicode-display_width (1.1.1)
333
+ unicode-display_width (1.1.2)
334
334
  vcr (3.0.3)
335
- w3c_validators (1.2)
336
- json
337
- nokogiri
338
- webmock (2.1.0)
335
+ w3c_validators (1.3)
336
+ json (~> 2.0)
337
+ nokogiri (~> 1.6)
338
+ webmock (2.3.1)
339
339
  addressable (>= 2.3.6)
340
340
  crack (>= 0.3.2)
341
341
  hashdiff
data/NEWS.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Nanoc news
2
2
 
3
+ ## 4.4.3 (2016-12-17)
4
+
5
+ Fixes:
6
+
7
+ * Prevented stale data from making it into the compiled content cache and thereby blowing up in memory (#1004, #1013)
8
+ * Fixed “about” and “IRC channel” links in default site
9
+ * Fixed accuracy of `<updated>` in Atom feed (use most recent `updated_at` or `created_at`) (#1007, #1014)
10
+
11
+ Enhancements:
12
+
13
+ * Added support for non-legacy identifiers in `#breadcrumbs_trail` (#1010, #1011)
14
+ * Defined checksum for `Nanoc::Int::Context` to make outdatedness checker more precise (#1008, #1012)
15
+ * Made Nanoc raise an error when item reps are routed to a path that does not start with a slash (#1015, #1016)
16
+
3
17
  ## 4.4.2 (2016-11-27)
4
18
 
5
19
  Fixes:
@@ -30,8 +30,7 @@ module Nanoc::Int
30
30
  Func = Ignorer.instance
31
31
  RespondTo = Ignorer.instance
32
32
 
33
- def contract(*args)
34
- end
33
+ def contract(*args); end
35
34
  end
36
35
 
37
36
  module EnabledContracts
@@ -4,9 +4,10 @@ module Nanoc::Int
4
4
  #
5
5
  # @api private
6
6
  class CompiledContentCache < ::Nanoc::Int::Store
7
- def initialize(env_name: nil)
7
+ def initialize(env_name: nil, items:)
8
8
  super(Nanoc::Int::Store.tmp_path_for(env_name: env_name, store_name: 'compiled_content'), 2)
9
9
 
10
+ @items = items
10
11
  @cache = {}
11
12
  end
12
13
 
@@ -45,7 +46,15 @@ module Nanoc::Int
45
46
  end
46
47
 
47
48
  def data=(new_data)
48
- @cache = new_data
49
+ @cache = {}
50
+
51
+ item_identifiers = Set.new(@items.map(&:identifier))
52
+
53
+ new_data.each_pair do |item_identifier, content_per_rep|
54
+ if item_identifiers.include?(item_identifier)
55
+ @cache[item_identifier] ||= content_per_rep
56
+ end
57
+ end
49
58
  end
50
59
  end
51
60
  end
@@ -85,8 +85,7 @@ module Nanoc
85
85
  # default implementation simply does nothing.
86
86
  #
87
87
  # @return [void]
88
- def up
89
- end
88
+ def up; end
90
89
 
91
90
  # Brings down the connection to the data. This method should undo the
92
91
  # effects of the {#up} method. For example, a database connection
@@ -96,8 +95,7 @@ module Nanoc
96
95
  # default implementation simply does nothing.
97
96
  #
98
97
  # @return [void]
99
- def down
100
- end
98
+ def down; end
101
99
 
102
100
  # Returns the collection of items (represented by {Nanoc::Int::Item}) in
103
101
  # this site. The default implementation simply returns an empty array.
@@ -109,16 +109,14 @@ module Nanoc::Int
109
109
  # by the subclass.
110
110
  #
111
111
  # @return [void]
112
- def no_data_found
113
- end
112
+ def no_data_found; end
114
113
 
115
114
  # Callback method that is called when a version mismatch is detected. By
116
115
  # default, this implementation does nothing, but it should probably be
117
116
  # overridden by the subclass.
118
117
  #
119
118
  # @return [void]
120
- def version_mismatch_detected
121
- end
119
+ def version_mismatch_detected; end
122
120
 
123
121
  private
124
122
 
@@ -96,6 +96,8 @@ module Nanoc::Int
96
96
  UnwrapUpdateBehavior
97
97
  when Nanoc::RuleDSL::RuleContext
98
98
  RuleContextUpdateBehavior
99
+ when Nanoc::Int::Context
100
+ ContextUpdateBehavior
99
101
  else
100
102
  RescueUpdateBehavior
101
103
  end
@@ -117,6 +119,17 @@ module Nanoc::Int
117
119
  end
118
120
  end
119
121
 
122
+ class ContextUpdateBehavior
123
+ def self.update(obj, digest)
124
+ obj.instance_variables.each do |var|
125
+ digest.update(var.to_s)
126
+ digest.update('=')
127
+ yield(obj.instance_variable_get(var))
128
+ digest.update(',')
129
+ end
130
+ end
131
+ end
132
+
120
133
  class UpdateBehavior
121
134
  def self.update(_obj, _digest)
122
135
  raise NotImpementedError
@@ -24,8 +24,14 @@ module Nanoc::Int
24
24
  reps: item_rep_repo,
25
25
  )
26
26
 
27
+ compiled_content_cache =
28
+ Nanoc::Int::CompiledContentCache.new(
29
+ env_name: site.config.env_name,
30
+ items: site.items,
31
+ )
32
+
27
33
  params = {
28
- compiled_content_cache: Nanoc::Int::CompiledContentCache.new(env_name: site.config.env_name),
34
+ compiled_content_cache: compiled_content_cache,
29
35
  checksum_store: checksum_store,
30
36
  rule_memory_store: rule_memory_store,
31
37
  dependency_store: dependency_store,
@@ -10,16 +10,13 @@ module Nanoc::Int
10
10
  include Nanoc::Int::ContractsSupport
11
11
 
12
12
  contract C_OBJ, C_ARGS => C::Any
13
- def enter(_obj, raw_content: false, attributes: false, compiled_content: false, path: false)
14
- end
13
+ def enter(_obj, raw_content: false, attributes: false, compiled_content: false, path: false); end
15
14
 
16
15
  contract C_OBJ => C::Any
17
- def exit
18
- end
16
+ def exit; end
19
17
 
20
18
  contract C_OBJ, C_ARGS => C::Any
21
- def bounce(_obj, raw_content: false, attributes: false, compiled_content: false, path: false)
22
- end
19
+ def bounce(_obj, raw_content: false, attributes: false, compiled_content: false, path: false); end
23
20
  end
24
21
 
25
22
  def initialize(dependency_store)
@@ -9,6 +9,12 @@ module Nanoc::Int
9
9
  end
10
10
  end
11
11
 
12
+ class RouteWithoutSlashError < ::Nanoc::Error
13
+ def initialize(output_path, rep)
14
+ super("The item representation #{rep.inspect} is routed to #{output_path}, which does not start with a slash, as required.")
15
+ end
16
+ end
17
+
12
18
  def initialize(reps, action_provider, site)
13
19
  @reps = reps
14
20
  @action_provider = action_provider
@@ -29,6 +35,10 @@ module Nanoc::Int
29
35
  return if basic_path.nil?
30
36
  basic_path = basic_path.encode('UTF-8')
31
37
 
38
+ unless basic_path.start_with?('/')
39
+ raise RouteWithoutSlashError.new(basic_path, rep)
40
+ end
41
+
32
42
  # Check for duplicate paths
33
43
  if paths_to_reps.key?(basic_path)
34
44
  raise IdenticalRoutesError.new(basic_path, paths_to_reps[basic_path], rep)
@@ -24,8 +24,7 @@ module Nanoc::CLI::Commands
24
24
  #
25
25
  # @abstract Subclasses must override {#start} and may override {#stop}.
26
26
  class Listener
27
- def initialize(*)
28
- end
27
+ def initialize(*); end
29
28
 
30
29
  # @param [Nanoc::CLI::CommandRunner] command_runner The command runner for this listener
31
30
  #
@@ -48,8 +47,7 @@ module Nanoc::CLI::Commands
48
47
  # Stops the listener. The default implementation removes self from all notification center observers.
49
48
  #
50
49
  # @return [void]
51
- def stop
52
- end
50
+ def stop; end
53
51
 
54
52
  # @api private
55
53
  def start_safely
@@ -278,14 +278,13 @@ EOS
278
278
  <div id="sidebar">
279
279
  <h2>Documentation</h2>
280
280
  <ul>
281
- <li><a href="http://nanoc.ws/about/">About</a></li>
282
281
  <li><a href="http://nanoc.ws/doc/">Documentation</a></li>
283
282
  <li><a href="http://nanoc.ws/doc/tutorial/">Tutorial</a></li>
284
283
  </ul>
285
284
  <h2>Community</h2>
286
285
  <ul>
287
286
  <li><a href="http://groups.google.com/group/nanoc/">Discussion group</a></li>
288
- <li><a href="irc://chat.freenode.net/#nanoc">IRC channel</a></li>
287
+ <li><a href="https://gitter.im/nanoc/nanoc">Gitter channel</a></li>
289
288
  <li><a href="http://nanoc.ws/contributing/">Contributing</a></li>
290
289
  </ul>
291
290
  </div>
@@ -47,12 +47,10 @@ module Nanoc::DataSources
47
47
  # @api private
48
48
  class Filesystem < Nanoc::DataSource
49
49
  # See {Nanoc::DataSource#up}.
50
- def up
51
- end
50
+ def up; end
52
51
 
53
52
  # See {Nanoc::DataSource#down}.
54
- def down
55
- end
53
+ def down; end
56
54
 
57
55
  def content_dir_name
58
56
  config.fetch(:content_dir, 'content')
@@ -72,6 +72,10 @@ module Nanoc::Helpers
72
72
  sorted_relevant_articles.first
73
73
  end
74
74
 
75
+ def updated
76
+ relevant_articles.map { |a| attribute_to_time(a[:updated_at] || a[:created_at]) }.max
77
+ end
78
+
75
79
  def validate_config
76
80
  if @config[:base_url].nil?
77
81
  raise Nanoc::Int::Errors::GenericTrivial.new('Cannot build Atom feed: site configuration has no base_url')
@@ -109,7 +113,7 @@ module Nanoc::Helpers
109
113
  xml.title title
110
114
 
111
115
  # Add date
112
- xml.updated(attribute_to_time(last_article[:created_at]).__nanoc_to_iso8601_time)
116
+ xml.updated(updated.__nanoc_to_iso8601_time)
113
117
 
114
118
  # Add links
115
119
  xml.link(rel: 'alternate', href: root_url)
@@ -1,31 +1,25 @@
1
1
  module Nanoc::Helpers
2
2
  # @see http://nanoc.ws/doc/reference/helpers/#breadcrumbs
3
3
  module Breadcrumbs
4
- class CannotGetBreadcrumbsForNonLegacyItem < Nanoc::Int::Errors::Generic
5
- def initialize(identifier)
6
- super("You cannot build a breadcrumbs trail for an item that has a “full” identifier (#{identifier}). Doing so is only possible for items that have a legacy identifier.")
7
- end
8
- end
9
-
10
4
  # @return [Array]
11
5
  def breadcrumbs_trail
12
- unless @item.identifier.legacy?
13
- raise CannotGetBreadcrumbsForNonLegacyItem.new(@item.identifier)
14
- end
6
+ # e.g. ['', '/foo', '/foo/bar']
7
+ components = item.identifier.components
8
+ prefixes = components.inject(['']) { |acc, elem| acc + [acc.last + '/' + elem] }
15
9
 
16
- trail = []
17
- idx_start = 0
18
-
19
- loop do
20
- idx = @item.identifier.to_s.index('/', idx_start)
21
- break if idx.nil?
22
-
23
- idx_start = idx + 1
24
- identifier = @item.identifier.to_s[0..idx]
25
- trail << @items[identifier]
10
+ if @item.identifier.legacy?
11
+ prefixes.map { |pr| @items[Nanoc::Identifier.new('/' + pr, type: :legacy)] }
12
+ else
13
+ prefixes
14
+ .reject { |pr| pr =~ /^\/index\./ }
15
+ .map do |pr|
16
+ if pr == ''
17
+ @items['/index.*']
18
+ else
19
+ @items[Nanoc::Identifier.new(pr).without_ext + '.*']
20
+ end
21
+ end
26
22
  end
27
-
28
- trail
29
23
  end
30
24
  end
31
25
  end
data/lib/nanoc/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Nanoc
2
2
  # The current Nanoc version.
3
- VERSION = '4.4.2'.freeze
3
+ VERSION = '4.4.3'.freeze
4
4
  end
@@ -12,7 +12,7 @@ class Nanoc::Int::CompilerTest < Nanoc::TestCase
12
12
  action_provider = Nanoc::Int::ActionProvider.named(:rule_dsl).for(site)
13
13
 
14
14
  params = {
15
- compiled_content_cache: Nanoc::Int::CompiledContentCache.new,
15
+ compiled_content_cache: Nanoc::Int::CompiledContentCache.new(items: site.items),
16
16
  checksum_store: Nanoc::Int::ChecksumStore.new(site: site),
17
17
  rule_memory_store: Nanoc::Int::RuleMemoryStore.new,
18
18
  dependency_store: Nanoc::Int::DependencyStore.new(
@@ -1,5 +1,11 @@
1
1
  class Nanoc::Checking::Checks::HTMLTest < Nanoc::TestCase
2
2
  def test_run_ok
3
+ require 'w3c_validators'
4
+
5
+ if ::W3CValidators::VERSION == '1.3'
6
+ skip 'broken (see https://github.com/w3c-validators/w3c_validators/issues/25)'
7
+ end
8
+
3
9
  VCR.use_cassette('html_run_ok') do
4
10
  with_site do |site|
5
11
  # Create files
@@ -1,4 +1,3 @@
1
1
  class Nanoc::CLI::LoggerTest < Nanoc::TestCase
2
- def test_stub
3
- end
2
+ def test_stub; end
4
3
  end
@@ -1,12 +1,17 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: get
5
- uri: http://jigsaw.w3.org/css-validator/validator?output=soap12&profile=css3&text=h1%20%7B%20coxlor:%20rxed%3B%20%7D
4
+ method: post
5
+ uri: http://jigsaw.w3.org/css-validator/validator
6
6
  body:
7
- encoding: US-ASCII
8
- string: ''
7
+ encoding: UTF-8
8
+ string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
9
+ name=\"profile\"\r\n\r\ncss3\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
10
+ form-data; name=\"text\"\r\n\r\nh1 { coxlor: rxed; }\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
11
+ form-data; name=\"output\"\r\n\r\nsoap12\r\n--349832898984244898448024464570528145--\r\n"
9
12
  headers:
13
+ Content-Type:
14
+ - multipart/form-data; boundary=349832898984244898448024464570528145
10
15
  Accept-Encoding:
11
16
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
17
  Accept:
@@ -21,7 +26,7 @@ http_interactions:
21
26
  Cache-Control:
22
27
  - no-cache
23
28
  Date:
24
- - Thu, 24 Apr 2014 07:25:20 GMT
29
+ - Sat, 17 Dec 2016 08:33:23 GMT
25
30
  Pragma:
26
31
  - no-cache
27
32
  Transfer-Encoding:
@@ -42,9 +47,9 @@ http_interactions:
42
47
  encoding: UTF-8
43
48
  string: "<?xml version='1.0' encoding=\"utf-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n
44
49
  \ <env:Body>\n <m:cssvalidationresponse\n env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\"\n
45
- \ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>file://localhost/TextArea</m:uri>\n
50
+ \ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>TextArea</m:uri>\n
46
51
  \ <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>\n
47
- \ <m:csslevel>css3</m:csslevel>\n <m:date>2014-04-24T07:25:20Z</m:date>\n
52
+ \ <m:csslevel>css3</m:csslevel>\n <m:date>2016-12-17T08:33:23Z</m:date>\n
48
53
  \ <m:validity>false</m:validity>\n <m:result>\n <m:errors
49
54
  xml:lang=\"en\">\n <m:errorcount>1</m:errorcount>\n \n
50
55
  \ <m:errorlist>\n <m:uri>file://localhost/TextArea</m:uri>\n
@@ -61,5 +66,5 @@ http_interactions:
61
66
  \ </m:warnings>\n </m:result>\n </m:cssvalidationresponse>\n
62
67
  \ </env:Body>\n</env:Envelope>\n\n"
63
68
  http_version:
64
- recorded_at: Thu, 24 Apr 2014 07:25:20 GMT
65
- recorded_with: VCR 2.9.0
69
+ recorded_at: Sat, 17 Dec 2016 08:33:24 GMT
70
+ recorded_with: VCR 3.0.3
@@ -1,12 +1,17 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: get
5
- uri: http://jigsaw.w3.org/css-validator/validator?output=soap12&profile=css3&text=h1%20%7B%20color:%20red%3B%20%7D
4
+ method: post
5
+ uri: http://jigsaw.w3.org/css-validator/validator
6
6
  body:
7
- encoding: US-ASCII
8
- string: ''
7
+ encoding: UTF-8
8
+ string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
9
+ name=\"profile\"\r\n\r\ncss3\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
10
+ form-data; name=\"text\"\r\n\r\nh1 { color: red; }\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
11
+ form-data; name=\"output\"\r\n\r\nsoap12\r\n--349832898984244898448024464570528145--\r\n"
9
12
  headers:
13
+ Content-Type:
14
+ - multipart/form-data; boundary=349832898984244898448024464570528145
10
15
  Accept-Encoding:
11
16
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
17
  Accept:
@@ -21,7 +26,7 @@ http_interactions:
21
26
  Cache-Control:
22
27
  - no-cache
23
28
  Date:
24
- - Thu, 24 Apr 2014 07:25:20 GMT
29
+ - Sat, 17 Dec 2016 08:33:24 GMT
25
30
  Pragma:
26
31
  - no-cache
27
32
  Transfer-Encoding:
@@ -31,7 +36,7 @@ http_interactions:
31
36
  Content-Type:
32
37
  - application/soap+xml;charset=utf-8
33
38
  Server:
34
- - Jigsaw/2.3.0-beta3
39
+ - Jigsaw/2.3.0-beta2
35
40
  Vary:
36
41
  - Accept-Language
37
42
  X-W3c-Validator-Errors:
@@ -42,14 +47,14 @@ http_interactions:
42
47
  encoding: UTF-8
43
48
  string: "<?xml version='1.0' encoding=\"utf-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n
44
49
  \ <env:Body>\n <m:cssvalidationresponse\n env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\"\n
45
- \ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>file://localhost/TextArea</m:uri>\n
50
+ \ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>TextArea</m:uri>\n
46
51
  \ <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>\n
47
- \ <m:csslevel>css3</m:csslevel>\n <m:date>2014-04-24T07:25:20Z</m:date>\n
52
+ \ <m:csslevel>css3</m:csslevel>\n <m:date>2016-12-17T08:33:24Z</m:date>\n
48
53
  \ <m:validity>true</m:validity>\n <m:result>\n <m:errors
49
54
  xml:lang=\"en\">\n <m:errorcount>0</m:errorcount>\n \n
50
55
  \ </m:errors>\n <m:warnings xml:lang=\"en\">\n
51
56
  \ <m:warningcount>0</m:warningcount>\n </m:warnings>\n
52
57
  \ </m:result>\n </m:cssvalidationresponse>\n </env:Body>\n</env:Envelope>\n\n"
53
58
  http_version:
54
- recorded_at: Thu, 24 Apr 2014 07:25:20 GMT
55
- recorded_with: VCR 2.9.0
59
+ recorded_at: Sat, 17 Dec 2016 08:33:24 GMT
60
+ recorded_with: VCR 3.0.3
@@ -1,12 +1,17 @@
1
1
  ---
2
2
  http_interactions:
3
3
  - request:
4
- method: get
5
- uri: http://jigsaw.w3.org/css-validator/validator?output=soap12&profile=css3&text=h1%20%7B%20%3B%20%7B
4
+ method: post
5
+ uri: http://jigsaw.w3.org/css-validator/validator
6
6
  body:
7
- encoding: US-ASCII
8
- string: ''
7
+ encoding: UTF-8
8
+ string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
9
+ name=\"profile\"\r\n\r\ncss3\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
10
+ form-data; name=\"text\"\r\n\r\nh1 { ; {\r\n--349832898984244898448024464570528145\r\nContent-Disposition:
11
+ form-data; name=\"output\"\r\n\r\nsoap12\r\n--349832898984244898448024464570528145--\r\n"
9
12
  headers:
13
+ Content-Type:
14
+ - multipart/form-data; boundary=349832898984244898448024464570528145
10
15
  Accept-Encoding:
11
16
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
12
17
  Accept:
@@ -21,7 +26,7 @@ http_interactions:
21
26
  Cache-Control:
22
27
  - no-cache
23
28
  Date:
24
- - Sat, 06 Dec 2014 11:12:00 GMT
29
+ - Sat, 17 Dec 2016 08:33:24 GMT
25
30
  Pragma:
26
31
  - no-cache
27
32
  Transfer-Encoding:
@@ -31,7 +36,7 @@ http_interactions:
31
36
  Content-Type:
32
37
  - application/soap+xml;charset=utf-8
33
38
  Server:
34
- - Jigsaw/2.3.0-beta2
39
+ - Jigsaw/2.3.0-beta3
35
40
  Vary:
36
41
  - Accept-Language
37
42
  X-W3c-Validator-Errors:
@@ -42,9 +47,9 @@ http_interactions:
42
47
  encoding: UTF-8
43
48
  string: "<?xml version='1.0' encoding=\"utf-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n
44
49
  \ <env:Body>\n <m:cssvalidationresponse\n env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\"\n
45
- \ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>file://localhost/TextArea</m:uri>\n
50
+ \ xmlns:m=\"http://www.w3.org/2005/07/css-validator\">\n <m:uri>TextArea</m:uri>\n
46
51
  \ <m:checkedby>http://jigsaw.w3.org/css-validator/</m:checkedby>\n
47
- \ <m:csslevel>css3</m:csslevel>\n <m:date>2014-12-06T11:12:00Z</m:date>\n
52
+ \ <m:csslevel>css3</m:csslevel>\n <m:date>2016-12-17T08:33:24Z</m:date>\n
48
53
  \ <m:validity>false</m:validity>\n <m:result>\n <m:errors
49
54
  xml:lang=\"en\">\n <m:errorcount>1</m:errorcount>\n \n
50
55
  \ <m:errorlist>\n <m:uri>file://localhost/TextArea</m:uri>\n
@@ -61,5 +66,5 @@ http_interactions:
61
66
  \ </m:warnings>\n </m:result>\n </m:cssvalidationresponse>\n
62
67
  \ </env:Body>\n</env:Envelope>\n\n"
63
68
  http_version:
64
- recorded_at: Sat, 06 Dec 2014 11:12:00 GMT
65
- recorded_with: VCR 2.9.3
69
+ recorded_at: Sat, 17 Dec 2016 08:33:24 GMT
70
+ recorded_with: VCR 3.0.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://validator.w3.org/check
5
+ uri: https://validator.w3.org/check
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
@@ -24,9 +24,9 @@ http_interactions:
24
24
  message: OK
25
25
  headers:
26
26
  Date:
27
- - Thu, 24 Apr 2014 07:25:20 GMT
27
+ - Sat, 17 Dec 2016 08:33:18 GMT
28
28
  Server:
29
- - Apache/2.2.16 (Debian)
29
+ - Apache/2.4.10 (Debian)
30
30
  X-W3c-Validator-Recursion:
31
31
  - '1'
32
32
  X-W3c-Validator-Status:
@@ -35,23 +35,38 @@ http_interactions:
35
35
  - '2'
36
36
  X-W3c-Validator-Warnings:
37
37
  - '4'
38
- Content-Type:
39
- - application/soap+xml; charset=UTF-8
40
- Connection:
41
- - close
42
38
  Transfer-Encoding:
43
39
  - chunked
40
+ Content-Type:
41
+ - application/soap+xml; charset=UTF-8
42
+ Strict-Transport-Security:
43
+ - max-age=15552015; preload
44
+ Public-Key-Pins:
45
+ - pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
46
+ pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
47
+ X-Frame-Options:
48
+ - deny
49
+ X-Xss-Protection:
50
+ - 1; mode=block
44
51
  body:
45
52
  encoding: UTF-8
46
53
  string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
47
54
  env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
48
55
  \ \n <m:uri>output/blah.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
49
56
  \ <m:doctype></m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>false</m:validity>\n
50
- \ <m:errors>\n <m:errorcount>2</m:errorcount>\n <m:errorlist>\n
51
- \ \n <m:error>\n <m:line>1</m:line>\n <m:col>1</m:col>\n
52
- \ <m:message>no document type declaration; will parse without
53
- validation</m:message>\n <m:messageid>187</m:messageid>\n <m:explanation>
54
- \ <![CDATA[\n <p class=\"helpwanted\">\n <a\n href=\"feedback.html?uri=;errmsg_id=187#errormsg\"\n\ttitle=\"Suggest
57
+ \ <m:warnings>\n <m:warningcount>4</m:warningcount>\n <m:warninglist>\n
58
+ \ \n\n\n\n\n <m:warning><m:messageid>W04</m:messageid><m:message>No
59
+ Character Encoding Found!\n \n Falling back to \n \n UTF-8.\n
60
+ \ </m:message></m:warning>\n\n\n\n <m:warning><m:messageid>W06</m:messageid><m:message>Unable
61
+ to Determine Parse Mode!</m:message></m:warning>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
62
+ \ <m:warning><m:messageid>W27</m:messageid><m:message>No Character encoding
63
+ declared at document level</m:message></m:warning>\n\n\n\n\n\n\n\n </m:warninglist>\n
64
+ \ </m:warnings>\n <m:errors>\n <m:errorcount>2</m:errorcount>\n
65
+ \ <m:errorlist>\n\n <m:error>\n <m:line>1</m:line>\n
66
+ \ <m:col>1</m:col>\n <m:message>no document type
67
+ declaration; will parse without validation</m:message>\n <m:messageid>187</m:messageid>\n
68
+ \ <m:explanation> <![CDATA[\n <p class=\"helpwanted\">\n
69
+ \ <a\n href=\"feedback.html?uri=;errmsg_id=187#errormsg\"\n\ttitle=\"Suggest
55
70
  improvements on this error message through our feedback channels\" \n >&#x2709;</a>\n
56
71
  \ </p>\n\n <div class=\"ve mid-187\">\n <p>The document type could
57
72
  not be determined, because the document had no correct DOCTYPE declaration.
@@ -81,14 +96,7 @@ http_interactions:
81
96
  entry</a>.\n </p>\n </div>\n\n ]]>\n </m:explanation>\n
82
97
  \ <m:source><![CDATA[&#60;h2&#62;Hi!&#60;/h1<strong title=\"Position
83
98
  where error was detected.\">&#62;</strong>]]></m:source>\n </m:error>\n
84
- \ \n </m:errorlist>\n </m:errors>\n <m:warnings>\n <m:warningcount>4</m:warningcount>\n
85
- \ <m:warninglist>\n \n\n\n\n <m:warning><m:messageid>W04</m:messageid><m:message>No
86
- Character Encoding Found!\n \n Falling back to \n \n UTF-8.\n
87
- \ </m:message></m:warning>\n\n\n\n <m:warning><m:messageid>W06</m:messageid><m:message>Unable
88
- to Determine Parse Mode!</m:message></m:warning>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
89
- \ <m:warning><m:messageid>W27</m:messageid><m:message>No Character encoding
90
- declared at document level</m:message></m:warning>\n\n\n\n\n\n\n\n \n
91
- \ </m:warninglist>\n </m:warnings>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
99
+ \ \n </m:errorlist>\n </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
92
100
  http_version:
93
- recorded_at: Thu, 24 Apr 2014 07:25:21 GMT
94
- recorded_with: VCR 2.9.0
101
+ recorded_at: Sat, 17 Dec 2016 08:33:19 GMT
102
+ recorded_with: VCR 3.0.3
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: http://validator.w3.org/check
5
+ uri: https://validator.w3.org/check
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
@@ -20,37 +20,105 @@ http_interactions:
20
20
  - Ruby
21
21
  response:
22
22
  status:
23
- code: 200
24
- message: OK
23
+ code: 307
24
+ message: Temporary Redirect
25
25
  headers:
26
26
  Date:
27
- - Thu, 24 Apr 2014 07:25:21 GMT
27
+ - Sat, 17 Dec 2016 08:36:04 GMT
28
28
  Server:
29
- - Apache/2.2.16 (Debian)
30
- X-W3c-Validator-Recursion:
31
- - '1'
32
- X-W3c-Validator-Status:
33
- - Valid
34
- X-W3c-Validator-Errors:
35
- - '0'
36
- X-W3c-Validator-Warnings:
37
- - '1'
38
- Content-Type:
39
- - application/soap+xml; charset=UTF-8
40
- Connection:
41
- - close
29
+ - Apache/2.4.10 (Debian)
30
+ Location:
31
+ - https://validator.w3.org/nu/#file
42
32
  Transfer-Encoding:
43
33
  - chunked
34
+ Strict-Transport-Security:
35
+ - max-age=15552015; preload
36
+ Public-Key-Pins:
37
+ - pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
38
+ pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
39
+ X-Frame-Options:
40
+ - deny
41
+ X-Xss-Protection:
42
+ - 1; mode=block
44
43
  body:
45
44
  encoding: UTF-8
46
- string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
45
+ string: "Status: 302 Found\r\nLocation: https://validator.w3.org/nu/?doc=output%2Fblah.html\r\n\r\nContent-Type:
46
+ application/soap+xml; charset=UTF-8\nX-W3C-Validator-Recursion: 1\nX-W3C-Validator-Status:
47
+ Valid\nX-W3C-Validator-Errors: 0\nX-W3C-Validator-Warnings: 1\n\n<?xml version=\"1.0\"
48
+ encoding=\"UTF-8\"?>\n<env:Envelope xmlns:env=\"http://www.w3.org/2003/05/soap-envelope\">\n<env:Body>\n<m:markupvalidationresponse
47
49
  env:encodingStyle=\"http://www.w3.org/2003/05/soap-encoding\" xmlns:m=\"http://www.w3.org/2005/10/markup-validator\">\n
48
50
  \ \n <m:uri>output/blah.html</m:uri>\n <m:checkedby>http://validator.w3.org/</m:checkedby>\n
49
51
  \ <m:doctype>HTML5</m:doctype>\n <m:charset>utf-8</m:charset>\n <m:validity>true</m:validity>\n
50
- \ <m:errors>\n <m:errorcount>0</m:errorcount>\n <m:errorlist>\n
51
- \ \n </m:errorlist>\n </m:errors>\n <m:warnings>\n <m:warningcount>1</m:warningcount>\n
52
- \ <m:warninglist>\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
53
- \ \n </m:warninglist>\n </m:warnings>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
52
+ \ <m:warnings>\n <m:warningcount>1</m:warningcount>\n <m:warninglist>\n
53
+ \ <m:warning>\n <m:message>This interface to HTML5
54
+ document checking is obsolete. Use an interface to https://validator.w3.org/nu/
55
+ instead.</m:message>\n <m:messageid>obsolete-interface</m:messageid>\n
56
+ \ <m:explanation> <![CDATA[\n <div class=\"ve
57
+ obsolete-interface\">\n <p>\n The
58
+ method you used to check this document relies on an obsolete interface\n that
59
+ will become permanently unavailable in the near future.\n The
60
+ currently-supported method is to instead use the W3C Nu Html Checker at\n
61
+ \ <a href=\"https://validator.w3.org/nu/\">https://validator.w3.org/nu/</a>.\n
62
+ \ See the documentation on the W3C Nu Html Checker's\n
63
+ \ <a href=\"https://github.com/validator/validator/wiki/Service:-Input:-GET\">GET
64
+ interface</a>,\n <a href=\"https://github.com/validator/validator/wiki/Service:-Input:-POST-body\">POST
65
+ interface</a>,\n and\n <a href=\"https://github.com/validator/validator/wiki/Service:-Common-parameters\">the
66
+ parameters</a>\n that both interfaces provide, such
67
+ as the\n <a href=\"https://github.com/validator/validator/wiki/Output%3A-JSON\">out=json</a>,\n
68
+ \ <a href=\"https://github.com/validator/validator/wiki/Output:-XML\">out=xml</a>,\n
69
+ \ and\n <a href=\"https://github.com/validator/validator/wiki/Output:-GNU\">out=gnu</a>\n
70
+ \ parameters/output-formats.\n </p>\n
71
+ \ <p>\n For comments or questions
72
+ about this message, send mail to\n <a href=\"mailto:www-validator@w3.org\">www-validator@w3.org</a>\n
73
+ \ or to\n <a href=\"https://twitter.com/w3c\">@w3c</a>
74
+ on twitter.\n </p>\n </div>\n ]]>\n
75
+ \ </m:explanation>\n <m:source></m:source>\n
76
+ \ </m:warning>\n </m:warninglist>\n </m:warnings>\n <m:errors>\n
77
+ \ <m:errorcount>0</m:errorcount>\n <m:errorlist>\n\n </m:errorlist>\n
78
+ \ </m:errors>\n</m:markupvalidationresponse>\n</env:Body>\n</env:Envelope>\n"
79
+ http_version:
80
+ recorded_at: Sat, 17 Dec 2016 08:36:05 GMT
81
+ - request:
82
+ method: post
83
+ uri: https://validator.w3.org/check
84
+ body:
85
+ encoding: UTF-8
86
+ string: "--349832898984244898448024464570528145\r\nContent-Disposition: form-data;
87
+ name=\"url\"\r\n\r\nhttps://validator.w3.org/nu/#file\r\n--349832898984244898448024464570528145--\r\n"
88
+ headers:
89
+ Content-Type:
90
+ - multipart/form-data; boundary=349832898984244898448024464570528145
91
+ Accept-Encoding:
92
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
93
+ Accept:
94
+ - "*/*"
95
+ User-Agent:
96
+ - Ruby
97
+ response:
98
+ status:
99
+ code: 302
100
+ message: Found
101
+ headers:
102
+ Date:
103
+ - Sat, 17 Dec 2016 08:36:05 GMT
104
+ Server:
105
+ - Apache/2.4.10 (Debian)
106
+ Location:
107
+ - http://validator.w3.org/check?uri=https%3A%2F%2Fvalidator.w3.org%2Fnu%2F%23file
108
+ Content-Length:
109
+ - '0'
110
+ Strict-Transport-Security:
111
+ - max-age=15552015; preload
112
+ Public-Key-Pins:
113
+ - pin-sha256="cN0QSpPIkuwpT6iP2YjEo1bEwGpH/yiUn6yhdy+HNto="; pin-sha256="WGJkyYjx1QMdMe0UqlyOKXtydPDVrk7sl2fV+nNm1r4=";
114
+ pin-sha256="LrKdTxZLRTvyHM4/atX2nquX9BeHRZMCxg3cf4rhc2I="; max-age=864000
115
+ X-Frame-Options:
116
+ - deny
117
+ X-Xss-Protection:
118
+ - 1; mode=block
119
+ body:
120
+ encoding: UTF-8
121
+ string: ''
54
122
  http_version:
55
- recorded_at: Thu, 24 Apr 2014 07:25:21 GMT
56
- recorded_with: VCR 2.9.0
123
+ recorded_at: Sat, 17 Dec 2016 08:36:06 GMT
124
+ recorded_with: VCR 3.0.3
@@ -93,6 +93,68 @@ class Nanoc::Helpers::BloggingTest < Nanoc::TestCase
93
93
  end
94
94
  end
95
95
 
96
+ def test_atom_feed_updated_is_most_recent
97
+ if_have 'builder' do
98
+ # Create items
99
+ @items = [mock_item, mock_article, mock_article]
100
+
101
+ # Create item 1
102
+ @items[1].stubs(:[]).with(:updated_at).returns(nil)
103
+ @items[1].stubs(:[]).with(:created_at).returns(Time.parse('2016-12-01 17:20:00 +00:00'))
104
+ @items[1].expects(:compiled_content).returns('item 1 content')
105
+
106
+ # Create item 2
107
+ @items[2].stubs(:[]).with(:updated_at).returns(nil)
108
+ @items[2].stubs(:[]).with(:created_at).returns(Time.parse('2016-12-01 18:40:00 +00:00'))
109
+ @items[2].expects(:compiled_content).returns('item 2 content')
110
+
111
+ # Mock site
112
+ @config = Nanoc::ConfigView.new({ base_url: 'http://example.com' }, nil)
113
+
114
+ # Create feed item
115
+ @item = mock
116
+ @item.stubs(:[]).with(:title).returns('My Cool Blog')
117
+ @item.stubs(:[]).with(:author_name).returns('Denis Defreyne')
118
+ @item.stubs(:[]).with(:author_uri).returns('http://stoneship.org/')
119
+ @item.stubs(:[]).with(:feed_url).returns(nil)
120
+ @item.stubs(:path).returns('/journal/feed/')
121
+
122
+ # Check
123
+ assert_match(%r{<title>My Cool Blog</title>\n <updated>2016-12-01T18:40:00Z</updated>}, atom_feed)
124
+ end
125
+ end
126
+
127
+ def test_atom_feed_updated_is_most_recent_updated_at
128
+ if_have 'builder' do
129
+ # Create items
130
+ @items = [mock_item, mock_article, mock_article]
131
+
132
+ # Create item 1
133
+ @items[1].stubs(:[]).with(:updated_at).returns(Time.parse('2016-12-01 19:20:00 +00:00'))
134
+ @items[1].stubs(:[]).with(:created_at).returns(Time.parse('2016-12-01 17:20:00 +00:00'))
135
+ @items[1].expects(:compiled_content).returns('item 1 content')
136
+
137
+ # Create item 2
138
+ @items[2].stubs(:[]).with(:updated_at).returns(Time.parse('2016-12-01 20:40:00 +00:00'))
139
+ @items[2].stubs(:[]).with(:created_at).returns(Time.parse('2016-12-01 18:40:00 +00:00'))
140
+ @items[2].expects(:compiled_content).returns('item 2 content')
141
+
142
+ # Mock site
143
+ @config = Nanoc::ConfigView.new({ base_url: 'http://example.com' }, nil)
144
+
145
+ # Create feed item
146
+ @item = mock
147
+ @item.stubs(:[]).with(:title).returns('My Cool Blog')
148
+ @item.stubs(:[]).with(:author_name).returns('Denis Defreyne')
149
+ @item.stubs(:[]).with(:author_uri).returns('http://stoneship.org/')
150
+ @item.stubs(:[]).with(:feed_url).returns(nil)
151
+ @item.stubs(:path).returns('/journal/feed/')
152
+
153
+ # Check
154
+ assert_match(%r{<title>My Cool Blog</title>\n <updated>2016-12-01T20:40:00Z</updated>}, atom_feed)
155
+ end
156
+ end
157
+
96
158
  def test_atom_feed_without_articles
97
159
  if_have 'builder' do
98
160
  # Mock items
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.2
4
+ version: 4.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-27 00:00:00.000000000 Z
11
+ date: 2016-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri