nanoc-spec 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/NEWS.md +6 -0
- data/README.md +1 -1
- data/lib/nanoc/spec/version.rb +1 -1
- data/lib/nanoc/spec.rb +35 -25
- metadata +10 -17
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a62c92d5c6eabf7a3268ffc90109ec3c32212463e8c37bc799506dddf8d9c99a
|
|
4
|
+
data.tar.gz: 2e733c4a4df8ea6df2f36b15fc72f90865b1d4b3daa7ef6c4abb89a591493241
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3ec00b4e563707024bba1b2432f22a496639637fc2f2922d758564af3872e91c4996998f671464af535a5c24b13255ad81a0cfb6b884f467ea54cdf1ff826998
|
|
7
|
+
data.tar.gz: 9435be420758387e369116a9d89ac142de3d2b26eb118ed5fb49d11aa259fc8ce2c7571c9e4d6cb12ff06f157ac169367f8ad98113669e53110a702cb661eb7e
|
data/NEWS.md
CHANGED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# nanoc-spec
|
|
2
2
|
|
|
3
|
-
This provides `Nanoc::Spec`, which contains a bunch of functionality that facilitates writing tests for [Nanoc](https://nanoc.
|
|
3
|
+
This provides `Nanoc::Spec`, which contains a bunch of functionality that facilitates writing tests for [Nanoc](https://nanoc.app).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
data/lib/nanoc/spec/version.rb
CHANGED
data/lib/nanoc/spec.rb
CHANGED
|
@@ -48,9 +48,6 @@ module Nanoc
|
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
class HelperContext
|
|
51
|
-
# @return [Nanoc::Core::DependencyTracker]
|
|
52
|
-
attr_reader :dependency_tracker
|
|
53
|
-
|
|
54
51
|
attr_reader :erbout
|
|
55
52
|
|
|
56
53
|
# @param [Module] mod The helper module to create a context for
|
|
@@ -63,8 +60,7 @@ module Nanoc
|
|
|
63
60
|
@reps = Nanoc::Core::ItemRepRepo.new
|
|
64
61
|
@items = Nanoc::Core::ItemCollection.new(@config)
|
|
65
62
|
@layouts = Nanoc::Core::LayoutCollection.new(@config)
|
|
66
|
-
@
|
|
67
|
-
@compiled_content_store = Nanoc::Core::CompiledContentStore.new
|
|
63
|
+
@compiled_content_repo = Nanoc::Core::CompiledContentRepo.new
|
|
68
64
|
@action_provider = new_action_provider
|
|
69
65
|
end
|
|
70
66
|
|
|
@@ -119,11 +115,11 @@ module Nanoc
|
|
|
119
115
|
end
|
|
120
116
|
|
|
121
117
|
def item=(item)
|
|
122
|
-
@item = item
|
|
118
|
+
@item = item&._unwrap
|
|
123
119
|
end
|
|
124
120
|
|
|
125
121
|
def item_rep=(item_rep)
|
|
126
|
-
@item_rep = item_rep
|
|
122
|
+
@item_rep = item_rep&._unwrap
|
|
127
123
|
end
|
|
128
124
|
|
|
129
125
|
# @return [Nanoc::Core::MutableConfigView]
|
|
@@ -159,8 +155,30 @@ module Nanoc
|
|
|
159
155
|
@action_sequence[obj] = memory
|
|
160
156
|
end
|
|
161
157
|
|
|
162
|
-
def
|
|
163
|
-
view_context.
|
|
158
|
+
def compiled_content_repo
|
|
159
|
+
view_context.compiled_content_repo
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def assigns
|
|
163
|
+
{
|
|
164
|
+
config: Nanoc::Core::MutableConfigView.new(@config, view_context),
|
|
165
|
+
item_rep: @item_rep ? Nanoc::Core::CompilationItemRepView.new(@item_rep, view_context) : nil,
|
|
166
|
+
item: @item ? Nanoc::Core::CompilationItemView.new(@item, view_context) : nil,
|
|
167
|
+
items: Nanoc::Core::ItemCollectionWithRepsView.new(@items, view_context),
|
|
168
|
+
layouts: Nanoc::Core::LayoutCollectionView.new(@layouts, view_context),
|
|
169
|
+
_erbout: @erbout,
|
|
170
|
+
}
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
def dependency_store
|
|
174
|
+
@_dependency_store ||= Nanoc::Core::DependencyStore.new(@items, @layouts, @config)
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
def dependency_tracker
|
|
178
|
+
@_dependency_tracker ||= Nanoc::Core::DependencyTracker.new(
|
|
179
|
+
dependency_store,
|
|
180
|
+
root: Nanoc::Core::Item.new('root', {}, '/root.md'),
|
|
181
|
+
)
|
|
164
182
|
end
|
|
165
183
|
|
|
166
184
|
private
|
|
@@ -170,17 +188,18 @@ module Nanoc
|
|
|
170
188
|
Nanoc::Core::CompilationContext.new(
|
|
171
189
|
action_provider: @action_provider,
|
|
172
190
|
reps: @reps,
|
|
173
|
-
site
|
|
191
|
+
site:,
|
|
174
192
|
compiled_content_cache: Nanoc::Core::CompiledContentCache.new(config: @config),
|
|
175
|
-
|
|
193
|
+
compiled_content_repo: @compiled_content_repo,
|
|
194
|
+
outdatedness_store: Nanoc::Core::OutdatednessStore.new(config: @config),
|
|
176
195
|
)
|
|
177
196
|
|
|
178
197
|
Nanoc::Core::ViewContextForCompilation.new(
|
|
179
198
|
reps: @reps,
|
|
180
199
|
items: @items,
|
|
181
|
-
dependency_tracker
|
|
182
|
-
compilation_context
|
|
183
|
-
|
|
200
|
+
dependency_tracker:,
|
|
201
|
+
compilation_context:,
|
|
202
|
+
compiled_content_repo: @compiled_content_repo,
|
|
184
203
|
)
|
|
185
204
|
end
|
|
186
205
|
|
|
@@ -191,6 +210,8 @@ module Nanoc
|
|
|
191
210
|
end
|
|
192
211
|
|
|
193
212
|
def initialize(context)
|
|
213
|
+
super()
|
|
214
|
+
|
|
194
215
|
@context = context
|
|
195
216
|
end
|
|
196
217
|
|
|
@@ -220,17 +241,6 @@ module Nanoc
|
|
|
220
241
|
data_source: Nanoc::Core::InMemoryDataSource.new(@items, @layouts),
|
|
221
242
|
)
|
|
222
243
|
end
|
|
223
|
-
|
|
224
|
-
def assigns
|
|
225
|
-
{
|
|
226
|
-
config: Nanoc::Core::MutableConfigView.new(@config, view_context),
|
|
227
|
-
item_rep: @item_rep ? Nanoc::Core::CompilationItemRepView.new(@item_rep, view_context) : nil,
|
|
228
|
-
item: @item ? Nanoc::Core::CompilationItemView.new(@item, view_context) : nil,
|
|
229
|
-
items: Nanoc::Core::ItemCollectionWithRepsView.new(@items, view_context),
|
|
230
|
-
layouts: Nanoc::Core::LayoutCollectionView.new(@layouts, view_context),
|
|
231
|
-
_erbout: @erbout,
|
|
232
|
-
}
|
|
233
|
-
end
|
|
234
244
|
end
|
|
235
245
|
|
|
236
246
|
module HelperHelper
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nanoc-spec
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Defreyne
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: nanoc-core
|
|
@@ -16,20 +15,14 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - "~>"
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '4.
|
|
20
|
-
- - ">="
|
|
21
|
-
- !ruby/object:Gem::Version
|
|
22
|
-
version: 4.11.13
|
|
18
|
+
version: '4.14'
|
|
23
19
|
type: :runtime
|
|
24
20
|
prerelease: false
|
|
25
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
22
|
requirements:
|
|
27
23
|
- - "~>"
|
|
28
24
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '4.
|
|
30
|
-
- - ">="
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: 4.11.13
|
|
25
|
+
version: '4.14'
|
|
33
26
|
description: Provides Nanoc::Spec, containing functionality for writing tests for
|
|
34
27
|
Nanoc
|
|
35
28
|
email: denis+rubygems@denis.ws
|
|
@@ -42,11 +35,12 @@ files:
|
|
|
42
35
|
- lib/nanoc-spec.rb
|
|
43
36
|
- lib/nanoc/spec.rb
|
|
44
37
|
- lib/nanoc/spec/version.rb
|
|
45
|
-
homepage: https://nanoc.
|
|
38
|
+
homepage: https://nanoc.app/
|
|
46
39
|
licenses:
|
|
47
40
|
- MIT
|
|
48
|
-
metadata:
|
|
49
|
-
|
|
41
|
+
metadata:
|
|
42
|
+
rubygems_mfa_required: 'true'
|
|
43
|
+
source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-spec-v0.0.3/nanoc-spec
|
|
50
44
|
rdoc_options: []
|
|
51
45
|
require_paths:
|
|
52
46
|
- lib
|
|
@@ -54,15 +48,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
54
48
|
requirements:
|
|
55
49
|
- - ">="
|
|
56
50
|
- !ruby/object:Gem::Version
|
|
57
|
-
version: '2
|
|
51
|
+
version: '3.2'
|
|
58
52
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
53
|
requirements:
|
|
60
54
|
- - ">="
|
|
61
55
|
- !ruby/object:Gem::Version
|
|
62
56
|
version: '0'
|
|
63
57
|
requirements: []
|
|
64
|
-
rubygems_version:
|
|
65
|
-
signing_key:
|
|
58
|
+
rubygems_version: 4.0.3
|
|
66
59
|
specification_version: 4
|
|
67
60
|
summary: Testing functionality for Nanoc
|
|
68
61
|
test_files: []
|