nanoc 3.7.2 → 3.7.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: 1ca3c26aee827d7103ec7df8af591543ac1e6146
4
- data.tar.gz: 1d2b4b6f1cc0082fffef58966079ee19cc6a73ad
3
+ metadata.gz: 1846757f101a6af4c5ca4162918499723f8aef23
4
+ data.tar.gz: a98022b27dcd1006ea2302bc55fcf9dcd023930b
5
5
  SHA512:
6
- metadata.gz: 72d40fe2758cdb63e649596200573aae2ab7cffdc2a96bc5e13b1c4f429b5e4ca630e5884ef493f9614aefaf267f67ed74913ef9bd4e371bb7e433487be50bce
7
- data.tar.gz: ffbffec0e7507c4e78be36a9484b0cd010d46d63244d414856574a297e78eff65af7671e07895492195b1927719becc3a81da01ebbd49ce6f00d06c47a4863b4
6
+ metadata.gz: a6c17a90232a432a8f759c76922a9fee0917cfd79396707df54d6594fb5e665126ba04164d6e58aa42365a080450fdd87c025169b50dced1d0bda5c60501ee84
7
+ data.tar.gz: 30ca231cbcdb8057aec80cf81462c533d60b151b9618aa08f2596b2c553b8111de2c262bf68b2dd7831b0b726275c494f9cff2a6de12916bb76371ef144a4756
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nanoc (3.7.2)
4
+ nanoc (3.7.3)
5
5
  cri (~> 2.3)
6
6
 
7
7
  GEM
@@ -18,17 +18,17 @@ GEM
18
18
  timers (~> 1.1.0)
19
19
  chunky_png (1.3.1)
20
20
  coderay (1.1.0)
21
- coffee-script (2.2.0)
21
+ coffee-script (2.3.0)
22
22
  coffee-script-source
23
23
  execjs
24
- coffee-script-source (1.7.0)
24
+ coffee-script-source (1.8.0)
25
25
  colored (1.2)
26
26
  commonjs (0.2.7)
27
- compass (0.12.6)
27
+ compass (0.12.7)
28
28
  chunky_png (~> 1.2)
29
29
  fssm (>= 0.2.7)
30
30
  sass (~> 3.2.19)
31
- coveralls (0.7.0)
31
+ coveralls (0.7.1)
32
32
  multi_json (~> 1.3)
33
33
  rest-client
34
34
  simplecov (>= 0.7)
@@ -38,29 +38,34 @@ GEM
38
38
  safe_yaml (~> 1.0.0)
39
39
  cri (2.6.1)
40
40
  colored (~> 1.2)
41
- docile (1.1.3)
41
+ docile (1.1.5)
42
42
  erubis (2.7.0)
43
- excon (0.36.0)
44
- execjs (2.2.0)
43
+ excon (0.39.5)
44
+ execjs (2.2.1)
45
45
  ffi (1.9.3)
46
- fog (1.22.1)
46
+ fog (1.23.0)
47
47
  fog-brightbox
48
- fog-core (~> 1.22)
48
+ fog-core (~> 1.23)
49
49
  fog-json
50
+ fog-softlayer
50
51
  ipaddress (~> 0.5)
51
52
  nokogiri (~> 1.5, >= 1.5.11)
52
- fog-brightbox (0.0.2)
53
- fog-core
53
+ fog-brightbox (0.4.1)
54
+ fog-core (~> 1.22)
54
55
  fog-json
55
- fog-core (1.22.0)
56
+ inflecto
57
+ fog-core (1.24.0)
56
58
  builder
57
- excon (~> 0.33)
59
+ excon (~> 0.38)
58
60
  formatador (~> 0.2)
59
61
  mime-types
60
62
  net-scp (~> 1.1)
61
63
  net-ssh (>= 2.1.3)
62
64
  fog-json (1.0.0)
63
65
  multi_json (~> 1.0)
66
+ fog-softlayer (0.3.16)
67
+ fog-core
68
+ fog-json
64
69
  formatador (0.2.5)
65
70
  fssm (0.2.10)
66
71
  haml (4.0.5)
@@ -69,13 +74,14 @@ GEM
69
74
  handlebars-source (~> 1.3.0)
70
75
  therubyracer (~> 0.12.0)
71
76
  handlebars-source (1.3.0)
77
+ inflecto (0.0.2)
72
78
  ipaddress (0.8.0)
73
79
  json (1.8.1)
74
- kramdown (1.3.3)
80
+ kramdown (1.4.1)
75
81
  less (2.6.0)
76
82
  commonjs (~> 0.2.7)
77
83
  libv8 (3.16.14.3)
