sitepress-core 0.1.25 → 0.1.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e41cb5967e1b1a0d6e06e9281cad025b7349f079
4
- data.tar.gz: f4d16de2d631455bf80fbff21cd0df0cee8c626e
3
+ metadata.gz: '08d4a8f4ef6b04bd2c26b2ef38396dddc92a03b5'
4
+ data.tar.gz: 892aeece4b04759503b08f13bc4bfa578a910df1
5
5
  SHA512:
6
- metadata.gz: 520fc6585ebc55c0ce3f5a7302d08693a76c5521d0275d2562aaab2c432dd1f9eeccf034ea79f51720ef6961a7d3170428b4da4da2690cc1f125459abd9948b7
7
- data.tar.gz: 54f489fbd848824ef2e4a2ae639bfba4320a1d830191e1447dbeb0518adf99b8726d2bf64edc2bacfb592287620f26ec35e619bc61c9d6ddfd5ab7a115c3eaa0
6
+ metadata.gz: 9016f24aff457c80d89f89f365599ed11e8a1f86452e1ff3a10cf6396bb36e2f784b60695cc605e7a93fc939c5545f87a9d1297c3dbfe1d9985fa5d40e77761f
7
+ data.tar.gz: 1b59f09e63990239748f395f7c52c7f8a914ead474cbae4eb40e5ef46fec8b4dd004d2cc1dee0c16e945adcebdd9ed08a2f9cebd27face80e7bdcd0d31d51ee0
@@ -108,11 +108,23 @@ module Sitepress
108
108
  @_resources ||= yield
109
109
  end
110
110
 
111
+ # TODO: Move this into the DirectoryHandler class so that its not
112
+ # a concern of site.rb
113
+ # Exclude swap files created by Textmate and vim from being added
114
+ # to the sitemap.
115
+ SWAP_FILE_EXTENSIONS = [
116
+ "~",
117
+ ".swp"
118
+ ]
119
+
111
120
  # Lazy stream of files that will be rendered by resources.
112
121
  def pages_assets(glob = DEFAULT_GLOB)
113
- Dir.glob(pages_path.join(glob)).select(&File.method(:file?)).lazy.map do |path|
114
- Asset.new(path: path)
122
+ # TODO: Move this into the DirectoryHandler class so that its not
123
+ # a concern of site.rb
124
+ paths = Dir.glob(pages_path.join(glob)).reject do |path|
125
+ File.directory? path or SWAP_FILE_EXTENSIONS.any? { |ext| path.end_with? ext }
115
126
  end
127
+ paths.lazy.map { |path| Asset.new(path: path) }
116
128
  end
117
129
  end
118
130
  end
@@ -1,3 +1,3 @@
1
1
  module Sitepress
2
- VERSION = "0.1.25".freeze
2
+ VERSION = "0.1.26".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitepress-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.25
4
+ version: 0.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-26 00:00:00.000000000 Z
11
+ date: 2016-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.5.1
110
+ rubygems_version: 2.5.2
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: An embeddable file-backed content management system.