dimples 13.1.1 → 13.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a3a083ef71c4142029367c026394e4d499f4e8760ff3bf54712d3ee319322b8
4
- data.tar.gz: c8f2e5ee9b6fbfd7e35a4d496798ebd02cb2773d6f532d12138bf1db21b800fb
3
+ metadata.gz: 1b8dcce562561e45cedb081a63229e4689db41250e9ae806f91c584da5925f03
4
+ data.tar.gz: b5893ccd56c36ea893f8c745eee0d490ee84ca01d11252ff241e15786159e33b
5
5
  SHA512:
6
- metadata.gz: ebfa89f7de5099291e8416980b7e2fd9f129f2f1c436e1ac1815cd8688bd3eaecc1f7bd8283de1dd7a9b1759c66878337cd9aa8249521d7bb4d2ad18aa457581
7
- data.tar.gz: ec7e6e716c5c533e9013d6008deffb11741244963a2cf79869c85a5e2a3fa2e6e75e74ee66d8633fe9cb96b0b5f2e4685329f8f04c9c3ffd88a07d3a9464276d
6
+ metadata.gz: 9b833c5bd0fbfd2083fc5e90985df31cc714e43d131d8b5bee19a5905ed71f80bc45583cc92028efe60fe19a96f317494b9105363caf5f88331fd376c9c3f252
7
+ data.tar.gz: bd078619d9b351c269c3406cab76bb3b4f35bf89ffa0223a769799c357fcdecbf12c520c908e5bff9960aa77860afbdc63106f3d1cbe2c534a3eb0588304c9ce
data/lib/dimples/site.rb CHANGED
@@ -50,7 +50,7 @@ module Dimples
50
50
  end
51
51
 
52
52
  def data
53
- @data ||= scan_path(path: @config.source_paths[:data], extension: 'json') do |path|
53
+ @data ||= scan_path(path: @config.source_paths[:data], extension: '.json') do |path|
54
54
  Context.from_hash(JSON.parse(File.read(path)))
55
55
  end
56
56
  end
@@ -81,11 +81,11 @@ module Dimples
81
81
  Dir.children(path).each do |child|
82
82
  child_path = File.join(path, child)
83
83
 
84
- key = File.basename(child_path, ".#{extension}").to_sym
84
+ key = File.basename(child_path, extension).to_sym
85
85
  data[key] = if File.directory?(child_path)
86
86
  scan_path(path: child_path, extension:, &block)
87
87
  else
88
- yield child_path if block_given?
88
+ yield child_path if block_given? && File.extname(child_path) == extension
89
89
  end
90
90
  end
91
91
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dimples
4
- VERSION = '13.1.1'
4
+ VERSION = '13.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 13.1.1
4
+ version: 13.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Bogan