78
- listen (2.7.7)
84
+ listen (2.7.9)
79
85
  celluloid (>= 0.15.2)
80
86
  rb-fsevent (>= 0.9.3)
81
87
  rb-inotify (>= 0.9)
@@ -90,23 +96,24 @@ GEM
90
96
  mocha (1.1.0)
91
97
  metaclass (~> 0.0.1)
92
98
  multi_json (1.10.1)
93
- mustache (0.99.5)
99
+ mustache (0.99.6)
94
100
  net-scp (1.2.1)
95
101
  net-ssh (>= 2.6.5)
96
102
  net-ssh (2.9.1)
97
- nokogiri (1.6.2.1)
103
+ netrc (0.7.7)
104
+ nokogiri (1.6.3.1)
98
105
  mini_portile (= 0.6.0)
99
106
  pandoc-ruby (0.7.5)
100
- parser (2.1.9)
107
+ parser (2.2.0.pre.4)
101
108
  ast (>= 1.1, < 3.0)
102
109
  slop (~> 3.4, >= 3.4.5)
103
- posix-spawn (0.3.8)
110
+ posix-spawn (0.3.9)
104
111
  powerpack (0.0.9)
105
- pry (0.9.12.6)
106
- coderay (~> 1.0)
107
- method_source (~> 0.8)
112
+ pry (0.10.1)
113
+ coderay (~> 1.1.0)
114
+ method_source (~> 0.8.1)
108
115
  slop (~> 3.4)
109
- pygments.rb (0.5.4)
116
+ pygments.rb (0.6.0)
110
117
  posix-spawn (~> 0.3.6)
111
118
  yajl-ruby (~> 1.1.0)
112
119
  rack (1.5.2)
@@ -121,12 +128,12 @@ GEM
121
128
  json (~> 1.4)
122
129
  redcarpet (3.1.2)
123
130
  ref (1.0.5)
124
- rest-client (1.6.7)
125
- mime-types (>= 1.16)
126
- rouge (1.4.0)
127
- rubocop (0.23.0)
128
- json (>= 1.7.7, < 2)
129
- parser (~> 2.1.9)
131
+ rest-client (1.7.2)
132
+ mime-types (>= 1.16, < 3.0)
133
+ netrc (~> 0.7)
134
+ rouge (1.6.2)
135
+ rubocop (0.25.0)
136
+ parser (>= 2.2.0.pre.4, < 3.0)
130
137
  powerpack (~> 0.0.6)
131
138
  rainbow (>= 1.99.1, < 3.0)
132
139
  ruby-progressbar (~> 1.4)
@@ -134,16 +141,16 @@ GEM
134
141
  rubypants (0.2.0)
135
142
  safe_yaml (1.0.3)
136
143
  sass (3.2.19)
137
- simplecov (0.8.2)
144
+ simplecov (0.9.0)
138
145
  docile (~> 1.1.0)
139
146
  multi_json
140
147
  simplecov-html (~> 0.8.0)
141
148
  simplecov-html (0.8.0)
142
- slim (2.0.2)
149
+ slim (2.0.3)
143
150
  temple (~> 0.6.6)
144
151
  tilt (>= 1.3.3, < 2.1)
145
- slop (3.5.0)
146
- temple (0.6.7)
152
+ slop (3.6.0)
153
+ temple (0.6.8)
147
154
  term-ansicolor (1.3.0)
148
155
  tins (~> 1.0)
149
156
  therubyracer (0.12.1)
@@ -152,10 +159,10 @@ GEM
152
159
  thor (0.19.1)
153
160
  tilt (2.0.1)
154
161
  timers (1.1.0)
155
- tins (1.3.0)
156
- typogruby (1.0.16)
162
+ tins (1.3.2)
163
+ typogruby (1.0.17)
157
164
  rubypants
158
- uglifier (2.5.0)
165
+ uglifier (2.5.3)
159
166
  execjs (>= 0.3.0)
160
167
  json (>= 1.8.0)
161
168
  vcr (2.9.2)
data/NEWS.md CHANGED
@@ -1,12 +1,18 @@
1
1
  # nanoc news
2
2
 
