vizbuilder 1.1.0 → 1.1.1
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/README.md +21 -10
- data/VERSION +1 -1
- data/lib/vizbuilder.rb +2 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dc925f85d53e2dc765eca9ffae446e0197d471a5680a8b77c3f60aa9d48f6bb
|
4
|
+
data.tar.gz: 7167536f3e903ac3c446f9be2773582065c22e126004f2330623bac87b2b6ce5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84a2a641318f6060ec8432e0aba51e4ca090b42651ca46fe74bbc57ec24338fc72495dcb88936be091e7f86c5dfa5e458cbdd1a2e2ed02a7f89ea1e7da9afc66
|
7
|
+
data.tar.gz: 01c7df8fd30bce6dfa1d6cf67580f6698a889c7272ea00bff8775f4159ec0e9cce16c61e509712b96f15ea9841cfe3bfc08a99fdab0e615783ab74c9228d81aa
|
data/README.md
CHANGED
@@ -110,11 +110,11 @@ There are a few config settings used by Viz Builder:
|
|
110
110
|
|
111
111
|
#### http_prefix
|
112
112
|
|
113
|
-
Used
|
113
|
+
Used in all modes for setting canonical urls and links between pages of the site. Used by the `canonical_url` helper detailed below. Defaults to `'/'`.
|
114
114
|
|
115
115
|
#### asset_http_prefix
|
116
116
|
|
117
|
-
Used
|
117
|
+
Used in all modes for setting asset urls. Used by the `asset_path` helper detailed below. Defaults to `http_prefix` or `'/'`.
|
118
118
|
|
119
119
|
#### layout
|
120
120
|
|
@@ -265,21 +265,32 @@ Returns the full domain name and path to the root of the site. Any provided argu
|
|
265
265
|
<!-- outputs {http_prefix}/page1 --->
|
266
266
|
```
|
267
267
|
|
268
|
-
####
|
269
|
-
|
270
|
-
True if Viz Builder is building out all the pages and not running as a rack app (aka web server).
|
268
|
+
#### production?
|
271
269
|
|
272
|
-
|
270
|
+
True if Viz Builder is running in production mode. Necessary for setting different http prefix settings for production vs development.
|
273
271
|
|
274
|
-
|
272
|
+
```ruby
|
273
|
+
app = VizBuilder.new do
|
274
|
+
...
|
275
|
+
if production?
|
276
|
+
set :http_prefix, 'http://www.example.com'
|
277
|
+
set :asset_http_prefix, 'http://cdn.example.com'
|
278
|
+
end
|
279
|
+
...
|
280
|
+
end
|
281
|
+
```
|
275
282
|
|
276
283
|
#### development?
|
277
284
|
|
278
|
-
True if Viz Builder is running in development mode.
|
285
|
+
True if Viz Builder is running in development mode. Opposite of `production?`.
|
279
286
|
|
280
|
-
####
|
287
|
+
#### build?
|
288
|
+
|
289
|
+
True if Viz Builder is building out all the pages and not running as a rack app (aka web server). Usually synonymous with `production?`.
|
290
|
+
|
291
|
+
#### server?
|
281
292
|
|
282
|
-
True if Viz Builder is running
|
293
|
+
True if Viz Builder is running as a rack app (aka web server). Usually synonymous with `development?`.
|
283
294
|
|
284
295
|
## Assets
|
285
296
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.1
|
data/lib/vizbuilder.rb
CHANGED
@@ -34,14 +34,13 @@ class VizBuilder
|
|
34
34
|
# Generate all pages in the sitemap and save to `build/`
|
35
35
|
def build!(silent: false)
|
36
36
|
configure!(mode: :build, target: :production)
|
37
|
-
ctx = TemplateContext.new(@config)
|
38
37
|
index_prebuilt!
|
39
38
|
# First we build prebuilt pages that need digests calculated by build_page
|
40
39
|
digested = sitemap.select { |_path, page| page[:digest] == true }
|
41
|
-
digested.each { |path, _page| build_page(path,
|
40
|
+
digested.each { |path, _page| build_page(path, TemplateContext.new(@config), silent: silent) }
|
42
41
|
# Then we build all other pages
|
43
42
|
undigested = sitemap.reject { |_path, page| page[:digest] == true }
|
44
|
-
undigested.each { |path, _page| build_page(path,
|
43
|
+
undigested.each { |path, _page| build_page(path, TemplateContext.new(@config), silent: silent) }
|
45
44
|
end
|
46
45
|
|
47
46
|
# Run this builder as a server
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vizbuilder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Mark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|