middleman-alias 0.0.2 → 0.0.3

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: 976b044b36b93a17d309632702866564f337eb3b
4
- data.tar.gz: 7949793d4d39d83f1730499d99128935e7d605bd
3
+ metadata.gz: 7235e2fc0b0b428aad124a959cfb019e80c0c091
4
+ data.tar.gz: cb5c504d5e1b58cc2911a5e902476a5467335fe6
5
5
  SHA512:
6
- metadata.gz: 67d07bfdf091e0b6419e212b89560b5d823fad2ff50873f2397ecac270f62bd9e19bc5130131684a70e78bdf794cd1f26655a8cb28d45c3725847a54f16e9c70
7
- data.tar.gz: 7eb6ffe0fac252d1e6ec76dd14081f121e31a2e8bab3bedaa4a453a9cdb99c5f248ff7608e2cbb3fc506843dfa12479488a0ee5a698e75889c52ce4cbcc54202
6
+ metadata.gz: 324aa1600bf89c6effb53b90faeca378633005cc5e87ae0b18ee363be6e26037cfdfb163d7f4770fe036aaa0cb10d74e8396243eb290db7dbcd7821f9dd0f289
7
+ data.tar.gz: ce48ac4831ce2d8592c049091d0c9212ead421e7edd1d8b0db63a6e6b553752457faa34472fd1c586830798aa27803b400ed92972aec9c8f160e5aa2d7018c71
@@ -0,0 +1,5 @@
1
+ Feature: Virtual directories
2
+ Given a fixture app "alias-app"
3
+ When I go to "/posts/2010/01/01/virtual-test"
4
+ Then I should see "You are being redirected"
5
+
@@ -9,7 +9,9 @@ module Middleman
9
9
  def manipulate_resource_list(resources)
10
10
  resources.each do |resource|
11
11
  if resource.data["alias"]
12
- Sitemap::Resource.new(@app.sitemap, resource.data["alias"]).tap do |p|
12
+ alias_url = resource.data["alias"]
13
+ alias_url += "/index.html" unless alias_url.match(/\.html$/)
14
+ Sitemap::Resource.new(@app.sitemap, alias_url).tap do |p|
13
15
  p.proxy_to("alias.html")
14
16
  p.add_metadata locals: {
15
17
  destination: resource.url
@@ -1,3 +1,3 @@
1
1
  module MiddlemanAlias
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-alias
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-09 00:00:00.000000000 Z
11
+ date: 2014-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
@@ -95,6 +95,7 @@ files:
95
95
  - features/alias.feature
96
96
  - features/generator_cli.feature
97
97
  - features/support/env.rb
98
+ - features/virtual-directory.feature
98
99
  - fixtures/alias-app/config.rb
99
100
  - fixtures/alias-app/source/alias.html.erb
100
101
  - fixtures/alias-app/source/bar.html.erb
@@ -136,3 +137,4 @@ test_files:
136
137
  - features/alias.feature
137
138
  - features/generator_cli.feature
138
139
  - features/support/env.rb
140
+ - features/virtual-directory.feature