3
+ ## 3.7.3 (2014-08-31)
4
+
5
+ Fixes:
6
+
7
+ * Fixed issue which caused metadata sections not be recognised in files that use CRLF line endings (#470, #471) [Gregory Pakosz]
8
+
3
9
  ## 3.7.2 (2014-08-17)
4
10
 
5
11
  Fixes:
6
12
 
7
13
  * Fixed broken links to the now defunct RubyForge (#454, #467)
8
14
  * Fixed crash when Gemfile is missing but Bundler is installed (#464)
9
- * Made filesystem data source strip only leading newlines, not all whitespace (#463) [Gregory Pakosz]
15
+ * Made filesystem data source not strip any whitespace (#463) [Gregory Pakosz]
10
16
 
11
17
  Enhancements:
12
18
 
@@ -257,7 +257,7 @@ module Nanoc::DataSources
257
257
  end
258
258
 
259
259
  # Split data
260
- pieces = data.split(/^(-{5}|-{3})[ \t]*\n/)
260
+ pieces = data.split(/^(-{5}|-{3})[ \t]*\r?\n?/, 3)
261
261
  if pieces.size < 4
262
262
  raise RuntimeError.new(
263
263
  "The file '#{content_filename}' appears to start with a metadata section (three or five dashes at the top) but it does not seem to be in the correct format."
@@ -270,7 +270,7 @@ module Nanoc::DataSources
270
270
  rescue Exception => e
271
271
  raise "Could not parse YAML for #{content_filename}: #{e.message}"
272
272
  end
273
- content = pieces[4..-1].join
273
+ content = pieces[4]
274
274
 
275
275
  # Done
276
276
  [ meta, content ]
@@ -3,6 +3,6 @@
3
3
  module Nanoc
4
4
 
5
5
  # The current nanoc version.
6
- VERSION = '3.7.2'
6
+ VERSION = '3.7.3'
7
7
 
8
8
  end
@@ -277,6 +277,57 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
277
277
  end
278
278
  end
279
279
 
280
+ def test_parse_embedded_meta_only_1
281
+ # Create a file
282
+ File.open('test.html', 'w') do |io|
283
+ io.write "-----\r\n"
284
+ io.write "foo: bar\n"
285
+ io.write "-----\n"
286
+ end
287
+
288
+ # Create data source
289
+ data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, nil)
290
+
291
+ # Parse it
292
+ result = data_source.instance_eval { parse('test.html', nil, 'foobar') }
293
+ assert_equal({ 'foo' => 'bar' }, result[0])
294
+ assert_equal("", result[1])
295
+ end
296
+
297
+ def test_parse_embedded_meta_only_2
298
+ # Create a file
299
+ File.open('test.html', 'w') do |io|
300
+ io.write "-----\n"
301
+ io.write "foo: bar\r\n"
302
+ io.write "-----\r"
303
+ end
304
+
305
+ # Create data source
306
+ data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, nil)
307
+
308
+ # Parse it
309
+ result = data_source.instance_eval { parse('test.html', nil, 'foobar') }
310
+ assert_equal({ 'foo' => 'bar' }, result[0])
311
+ assert_equal("", result[1])
312
+ end
313
+
314
+ def test_parse_embedded_meta_only_3
315
+ # Create a file
316
+ File.open('test.html', 'w') do |io|
317
+ io.write "-----\r\n"
318
+ io.write "foo: bar\n"
319
+ io.write "-----"
320
+ end
321
+
322
+ # Create data source
323
+ data_source = Nanoc::DataSources::FilesystemCombined.new(nil, nil, nil, nil)
324
+
325
+ # Parse it
326
+ result = data_source.instance_eval { parse('test.html', nil, 'foobar') }
327
+ assert_equal({ 'foo' => 'bar' }, result[0])
328
+ assert_equal("", result[1])
329
+ end
330
+
280
331
  def test_parse_embedded_invalid_2
281
332
  # Create a file
282
333
  File.open('test.html', 'w') do |io|
@@ -313,7 +364,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
313
364
  def test_parse_embedded_full_meta
314
365
  # Create a file
315
366
  File.open('test.html', 'w') do |io|
316
- io.write "-----\n"
367
+ io.write "-----\r\n"
317
368
  io.write "foo: bar\n"
318
369
  io.write "-----\n"
319
370
  io.write " \t\n blah blah\n"
@@ -352,6 +403,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
352
403
  io.write "-----\n"
353
404
  io.write "-----\n"
354
405
  io.write "\nblah blah\n"
406
+ io.write "-----"
355
407
  end
356
408
 
357
409
  # Create data source
@@ -360,7 +412,7 @@ class Nanoc::DataSources::FilesystemTest < Nanoc::TestCase
360
412
  # Parse it
361
413
  result = data_source.instance_eval { parse('test.html', nil, 'foobar') }
362
414
  assert_equal({}, result[0])
363
- assert_equal("\nblah blah\n", result[1])
415
+ assert_equal("\nblah blah\n-----", result[1])
364
416
  end
365
417
 
366
418
  def test_parse_utf8_bom
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: 3.7.2
4
+ version: 3.7.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: 2014-08-17 00:00:00.000000000 Z
11
+ date: 2014-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cri