middleman-alias 0.0.16 → 0.0.17

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: 69964590eac469405b3793b8e11c04479ce99075
4
- data.tar.gz: bb1ccf404c2c0fdf444691b639374f0a95b7d76d
3
+ metadata.gz: c8268fd04683aab3e527115c84641834fa205cd7
4
+ data.tar.gz: f60e5ce0b62b4f113edbc48a2bc482fd15a1d8fa
5
5
  SHA512:
6
- metadata.gz: 90d6c9f0772865236ceba09a89e1361cd976788439d68ab412e433e7c7efecdd6a1eba62caa1f5d36a746000240a35d228000a680a6ef02a3440be536be4d74f
7
- data.tar.gz: 78330b2e9137004dab550da213069aee3057582e764e9754c1369405843d242452788bbbb56a7a00036a82bc87e90b4c4c54be987e002b7143ab5d177b9aa99f
6
+ metadata.gz: 7837599277f110b792fb4f8b69defd64a60b25123a79a2d11262cd633a28978af33883d73499cd09254273867b871a27697a0bf28ab4e26cc6dc3ebbdb649125
7
+ data.tar.gz: a030e9b2e10ea721153a1e4508737b6fd709d19c871947c4f8adf5ac8f26ec88b27987c476c144289e444b303d101944bea5c82dca8fab66bf2ec17ae520df79
@@ -1,5 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.0
4
- - 2.0.0
5
- - 1.9.3
3
+ - 2.4.0
4
+ - 2.3.0
5
+ - 2.2.7
6
+ install: bundle
7
+ script: bundle exec rake
@@ -18,21 +18,21 @@ module Middleman
18
18
  end
19
19
 
20
20
  def render(*args, &block)
21
- app.current_path = destination_path
21
+ new_url = ::Middleman::Util.url_for(@app, @alias_resource, {current_resource: self})
22
22
  %[
23
23
  <html>
24
24
  <head>
25
- <link rel="canonical" href="#{app.url_for(@alias_resource)}" />
25
+ <link rel="canonical" href="#{new_url}" />
26
26
  <meta name="robots" content="noindex,follow" />
27
27
  <meta http-equiv="cache-control" content="no-cache" />
28
28
  <script>
29
29
  // Attempt to keep search and hash
30
- window.location.replace("#{app.url_for(@alias_resource)}"+window.location.search+window.location.hash);
30
+ window.location.replace("#{new_url}"+window.location.search+window.location.hash);
31
31
  </script>
32
- <meta http-equiv=refresh content="0; url=#{app.url_for(@alias_resource)}" />
32
+ <meta http-equiv=refresh content="0; url=#{new_url}" />
33
33
  </head>
34
34
  <body>
35
- <a href="#{app.url_for(@alias_resource)}">You are being redirected.</a>
35
+ <a href="#{new_url}">You are being redirected.</a>
36
36
  </body>
37
37
  </html>
38
38
  ]
@@ -58,4 +58,3 @@ module Middleman
58
58
  end
59
59
  end
60
60
  end
61
-
@@ -1,3 +1,3 @@
1
1
  module MiddlemanAlias
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -18,10 +18,11 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "middleman-core", ["~> 3.2"]
21
+ spec.add_dependency "middleman-core", [">= 3.3"]
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.5"
24
24
  spec.add_development_dependency "rake"
25
25
  spec.add_development_dependency "cucumber", "~> 2.1.0"
26
26
  spec.add_development_dependency "aruba", "~> 0.7.4"
27
+ spec.add_development_dependency "capybara", "~> 2.5.0"
27
28
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-alias
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2017-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '3.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '3.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.7.4
83
+ - !ruby/object:Gem::Dependency
84
+ name: capybara
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: 2.5.0
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: 2.5.0
83
97
  description: Redirects for Middleman that are friendly to the Googles.
84
98
  email:
85
99
  - jeremy@octolabs.com
@@ -130,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
144
  version: '0'
131
145
  requirements: []
132
146
  rubyforge_project:
133
- rubygems_version: 2.4.5
147
+ rubygems_version: 2.5.1
134
148
  signing_key:
135
149
  specification_version: 4
136
150
  summary: Redirects for Middleman that are friendly to the Googles.