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 +4 -4
- data/lib/middleman/redirects/version.rb +1 -1
- data/lib/middleman/redirects.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16f76c21e23765461c5a7e31bad4e41c8626511
|
4
|
+
data.tar.gz: 0171c5fad36f7fe91b11b95647fcc80cf4b5e908
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceca494da9c387cab64beb0e900910ef44ae8213b1dcfabce31276faeb38437364f44e24c01bb4c1c508e8cd594344237f7acd613987c5e2b99690d5b4cc7b56
|
7
|
+
data.tar.gz: af1d51d1f7accad503d4eec1f04d9a747b3af3fd6b524cd6415f21d87eb967ecbbf1d17d7eb65123b2e5c553cc44da55d718c271f51d684e9ee4fdf17c72ae93
|
data/lib/middleman/redirects.rb
CHANGED
@@ -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.
|
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:
|
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.
|
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
|