vizbuilder 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/lib/vizbuilder.rb +16 -13
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6197eeb10fd826f8e6947e1c6ba0b6df754e6274caca5985456c76e234989a8
4
- data.tar.gz: fa6b2b0014b2486b7dbd7d9e04d2ad255d9762fc3a6115a83843844351b7e8d6
3
+ metadata.gz: 44a32992cf625be9ddaf59d3f29e1d2a4a571cf1ad5dc36380f3218833138be6
4
+ data.tar.gz: 18736c8d4f4aa41852ccdc304137dd483e45083e5e37a85ce77eda3a357c2b06
5
5
  SHA512:
6
- metadata.gz: cbb4912215b85cdd543ddbf64ab75c0c4628d429635077dc692c820b979e84f220dc24f319316eb0ba4726aef09c895eeaadedf9294dc3aa18f901b7a7146e2d
7
- data.tar.gz: 1ae34bc33bcf5547d8feab61b50fc6016fcb6740526347fad5026d618d34d9f8da5d1aab93295b1d39674835c1d289bd277a4bf200fbc9b7f316413adb59c6b4
6
+ metadata.gz: 638159c464da03adeae4b09e3ba8dc9b242ff8ba989ff99e97eca0241dc668e799eb82539a67cb62896fe7aca8e0501c164e4a5d913931348856267a9a20dedb
7
+ data.tar.gz: 3f634eb3011f7da381805f84a5f997f3ff2003a4552abb125f92fd9277dab1e71836a704ae9ae0695f526269caca042c13cc4d4cfde87755d5f2b416c4b23d34
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.7
data/lib/vizbuilder.rb CHANGED
@@ -105,19 +105,22 @@ class VizBuilder
105
105
  # remove any leading slashes
106
106
  path = path[1..-1] if path =~ %r{^/}
107
107
 
108
- # filename for a potential prebuilt asset
109
- build_filename = File.join(PREBUILT_DIR, path)
110
-
111
- # Check our sitemap then our prebuilt folder for content to serve
112
- if sitemap[path].present?
113
- content_type = MimeMagic.by_path(path).to_s
114
- ctx = TemplateContext.new(@config)
115
- content = build_page(path, ctx)
116
- status = 200
117
- elsif File.exist?(build_filename)
118
- content_type = MimeMagic.by_path(path).to_s
119
- content = File.read(build_filename)
120
- status = 200
108
+ # files starting with _ are hidden
109
+ unless File.basename(path) =~ /^_/
110
+ # filename for a potential prebuilt asset
111
+ build_filename = File.join(PREBUILT_DIR, path)
112
+
113
+ # Check our sitemap then our prebuilt folder for content to serve
114
+ if sitemap[path].present?
115
+ content_type = MimeMagic.by_path(path).to_s
116
+ ctx = TemplateContext.new(@config)
117
+ content = build_page(path, ctx)
118
+ status = 200
119
+ elsif File.exist?(build_filename)
120
+ content_type = MimeMagic.by_path(path).to_s
121
+ content = File.read(build_filename)
122
+ status = 200
123
+ end
121
124
  end
122
125
 
123
126
  # Status code, headers and content for this response
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.0.6
4
+ version: 1.0.7
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-06-10 00:00:00.000000000 Z
11
+ date: 2019-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport