bunto-redirect-from 5.0.0 → 6.0.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: bc7bb4ce86c73a11425638bd50f9a0d249b8a050
4
- data.tar.gz: 271cacd16af6faafccb38cfde32b87f15957b45c
3
+ metadata.gz: 9c81ffd0d28d8a47a8da2c647791c84c85940d89
4
+ data.tar.gz: 1e0d348db8ed13e868ce2a1c2f0b5cd509c48eae
5
5
  SHA512:
6
- metadata.gz: f4f5ae05baf686bd599af05021c00e38929f902090b69af567a172a5b63a654f96d8a4dd2bff3e9c095cd3b9532f6ceb9ace8689c8b613a0ebc874a9e0c7c951
7
- data.tar.gz: 2cd534a2e5488657de90885fe2a29f39286a903eda95157fee3a19ffdd03b6a031e61aebbb0d7f9f312d7dd53cf0a730aabccfb8a9e5885eec4a5d5fb1d812b0
6
+ metadata.gz: d7ca1612fb32ac2e0f4d39966721c7236f055e61f8dbf18f06bc4a684739f0f2aec9c7aa7e2318e0fcc29d26e1cecb4409035f5c1e5cfedd5c1498360e538d68
7
+ data.tar.gz: f8acb181e8a0431427c7cdfb3a336f332abe03528797ad9fb327e7fb35c225d5c55a7fb4220db6175091a0647fcf311fce309f6e59de58401df4e2b2f0da3f9f
data/.gitignore CHANGED
@@ -1,18 +1,18 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- spec/fixtures/.bunto-metadata
16
- test/tmp
17
- test/version_tmp
18
- tmp
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ spec/fixtures/.bunto-metadata
16
+ test/tmp
17
+ test/version_tmp
18
+ tmp
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --color
2
- --format progress
1
+ --color
2
+ --format progress
data/.travis.yml CHANGED
@@ -1,26 +1,26 @@
1
- language: ruby
2
- before_script: bundle update
3
- script: "script/cibuild"
4
- sudo: false
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: BUNTO_VERSION=1.0
15
- allow_failures:
16
- - env: GH_PAGES=true
17
- fast_finish: true
18
-
19
- rvm:
20
- - 2.2
21
- - 2.1
22
- - 2.0
23
- env:
24
- - ""
25
- - BUNTO_VERSION=2.0
26
- - BUNTO_VERSION=1.0
1
+ # Travis CI
2
+ language: ruby
3
+ before_script:
4
+ - chmod a+x script/bootstrap
5
+ - chmod a+x script/cibuild
6
+ - chmod a+x script/release
7
+ - chmod a+x script/test
8
+ - bundle update
9
+ script: "script/cibuild"
10
+ sudo: false
11
+ cache: bundler
12
+
13
+ matrix:
14
+ include:
15
+ - # Ruby 2.2.5
16
+ rvm: 2.2.5
17
+ env: BUNTO_VERSION=3.0.0
18
+ fast_finish: true
19
+
20
+ rvm:
21
+ - 2.3.1
22
+ - 2.3.0
23
+ env:
24
+ - ""
25
+ - BUNTO_VERSION=3.0.0
26
+ - BUNTO_VERSION=3.2.1
data/Gemfile CHANGED
@@ -1,8 +1,8 @@
1
- source 'https://rubygems.org'
2
- gemspec
3
-
4
- if ENV["GH_PAGES"]
5
- gem "github-pages"
6
- elsif ENV["BUNTO_VERSION"]
7
- gem "bunto", "~> #{ENV["BUNTO_VERSION"]}"
8
- end
1
+ source 'https://rubygems.org'
2
+ gemspec
3
+
4
+ if ENV["GH_PAGES"]
5
+ gem "github-pages"
6
+ elsif ENV["BUNTO_VERSION"]
7
+ gem "bunto", "~> #{ENV["BUNTO_VERSION"]}"
8
+ end
data/History.markdown CHANGED
@@ -1,3 +1,4 @@
1
- ## 1.0.0 / 2016-02-08
2
-
3
- * Birthday!
1
+ ## HEAD
2
+
3
+ ## 1.0.0 / 2016-02-08
4
+ * Birthday!
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2016-present Parker Moore
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2016-present Parker Moore
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,128 +1,129 @@
1
- # BuntoRedirectFrom
2
-
3
- Give your Bunto posts and pages multiple URLs.
4
-
5
- When importing your posts and pages from, say, Tumblr, it's annoying and
6
- impractical to create new pages in the proper subdirectories so they, e.g.
7
- `/post/123456789/my-slug-that-is-often-incompl`, redirect to the new post URL.
8
-
9
- Instead of dealing with maintaining those pages for redirection, let
10
- `bunto-redirect-from` handle it for you.
11
-
12
- [![Build Status](https://travis-ci.org/bunto/bunto-redirect-from.svg?branch=master)](https://travis-ci.org/bunto/bunto-redirect-from)
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
-
20
- ## Installation
21
-
22
- Add this line to your application's Gemfile:
23
-
24
- gem 'bunto-redirect-from'
25
-
26
- And then execute:
27
-
28
- $ bundle
29
-
30
- Or install it yourself as:
31
-
32
- $ gem install bunto-redirect-from
33
-
34
- Once it's installed into your evironment, add it to your `_config.yml`:
35
-
36
- ```yaml
37
- gems:
38
- - bunto-redirect-from
39
- ```
40
-
41
- If you're using Bunto in `safe` mode to mimic GitHub Pages, make sure to
42
- add bunto-redirect-from to your whitelist:
43
-
44
- ```yaml
45
- whitelist:
46
- - bunto-redirect-from
47
- ```
48
-
49
- Then run `bunto <cmd> --safe` like normal.
50
-
51
- ## Usage
52
-
53
- The object of this gem is to allow an author to specify multiple URLs for a
54
- page, such that the alternative URLs redirect to the new Bunto URL.
55
-
56
- To use it, simply add the array to the YAML front-matter of your page or post:
57
-
58
- ```yaml
59
- title: My amazing post
60
- redirect_from:
61
- - /post/123456789/
62
- - /post/123456789/my-amazing-post/
63
- ```
64
-
65
- Redirects including a trailing slash will generate a corresponding subdirectory containing an `index.html`, while redirects without a trailing slash will generate a corresponding `filename` without an extension, and without a subdirectory.
66
-
67
- For example...
68
-
69
- ```text
70
- redirect_from:
71
- - /post/123456789/my-amazing-post
72
- ```
73
-
74
- ...will generate the following page in the destination:
75
-
76
- ```text
77
- /post/123456789/my-amazing-post
78
- ```
79
-
80
- While...
81
-
82
- ```text
83
- redirect_from:
84
- - /post/123456789/my-amazing-post/
85
- ```
86
-
87
- ...will generate the following page in the destination:
88
-
89
- ```text
90
- /post/123456789/my-amazing-post/index.html
91
- ```
92
-
93
- These pages will contain an HTTP-REFRESH meta tag which redirect to your URL.
94
-
95
- You can also specify just **one url** like this:
96
-
97
- ```text
98
- title: My other awesome post
99
- redirect_from: /post/123456798/
100
- ```
101
-
102
- ### Prefix
103
- If `site.baseurl` is set, its value is used as a prefix for the redirect url automatically.
104
- This is useful for scenarios where a site isn't available from the domain root, so the redirects point to the correct path.
105
-
106
- **_Note_**: If you are hosting your Bunto site on [GitHub Pages](https://pages.github.com/), the prefix is set to the pages domain name i.e. `http://example.github.io/project` or a custom `CNAME`.
107
-
108
- ### Redirect To
109
-
110
- Sometimes, you may want to redirect a site page to a totally different website. This plugin also supports that with the `redirect_to` key:
111
-
112
- ```yaml
113
- title: My amazing post
114
- redirect_to:
115
- - http://www.github.com
116
- ```
117
-
118
- If you have multiple `redirect_to`s set, only the first one will be respected.
119
-
120
- **Note**: if using `redirect_to` with collections, your collection's extension **must** end in *.html* in order for `redirect_to` to properly process.
121
-
122
- ## Contributing
123
-
124
- 1. Fork it
125
- 2. Create your feature branch (`git checkout -b my-new-feature`)
126
- 3. Commit your changes (`git commit -am 'Add some feature'`)
127
- 4. Push to the branch (`git push origin my-new-feature`)
128
- 5. Create new Pull Request
1
+ # BuntoRedirectFrom
2
+
3
+ Give your Bunto posts and pages multiple URLs.
4
+
5
+ When importing your posts and pages from, say, Tumblr, it's annoying and
6
+ impractical to create new pages in the proper subdirectories so they, e.g.
7
+ `/post/123456789/my-slug-that-is-often-incompl`, redirect to the new post URL.
8
+
9
+ Instead of dealing with maintaining those pages for redirection, let
10
+ `bunto-redirect-from` handle it for you.
11
+
12
+ [![Build Status](https://travis-ci.org/bunto/bunto-redirect-from.svg?branch=master)](https://travis-ci.org/bunto/bunto-redirect-from)
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
+
20
+ ## Installation
21
+
22
+ Add this line to your application's Gemfile:
23
+
24
+ gem 'bunto-redirect-from'
25
+
26
+ And then execute:
27
+
28
+ $ bundle
29
+
30
+ Or install it yourself as:
31
+
32
+ $ gem install bunto-redirect-from
33
+
34
+ Once it's installed into your evironment, add it to your `_config.yml`:
35
+
36
+ ```yaml
37
+ gems:
38
+ - bunto-redirect-from
39
+ ```
40
+
41
+ If you're using Bunto in `safe` mode to mimic GitHub Pages, make sure to
42
+ add bunto-redirect-from to your whitelist:
43
+
44
+ ```yaml
45
+ whitelist:
46
+ - bunto-redirect-from
47
+ ```
48
+
49
+ Then run `bunto <cmd> --safe` like normal.
50
+
51
+ ## Usage
52
+
53
+ The object of this gem is to allow an author to specify multiple URLs for a
54
+ page, such that the alternative URLs redirect to the new Bunto URL.
55
+
56
+ To use it, simply add the array to the YAML front-matter of your page or post:
57
+
58
+ ```yaml
59
+ title: My amazing post
60
+ redirect_from:
61
+ - /post/123456789/
62
+ - /post/123456789/my-amazing-post/
63
+ ```
64
+
65
+ Redirects including a trailing slash will generate a corresponding subdirectory containing an `index.html`, while redirects without a trailing slash will generate a corresponding `filename` without an extension, and without a subdirectory.
66
+
67
+ For example...
68
+
69
+ ```text
70
+ redirect_from:
71
+ - /post/123456789/my-amazing-post
72
+ ```
73
+
74
+ ...will generate the following page in the destination:
75
+
76
+ ```text
77
+ /post/123456789/my-amazing-post
78
+ ```
79
+
80
+ While...
81
+
82
+ ```text
83
+ redirect_from:
84
+ - /post/123456789/my-amazing-post/
85
+ ```
86
+
87
+ ...will generate the following page in the destination:
88
+
89
+ ```text
90
+ /post/123456789/my-amazing-post/index.html
91
+ ```
92
+
93
+ These pages will contain an HTTP-REFRESH meta tag which redirect to your URL.
94
+
95
+ You can also specify just **one url** like this:
96
+
97
+ ```text
98
+ title: My other awesome post
99
+ redirect_from: /post/123456798/
100
+ ```
101
+
102
+ ### Prefix
103
+ If `site.baseurl` is set, its value is used as a prefix for the redirect url automatically.
104
+ This is useful for scenarios where a site isn't available from the domain root, so the redirects point to the correct path.
105
+
106
+ **_Note_**: If you are hosting your Bunto site on [GitHub Pages](https://pages.github.com/), the prefix is set to the pages domain name i.e. `http://example.github.io/project` or a custom `CNAME`.
107
+
108
+ ### Redirect To
109
+
110
+ Sometimes, you may want to redirect a site page to a totally different website. This plugin also supports that with the `redirect_to` key:
111
+
112
+ ```yaml
113
+ title: My amazing post
114
+ redirect_to:
115
+ - http://www.github.com
116
+ ```
117
+
118
+ If you have multiple `redirect_to`s set, only the first one will be respected.
119
+
120
+
121
+ **Note**: Using `redirect_to` or `redirect_from` with collections will only work with files which are output to HTML, such as `.md`, `.textile`, `.html` etc.
122
+
123
+ ## Contributing
124
+
125
+ 1. Fork it
126
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
127
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
128
+ 4. Push to the branch (`git push origin my-new-feature`)
129
+ 5. Create new Pull Request
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
1
+ require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec