jekyll-redirect-from 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1e29fdfc5ac1b72c7be5187053ee376a95962914
4
- data.tar.gz: b310df2a84a1580f82e96c6e70d0de9ed25c94b4
3
+ metadata.gz: 7943ee5168973d4f3fb0dfce3ab6cf477b56957a
4
+ data.tar.gz: 45499228a22ab06aab61f89f2dc8f33c880987b6
5
5
  SHA512:
6
- metadata.gz: 4e68b428d29435e1b3f6005870bdc094f4f7a2b9b2d48800374a948d202a7fe86bc0745236647c78cc5c7eacdba23232b8c5d994dd15ac4fa8e3a876f61782f9
7
- data.tar.gz: fec31c22903b47943f2e16f8bd4d91977a9fbbf65f2955e823e7cb6a8d36ee095bd8105d7ab1783ce68c370095213747ebfc43de7003ef1a80d130cf94ebfc8b
6
+ metadata.gz: f2adce00c4d8a716ab5304c76fe146571537afea2e4950fb99bf6c67b7adb514997b52f540198c9fe7bb9aab6935d7e44906ef23f8250a7d99af838d49f84927
7
+ data.tar.gz: b2c337d536492b2a6b5935aadf9b95ef1893f872fe260d68bdffbf7d0b14d6a31e45d2a896c879f8f4ad7466e697d2a1e48c39f2ade0de1077a1c558aea54f2d
data/.gitignore CHANGED
@@ -12,6 +12,7 @@ lib/bundler/man
12
12
  pkg
13
13
  rdoc
14
14
  spec/reports
15
+ spec/fixtures/.jekyll-metadata
15
16
  test/tmp
16
17
  test/version_tmp
17
18
  tmp
@@ -1,9 +1,26 @@
1
1
  language: ruby
2
+ before_script: bundle update
3
+ script: "script/cibuild"
2
4
  sudo: false
3
5
  cache: bundler
6
+
7
+ matrix:
8
+ include:
9
+ - # GitHub Pages
10
+ rvm: 2.1.1
11
+ env: GH_PAGES=true
12
+ - # Ruby 1.9
13
+ rvm: 1.9
14
+ env: JEKYLL_VERSION=2.0
15
+ allow_failures:
16
+ - env: GH_PAGES=true # Jekyll 2.4 will fail tests
17
+ fast_finish: true
18
+
4
19
  rvm:
20
+ - 2.2
5
21
  - 2.1
6
22
  - 2.0
7
- - 1.9.3
8
- before_script: bundle update
9
- script: "script/cibuild"
23
+ env:
24
+ - ""
25
+ - JEKYLL_VERSION=3.0
26
+ - JEKYLL_VERSION=2.0
data/Gemfile CHANGED
@@ -1,4 +1,8 @@
1
1
  source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in jekyll-alt-urls.gemspec
4
2
  gemspec
3
+
4
+ if ENV["GH_PAGES"]
5
+ gem "github-pages"
6
+ elsif ENV["JEKYLL_VERSION"]
7
+ gem "jekyll", "~> #{ENV["JEKYLL_VERSION"]}"
8
+ end
@@ -1,3 +1,8 @@
1
+ ## 0.9.0 / 2015-10-28
2
+
3
+ * Support Jekyll 3 stable (#76)
4
+ * Test against Jekyll 3, 2, and GitHub Pages (#72)
5
+
1
6
  ## 0.8.0 / 2015-05-20
2
7
 
3
8
  * Exclude redirect pages from sitemap (#69)
data/README.md CHANGED
@@ -11,6 +11,12 @@ Instead of dealing with maintaining those pages for redirection, let
11
11
 
12
12
  [![Build Status](https://travis-ci.org/jekyll/jekyll-redirect-from.svg?branch=master)](https://travis-ci.org/jekyll/jekyll-redirect-from)
13
13
 
14
+ ## How it Works
15
+
16
+ Redirects are performed by serving an HTML file with an HTTP-REFRESH meta
17
+ tag which points to your destination. No `.htaccess` file, nginx conf, xml
18
+ file, or anything else will be generated. It simply creates HTML files.
19
+
14
20
  ## Installation
15
21
 
16
22
  Add this line to your application's Gemfile:
@@ -4,7 +4,7 @@ module JekyllRedirectFrom
4
4
 
5
5
  def generate(site)
6
6
  original_pages = site.pages.dup
7
- generate_alt_urls(site, site.posts)
7
+ generate_alt_urls(site, site.posts) if Jekyll::VERSION < '3.0.0'
8
8
  generate_alt_urls(site, original_pages)
9
9
  generate_alt_urls(site, site.docs_to_write)
10
10
  end
@@ -38,9 +38,10 @@ module JekyllRedirectFrom
38
38
  end
39
39
 
40
40
  def is_dynamic_document?(page_or_post)
41
- page_or_post.is_a?(Jekyll::Post) ||
42
- page_or_post.is_a?(Jekyll::Page) ||
43
- page_or_post.is_a?(Jekyll::Document)
41
+ page_or_post.is_a?(Jekyll::Page) ||
42
+ page_or_post.is_a?(Jekyll::Document) ||
43
+ (Jekyll::VERSION < '3.0.0' &&
44
+ page_or_post.is_a?(Jekyll::Post))
44
45
  end
45
46
 
46
47
  def has_alt_urls?(page_or_post)
@@ -1,3 +1,3 @@
1
1
  module JekyllRedirectFrom
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -1,2 +1,4 @@
1
1
  #! /bin/bash
2
- script/test $@
2
+ set -e
3
+
4
+ bundle exec rake spec
@@ -11,7 +11,11 @@ describe JekyllRedirectFrom::Redirector do
11
11
  let(:page_with_many_redirect_to) { setup_page("multiple_redirect_tos.md") }
12
12
 
13
13
  it "knows if a page or post is requesting a redirect page" do
14
- expect(redirector.has_alt_urls?(post_to_redirect)).to be_truthy
14
+ if Jekyll::VERSION < '3.0.0'
15
+ expect(redirector.has_alt_urls?(post_to_redirect)).to be_truthy
16
+ else
17
+ skip "Don't need to test posts in Jekyll 3"
18
+ end
15
19
  end
16
20
 
17
21
  it "knows if a document is requesting a redirect page" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-redirect-from
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Parker Moore
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-20 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -103,7 +103,6 @@ files:
103
103
  - script/bootstrap
104
104
  - script/cibuild
105
105
  - script/release
106
- - script/test
107
106
  - spec/fixtures/_articles/redirect-me-plz.md
108
107
  - spec/fixtures/_articles/redirect-somewhere-else-plz.html
109
108
  - spec/fixtures/_authors/kansaichris.md
@@ -1,2 +0,0 @@
1
- #!/bin/bash
2
- bundle exec rake spec