middleman-tansu 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +8 -1
- data/features/tansu_cli.feature +24 -0
- data/features/template_cli.feature +11 -0
- data/lib/middleman-tansu/command.rb +2 -1
- data/lib/middleman-tansu/template/source/sitemap.xml.builder +1 -1
- data/lib/middleman-tansu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50411d04e8f3b70aa3e8236bf4b26ac113fa1b13
|
4
|
+
data.tar.gz: eba1e6140f24a1f2e2cb7c2dc774e83d33d1825f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93265575213eb79a2c07390753b14814b5e5e4e5d7fd1d8b221f54870f8f6406f7948d5775920bb34639aae56415f76e0be75b68d14c9693a17e2e95bdc96c43
|
7
|
+
data.tar.gz: 03e7b7ad4c9544950fdaddf88002740e50b0ef73fe729b95efb21f93a89b669564b04595bb52a1a1ce7ca3c0f0febba8cacd57a4c1a4e03713abd371105f12b2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
# 0.1.3
|
2
|
+
|
3
|
+
- Fix: URI is not encoded in sitemap.xml.
|
4
|
+
マルチバイト文字列を含む URI がエンコードされていなかった問題を修正。
|
5
|
+
- `-z` option in `tansu` command accepts UPPERCASE or downcase timezone. ex: tokyo, TOKYO
|
6
|
+
tansu コマンドのタイムゾーンのオプションは大文字小文字の値を受け付けるようになりました。
|
7
|
+
|
1
8
|
# 0.1.2
|
2
9
|
|
3
10
|
- Drop `--current` (alias: `-c`) from `tansu` command.
|
@@ -5,7 +12,7 @@
|
|
5
12
|
|
6
13
|
# 0.1.1
|
7
14
|
|
8
|
-
- Add option `--current` (alias: `-c`) into `tansu` command.
|
15
|
+
- Add option `--current` (alias: `-c`) into `tansu` command.(__DROPPED in v0.1.2__)
|
9
16
|
- If you use `-c` option, `tansu` command create file with _relative path_ from current directory.
|
10
17
|
- Add emoji stylesheet in template.
|
11
18
|
|
data/features/tansu_cli.feature
CHANGED
@@ -117,3 +117,27 @@ Feature: Tansu Command
|
|
117
117
|
And the file "source/foo.html.md" should contain "author:"
|
118
118
|
And the file "source/foo.html.md" should contain "date:"
|
119
119
|
And the file "source/foo.html.md" should contain "+0900"
|
120
|
+
|
121
|
+
Scenario: `middleman tansu` create a markdown file with -z option(downcase)
|
122
|
+
Given a fixture app "empty-app"
|
123
|
+
And I set the timezone to "UTC"
|
124
|
+
When I run `middleman tansu foo -z tokyo`
|
125
|
+
Then the exit status should be 0
|
126
|
+
And a file named "source/foo.html.md" should exist
|
127
|
+
And the file "source/foo.html.md" should contain "title: foo"
|
128
|
+
And the file "source/foo.html.md" should not contain "title: foo.html.md"
|
129
|
+
And the file "source/foo.html.md" should contain "author:"
|
130
|
+
And the file "source/foo.html.md" should contain "date:"
|
131
|
+
And the file "source/foo.html.md" should contain "+0900"
|
132
|
+
|
133
|
+
Scenario: `middleman tansu` create a markdown file with -z option(uppercase)
|
134
|
+
Given a fixture app "empty-app"
|
135
|
+
And I set the timezone to "UTC"
|
136
|
+
When I run `middleman tansu foo -z TOKYO`
|
137
|
+
Then the exit status should be 0
|
138
|
+
And a file named "source/foo.html.md" should exist
|
139
|
+
And the file "source/foo.html.md" should contain "title: foo"
|
140
|
+
And the file "source/foo.html.md" should not contain "title: foo.html.md"
|
141
|
+
And the file "source/foo.html.md" should contain "author:"
|
142
|
+
And the file "source/foo.html.md" should contain "date:"
|
143
|
+
And the file "source/foo.html.md" should contain "+0900"
|
@@ -40,6 +40,17 @@ Feature: Template CLI
|
|
40
40
|
<loc>http://localhost:4567/index.html</loc>
|
41
41
|
"""
|
42
42
|
|
43
|
+
Scenario: sitemap.xml contains escaped URI
|
44
|
+
Given I run `middleman init MY_PROJECT --template tansu`
|
45
|
+
And I cd to "MY_PROJECT"
|
46
|
+
And I run `middleman tansu マルチバイトページ`
|
47
|
+
When I run `middleman build`
|
48
|
+
Then the exit status should be 0
|
49
|
+
And the following files should exist:
|
50
|
+
| build/マルチバイトページ.html |
|
51
|
+
| build/sitemap.xml |
|
52
|
+
And the file "build/sitemap.xml" should contain "%E3%83%9E%E3%83%AB%E3%83%81%E3%83%90%E3%82%A4%E3%83%88%E3%83%9A%E3%83%BC%E3%82%B8"
|
53
|
+
|
43
54
|
Scenario: Build a new project with app.config.sitemap_url
|
44
55
|
Given I run `middleman init MY_PROJECT --template tansu`
|
45
56
|
And a file named "MY_PROJECT/config.rb" with:
|
@@ -54,7 +54,8 @@ module Middleman
|
|
54
54
|
paths = path.split('/')
|
55
55
|
title = paths.pop
|
56
56
|
ext = options[:file]
|
57
|
-
|
57
|
+
zone = options[:timezone] || ENV['TZ'] || 'UTC'
|
58
|
+
Time.zone = (zone != 'UTC') ? zone.downcase.capitalize : zone
|
58
59
|
date = options[:date] ? Time.zone.parse(options[:date]) : Time.zone.now
|
59
60
|
author = options[:author] || ENV['USER']
|
60
61
|
add_frontmatter = options[:frontmatter]
|
@@ -6,7 +6,7 @@ xml.instruct!
|
|
6
6
|
xml.urlset 'xmlns' => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
7
7
|
sitemap.resources.select { |page| page.destination_path =~ /\.html/ }.each do |page|
|
8
8
|
xml.url do
|
9
|
-
xml.loc File.join(site_url, page.destination_path)
|
9
|
+
xml.loc URI.escape(File.join(site_url, page.destination_path))
|
10
10
|
xml.lastmod Time.now.iso8601
|
11
11
|
xml.changefreq page.data.changefreq || "weekly"
|
12
12
|
xml.priority page.data.priority || "0.5"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-tansu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yuya Terajima
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman
|