nanoc 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -6
- data/NEWS.md +12 -0
- data/lib/nanoc/base/views/item_rep_collection_view.rb +9 -2
- data/lib/nanoc/base/views/mixins/mutable_document_view_mixin.rb +7 -0
- data/lib/nanoc/cli.rb +1 -1
- data/lib/nanoc/version.rb +1 -1
- data/nanoc.gemspec +1 -1
- data/test/cli/test_cli.rb +7 -0
- data/test/filters/test_sass.rb +10 -0
- data/test/helper.rb +4 -0
- metadata +3 -4
- data/Gemfile.lock +0 -339
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05cbb3c65c3fe6c353d2d11794737aa8e40c6453
|
4
|
+
data.tar.gz: 9649942612852ad74fb7af3d48bea7ad8caa765b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fae5f389d009fbf804397c22a2c09780a5ad81f6c44f7497dae35378303b95e66dbead03eb528021ded34dc0f7e6db465a90febc9c6601234bbc6a34a953925b
|
7
|
+
data.tar.gz: 43800887e36a8fd1fae20786e061157a8c318235c4399c655cdd67415ff1ceea4ad7dffb75751addebebc55dc23f2422f3fa02f335f6a3b9cc9680229412046c
|
data/Gemfile
CHANGED
@@ -23,11 +23,7 @@ gem 'maruku'
|
|
23
23
|
gem 'mime-types'
|
24
24
|
gem 'minitest', '~> 5.0'
|
25
25
|
gem 'mocha'
|
26
|
-
|
27
|
-
gem 'mustache', '~> 1.0'
|
28
|
-
else
|
29
|
-
gem 'mustache', '~> 0.99'
|
30
|
-
end
|
26
|
+
gem 'mustache', '~> 1.0'
|
31
27
|
gem 'nokogiri', '~> 1.6'
|
32
28
|
gem 'pandoc-ruby'
|
33
29
|
gem 'pry'
|
@@ -43,7 +39,7 @@ gem 'rouge'
|
|
43
39
|
gem 'rspec'
|
44
40
|
gem 'rubocop'
|
45
41
|
gem 'rubypants'
|
46
|
-
gem 'sass'
|
42
|
+
gem 'sass'
|
47
43
|
gem 'simplecov', require: false
|
48
44
|
gem 'slim'
|
49
45
|
gem 'typogruby'
|
data/NEWS.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Nanoc news
|
2
2
|
|
3
|
+
## 4.0.2 (2015-11-30)
|
4
|
+
|
5
|
+
Fixes:
|
6
|
+
|
7
|
+
* Properly set required Ruby version to 2.1 in the gem specification (#747)
|
8
|
+
* Fixed issue with CLI commands not being loaded as UTF-8 (#742)
|
9
|
+
* Added missing `#identifier=` method to items and layouts during preprocessing (#750)
|
10
|
+
|
11
|
+
Enhancements:
|
12
|
+
|
13
|
+
* Let attempts to fetch an item rep by number, rather than symbol, fail with a meaningful error (#749)
|
14
|
+
|
3
15
|
## 4.0.1 (2015-11-28)
|
4
16
|
|
5
17
|
Fixes:
|
@@ -47,8 +47,15 @@ module Nanoc
|
|
47
47
|
#
|
48
48
|
# @return [Nanoc::ItemRepView] if an item rep with the given name was found
|
49
49
|
def [](rep_name)
|
50
|
-
|
51
|
-
|
50
|
+
case rep_name
|
51
|
+
when Symbol
|
52
|
+
res = @item_reps.find { |ir| ir.name == rep_name }
|
53
|
+
res && Nanoc::ItemRepView.new(res)
|
54
|
+
when Fixnum
|
55
|
+
raise ArgumentError, "expected ItemRepCollectionView#[] to be called with a symbol (you likely want `.reps[:default]` rather than `.reps[#{rep_name}]`)"
|
56
|
+
else
|
57
|
+
raise ArgumentError, 'expected ItemRepCollectionView#[] to be called with a symbol'
|
58
|
+
end
|
52
59
|
end
|
53
60
|
|
54
61
|
# Return the item rep with the given name, or raises an exception if there
|
@@ -32,6 +32,13 @@ module Nanoc
|
|
32
32
|
unwrap.attributes[key] = value
|
33
33
|
end
|
34
34
|
|
35
|
+
# Sets the identifier to the given argument.
|
36
|
+
#
|
37
|
+
# @param [String, Nanoc::Identifier] arg
|
38
|
+
def identifier=(arg)
|
39
|
+
unwrap.identifier = Nanoc::Identifier.from(arg)
|
40
|
+
end
|
41
|
+
|
35
42
|
# Updates the attributes based on the given hash.
|
36
43
|
#
|
37
44
|
# @param [Hash] hash
|
data/lib/nanoc/cli.rb
CHANGED
@@ -152,7 +152,7 @@ module Nanoc::CLI
|
|
152
152
|
# @return [Cri::Command] The loaded command
|
153
153
|
def self.load_command_at(filename, command_name = nil)
|
154
154
|
# Load
|
155
|
-
code = File.read(filename)
|
155
|
+
code = File.read(filename, encoding: 'UTF-8')
|
156
156
|
cmd = Cri::Command.define(code, filename)
|
157
157
|
|
158
158
|
# Set name
|
data/lib/nanoc/version.rb
CHANGED
data/nanoc.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.rdoc_options = ['--main', 'README.md']
|
23
23
|
s.extra_rdoc_files = ['ChangeLog', 'LICENSE', 'README.md', 'NEWS.md']
|
24
24
|
|
25
|
-
s.required_ruby_version = '>= 2.
|
25
|
+
s.required_ruby_version = '>= 2.1.0'
|
26
26
|
|
27
27
|
s.add_runtime_dependency('cri', '~> 2.3')
|
28
28
|
|
data/test/cli/test_cli.rb
CHANGED
@@ -125,6 +125,13 @@ EOS
|
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
128
|
+
def test_load_command_at_with_non_utf8_encoding
|
129
|
+
Encoding.default_external = Encoding::US_ASCII
|
130
|
+
Nanoc::CLI.load_command_at(root_dir + '/lib/nanoc/cli/commands/create-site.rb')
|
131
|
+
ensure
|
132
|
+
Encoding.default_external = Encoding::UTF_8
|
133
|
+
end
|
134
|
+
|
128
135
|
def test_after_setup
|
129
136
|
$after_setup_success = false
|
130
137
|
Nanoc::CLI.after_setup do
|
data/test/filters/test_sass.rb
CHANGED
data/test/helper.rb
CHANGED
@@ -262,6 +262,10 @@ EOS
|
|
262
262
|
def skip_unless_symlinks_supported
|
263
263
|
skip 'Symlinks are not supported by Ruby on Windows' unless symlinks_supported?
|
264
264
|
end
|
265
|
+
|
266
|
+
def root_dir
|
267
|
+
File.absolute_path(File.dirname(__FILE__) + '/..')
|
268
|
+
end
|
265
269
|
end
|
266
270
|
|
267
271
|
class Nanoc::TestCase < Minitest::Test
|
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.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Defreyne
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cri
|
@@ -61,7 +61,6 @@ files:
|
|
61
61
|
- CONTRIBUTING.md
|
62
62
|
- ChangeLog
|
63
63
|
- Gemfile
|
64
|
-
- Gemfile.lock
|
65
64
|
- LICENSE
|
66
65
|
- NEWS.md
|
67
66
|
- README.md
|
@@ -345,7 +344,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
345
344
|
requirements:
|
346
345
|
- - ">="
|
347
346
|
- !ruby/object:Gem::Version
|
348
|
-
version: 2.
|
347
|
+
version: 2.1.0
|
349
348
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
350
349
|
requirements:
|
351
350
|
- - ">="
|
data/Gemfile.lock
DELETED
@@ -1,339 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
nanoc (4.0.1)
|
5
|
-
cri (~> 2.3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
CFPropertyList (2.3.2)
|
11
|
-
RedCloth (4.2.9)
|
12
|
-
addressable (2.3.8)
|
13
|
-
adsf (1.2.0)
|
14
|
-
rack (>= 1.0.0)
|
15
|
-
ast (2.1.0)
|
16
|
-
astrolabe (1.3.1)
|
17
|
-
parser (~> 2.2)
|
18
|
-
bluecloth (2.2.0)
|
19
|
-
builder (3.2.2)
|
20
|
-
chunky_png (1.3.5)
|
21
|
-
coderay (1.1.0)
|
22
|
-
coffee-script (2.4.1)
|
23
|
-
coffee-script-source
|
24
|
-
execjs
|
25
|
-
coffee-script-source (1.10.0)
|
26
|
-
colored (1.2)
|
27
|
-
commonjs (0.2.7)
|
28
|
-
compass (0.12.7)
|
29
|
-
chunky_png (~> 1.2)
|
30
|
-
fssm (>= 0.2.7)
|
31
|
-
sass (~> 3.2.19)
|
32
|
-
coveralls (0.8.9)
|
33
|
-
json (~> 1.8)
|
34
|
-
rest-client (>= 1.6.8, < 2)
|
35
|
-
simplecov (~> 0.10.0)
|
36
|
-
term-ansicolor (~> 1.3)
|
37
|
-
thor (~> 0.19.1)
|
38
|
-
tins (~> 1.6.0)
|
39
|
-
crack (0.4.2)
|
40
|
-
safe_yaml (~> 1.0.0)
|
41
|
-
cri (2.7.0)
|
42
|
-
colored (~> 1.2)
|
43
|
-
diff-lcs (1.2.5)
|
44
|
-
docile (1.1.5)
|
45
|
-
domain_name (0.5.25)
|
46
|
-
unf (>= 0.0.5, < 1.0.0)
|
47
|
-
erubis (2.7.0)
|
48
|
-
excon (0.45.4)
|
49
|
-
execjs (2.6.0)
|
50
|
-
ffi (1.9.10)
|
51
|
-
fission (0.5.0)
|
52
|
-
CFPropertyList (~> 2.2)
|
53
|
-
fog (1.36.0)
|
54
|
-
fog-aliyun (>= 0.1.0)
|
55
|
-
fog-atmos
|
56
|
-
fog-aws (>= 0.6.0)
|
57
|
-
fog-brightbox (~> 0.4)
|
58
|
-
fog-core (~> 1.32)
|
59
|
-
fog-dynect (~> 0.0.2)
|
60
|
-
fog-ecloud (~> 0.1)
|
61
|
-
fog-google (<= 0.1.0)
|
62
|
-
fog-json
|
63
|
-
fog-local
|
64
|
-
fog-powerdns (>= 0.1.1)
|
65
|
-
fog-profitbricks
|
66
|
-
fog-radosgw (>= 0.0.2)
|
67
|
-
fog-riakcs
|
68
|
-
fog-sakuracloud (>= 0.0.4)
|
69
|
-
fog-serverlove
|
70
|
-
fog-softlayer
|
71
|
-
fog-storm_on_demand
|
72
|
-
fog-terremark
|
73
|
-
fog-vmfusion
|
74
|
-
fog-voxel
|
75
|
-
fog-xenserver
|
76
|
-
fog-xml (~> 0.1.1)
|
77
|
-
ipaddress (~> 0.5)
|
78
|
-
nokogiri (~> 1.5, >= 1.5.11)
|
79
|
-
fog-aliyun (0.1.0)
|
80
|
-
fog-core (~> 1.27)
|
81
|
-
fog-json (~> 1.0)
|
82
|
-
ipaddress (~> 0.8)
|
83
|
-
xml-simple (~> 1.1)
|
84
|
-
fog-atmos (0.1.0)
|
85
|
-
fog-core
|
86
|
-
fog-xml
|
87
|
-
fog-aws (0.7.6)
|
88
|
-
fog-core (~> 1.27)
|
89
|
-
fog-json (~> 1.0)
|
90
|
-
fog-xml (~> 0.1)
|
91
|
-
ipaddress (~> 0.8)
|
92
|
-
fog-brightbox (0.9.0)
|
93
|
-
fog-core (~> 1.22)
|
94
|
-
fog-json
|
95
|
-
inflecto (~> 0.0.2)
|
96
|
-
fog-core (1.35.0)
|
97
|
-
builder
|
98
|
-
excon (~> 0.45)
|
99
|
-
formatador (~> 0.2)
|
100
|
-
fog-dynect (0.0.2)
|
101
|
-
fog-core
|
102
|
-
fog-json
|
103
|
-
fog-xml
|
104
|
-
fog-ecloud (0.3.0)
|
105
|
-
fog-core
|
106
|
-
fog-xml
|
107
|
-
fog-google (0.1.0)
|
108
|
-
fog-core
|
109
|
-
fog-json
|
110
|
-
fog-xml
|
111
|
-
fog-json (1.0.2)
|
112
|
-
fog-core (~> 1.0)
|
113
|
-
multi_json (~> 1.10)
|
114
|
-
fog-local (0.2.1)
|
115
|
-
fog-core (~> 1.27)
|
116
|
-
fog-powerdns (0.1.1)
|
117
|
-
fog-core (~> 1.27)
|
118
|
-
fog-json (~> 1.0)
|
119
|
-
fog-xml (~> 0.1)
|
120
|
-
fog-profitbricks (0.0.5)
|
121
|
-
fog-core
|
122
|
-
fog-xml
|
123
|
-
nokogiri
|
124
|
-
fog-radosgw (0.0.4)
|
125
|
-
fog-core (>= 1.21.0)
|
126
|
-
fog-json
|
127
|
-
fog-xml (>= 0.0.1)
|
128
|
-
fog-riakcs (0.1.0)
|
129
|
-
fog-core
|
130
|
-
fog-json
|
131
|
-
fog-xml
|
132
|
-
fog-sakuracloud (1.4.0)
|
133
|
-
fog-core
|
134
|
-
fog-json
|
135
|
-
fog-serverlove (0.1.2)
|
136
|
-
fog-core
|
137
|
-
fog-json
|
138
|
-
fog-softlayer (1.0.2)
|
139
|
-
fog-core
|
140
|
-
fog-json
|
141
|
-
fog-storm_on_demand (0.1.1)
|
142
|
-
fog-core
|
143
|
-
fog-json
|
144
|
-
fog-terremark (0.1.0)
|
145
|
-
fog-core
|
146
|
-
fog-xml
|
147
|
-
fog-vmfusion (0.1.0)
|
148
|
-
fission
|
149
|
-
fog-core
|
150
|
-
fog-voxel (0.1.0)
|
151
|
-
fog-core
|
152
|
-
fog-xml
|
153
|
-
fog-xenserver (0.2.2)
|
154
|
-
fog-core
|
155
|
-
fog-xml
|
156
|
-
fog-xml (0.1.2)
|
157
|
-
fog-core
|
158
|
-
nokogiri (~> 1.5, >= 1.5.11)
|
159
|
-
formatador (0.2.5)
|
160
|
-
fssm (0.2.10)
|
161
|
-
haml (4.0.7)
|
162
|
-
tilt
|
163
|
-
handlebars (0.7.0)
|
164
|
-
handlebars-source (~> 3.0.0)
|
165
|
-
therubyracer (~> 0.12.1)
|
166
|
-
handlebars-source (3.0.3)
|
167
|
-
hashdiff (0.2.3)
|
168
|
-
http-cookie (1.0.2)
|
169
|
-
domain_name (~> 0.5)
|
170
|
-
inflecto (0.0.2)
|
171
|
-
ipaddress (0.8.0)
|
172
|
-
json (1.8.3)
|
173
|
-
kramdown (1.9.0)
|
174
|
-
less (2.6.0)
|
175
|
-
commonjs (~> 0.2.7)
|
176
|
-
libv8 (3.16.14.13)
|
177
|
-
listen (3.0.5)
|
178
|
-
rb-fsevent (>= 0.9.3)
|
179
|
-
rb-inotify (>= 0.9)
|
180
|
-
markaby (0.8.0)
|
181
|
-
builder
|
182
|
-
maruku (0.7.2)
|
183
|
-
metaclass (0.0.4)
|
184
|
-
method_source (0.8.2)
|
185
|
-
mime-types (2.99)
|
186
|
-
mini_portile (0.6.2)
|
187
|
-
minitest (5.8.3)
|
188
|
-
mocha (1.1.0)
|
189
|
-
metaclass (~> 0.0.1)
|
190
|
-
multi_json (1.11.2)
|
191
|
-
mustache (1.0.2)
|
192
|
-
netrc (0.11.0)
|
193
|
-
nokogiri (1.6.6.4)
|
194
|
-
mini_portile (~> 0.6.0)
|
195
|
-
pandoc-ruby (1.0.0)
|
196
|
-
parser (2.2.3.0)
|
197
|
-
ast (>= 1.1, < 3.0)
|
198
|
-
posix-spawn (0.3.11)
|
199
|
-
powerpack (0.1.1)
|
200
|
-
pry (0.10.3)
|
201
|
-
coderay (~> 1.1.0)
|
202
|
-
method_source (~> 0.8.1)
|
203
|
-
slop (~> 3.4)
|
204
|
-
pygments.rb (0.6.3)
|
205
|
-
posix-spawn (~> 0.3.6)
|
206
|
-
yajl-ruby (~> 1.2.0)
|
207
|
-
rack (1.6.4)
|
208
|
-
rainbow (2.0.0)
|
209
|
-
rainpress (1.0)
|
210
|
-
rake (10.4.2)
|
211
|
-
rb-fsevent (0.9.6)
|
212
|
-
rb-inotify (0.9.5)
|
213
|
-
ffi (>= 0.5.0)
|
214
|
-
rdiscount (2.1.8)
|
215
|
-
rdoc (4.2.0)
|
216
|
-
redcarpet (3.3.3)
|
217
|
-
ref (2.0.0)
|
218
|
-
rest-client (1.8.0)
|
219
|
-
http-cookie (>= 1.0.2, < 2.0)
|
220
|
-
mime-types (>= 1.16, < 3.0)
|
221
|
-
netrc (~> 0.7)
|
222
|
-
rouge (1.10.1)
|
223
|
-
rspec (3.4.0)
|
224
|
-
rspec-core (~> 3.4.0)
|
225
|
-
rspec-expectations (~> 3.4.0)
|
226
|
-
rspec-mocks (~> 3.4.0)
|
227
|
-
rspec-core (3.4.1)
|
228
|
-
rspec-support (~> 3.4.0)
|
229
|
-
rspec-expectations (3.4.0)
|
230
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
231
|
-
rspec-support (~> 3.4.0)
|
232
|
-
rspec-mocks (3.4.0)
|
233
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
234
|
-
rspec-support (~> 3.4.0)
|
235
|
-
rspec-support (3.4.1)
|
236
|
-
rubocop (0.35.1)
|
237
|
-
astrolabe (~> 1.3)
|
238
|
-
parser (>= 2.2.3.0, < 3.0)
|
239
|
-
powerpack (~> 0.1)
|
240
|
-
rainbow (>= 1.99.1, < 3.0)
|
241
|
-
ruby-progressbar (~> 1.7)
|
242
|
-
tins (<= 1.6.0)
|
243
|
-
ruby-progressbar (1.7.5)
|
244
|
-
rubypants (0.2.0)
|
245
|
-
safe_yaml (1.0.4)
|
246
|
-
sass (3.2.19)
|
247
|
-
simplecov (0.10.0)
|
248
|
-
docile (~> 1.1.0)
|
249
|
-
json (~> 1.8)
|
250
|
-
simplecov-html (~> 0.10.0)
|
251
|
-
simplecov-html (0.10.0)
|
252
|
-
slim (3.0.6)
|
253
|
-
temple (~> 0.7.3)
|
254
|
-
tilt (>= 1.3.3, < 2.1)
|
255
|
-
slop (3.6.0)
|
256
|
-
temple (0.7.6)
|
257
|
-
term-ansicolor (1.3.2)
|
258
|
-
tins (~> 1.0)
|
259
|
-
therubyracer (0.12.2)
|
260
|
-
libv8 (~> 3.16.14.0)
|
261
|
-
ref
|
262
|
-
thor (0.19.1)
|
263
|
-
tilt (2.0.1)
|
264
|
-
tins (1.6.0)
|
265
|
-
typogruby (1.0.18)
|
266
|
-
rubypants
|
267
|
-
uglifier (2.7.2)
|
268
|
-
execjs (>= 0.3.0)
|
269
|
-
json (>= 1.8.0)
|
270
|
-
unf (0.1.4)
|
271
|
-
unf_ext
|
272
|
-
unf_ext (0.0.7.1)
|
273
|
-
vcr (3.0.0)
|
274
|
-
w3c_validators (1.2)
|
275
|
-
json
|
276
|
-
nokogiri
|
277
|
-
webmock (1.22.3)
|
278
|
-
addressable (>= 2.3.6)
|
279
|
-
crack (>= 0.3.2)
|
280
|
-
hashdiff
|
281
|
-
xml-simple (1.1.5)
|
282
|
-
yajl-ruby (1.2.1)
|
283
|
-
yard (0.8.7.6)
|
284
|
-
yuicompressor (1.3.3)
|
285
|
-
|
286
|
-
PLATFORMS
|
287
|
-
ruby
|
288
|
-
|
289
|
-
DEPENDENCIES
|
290
|
-
RedCloth
|
291
|
-
adsf
|
292
|
-
bluecloth
|
293
|
-
builder
|
294
|
-
bundler (>= 1.7.10, < 2.0)
|
295
|
-
coderay
|
296
|
-
coffee-script
|
297
|
-
compass
|
298
|
-
coveralls
|
299
|
-
erubis
|
300
|
-
fog
|
301
|
-
haml
|
302
|
-
handlebars
|
303
|
-
kramdown
|
304
|
-
less (~> 2.0)
|
305
|
-
listen
|
306
|
-
markaby
|
307
|
-
maruku
|
308
|
-
mime-types
|
309
|
-
minitest (~> 5.0)
|
310
|
-
mocha
|
311
|
-
mustache (~> 1.0)
|
312
|
-
nanoc!
|
313
|
-
nokogiri (~> 1.6)
|
314
|
-
pandoc-ruby
|
315
|
-
pry
|
316
|
-
pygments.rb
|
317
|
-
rack
|
318
|
-
rainpress
|
319
|
-
rake
|
320
|
-
rdiscount
|
321
|
-
rdoc
|
322
|
-
redcarpet
|
323
|
-
rouge
|
324
|
-
rspec
|
325
|
-
rubocop
|
326
|
-
rubypants
|
327
|
-
sass (~> 3.2.2)
|
328
|
-
simplecov
|
329
|
-
slim
|
330
|
-
typogruby
|
331
|
-
uglifier
|
332
|
-
vcr
|
333
|
-
w3c_validators
|
334
|
-
webmock
|
335
|
-
yard
|
336
|
-
yuicompressor
|
337
|
-
|
338
|
-
BUNDLED WITH
|
339
|
-
1.10.6
|