middleman-redirects 0.1.1 → 0.1.2

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: be2018be3504425ebacb4a5d8cba1076b013b908
4
- data.tar.gz: 9349085b702a26da0128fa19ca3054202031421f
3
+ metadata.gz: d16f76c21e23765461c5a7e31bad4e41c8626511
4
+ data.tar.gz: 0171c5fad36f7fe91b11b95647fcc80cf4b5e908
5
5
  SHA512:
6
- metadata.gz: 3abc132971d76a1795b30ec995ce441201f3a20ca30034318106f1c272a39a041ab07c9584e2eb49cd6b8e076434fb6f7c6e5568789f5fb04582511e38e17a9b
7
- data.tar.gz: 0aee77206d40b3e0bb417e7280e3e8f231d7c285cda4b0ecda67612130af3d48d844d9f37f5861b49efa5b67be2f414294f79ab7bead48a93c86df3571dc1894
6
+ metadata.gz: ceca494da9c387cab64beb0e900910ef44ae8213b1dcfabce31276faeb38437364f44e24c01bb4c1c508e8cd594344237f7acd613987c5e2b99690d5b4cc7b56
7
+ data.tar.gz: af1d51d1f7accad503d4eec1f04d9a747b3af3fd6b524cd6415f21d87eb967ecbbf1d17d7eb65123b2e5c553cc44da55d718c271f51d684e9ee4fdf17c72ae93
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module Redirects
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -3,6 +3,8 @@ require 'pathname'
3
3
 
4
4
  module Middleman
5
5
  module Redirects
6
+ BLANK_RE = /\A[[:space:]]*\z/
7
+
6
8
  class Extension < Middleman::Extension
7
9
  def initialize(app, options_hash={}, &block)
8
10
  app.use ::Middleman::Redirects::Middleware
@@ -46,6 +48,8 @@ module Middleman
46
48
  @mtime = self.redirects_file_path.mtime
47
49
  @redirects = Hash[self.redirects_file_path.each_line.map do |line|
48
50
  next if line =~ /^#/ # ignore comments
51
+ next if line.empty?
52
+ next if BLANK_RE === line
49
53
 
50
54
  source, destination = line.split.map { |s| URI.parse(s) }
51
55
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-redirects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Schurrer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-02-25 00:00:00.000000000 Z
11
+ date: 2017-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  version: '0'
77
77
  requirements: []
78
78
  rubyforge_project:
79
- rubygems_version: 2.4.3
79
+ rubygems_version: 2.4.8
80
80
  signing_key:
81
81
  specification_version: 4
82
82
  summary: Makes middleman support REDIRECT files in development