packnga 1.0.1 → 1.0.2
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 +4 -4
- data/Rakefile +1 -6
- data/doc/text/news.textile +6 -0
- data/lib/packnga/reference-task.rb +18 -6
- data/lib/packnga/version.rb +2 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18ab7c644f549e9dedfee3d2f81c0b418a7faff6
|
4
|
+
data.tar.gz: 3c271fd6c95afe4e92c7940e4884c37dee55eade
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65ee4f4adc778abe45c30d77d3e20005f93cfb066ee6105984cbc3d3333648f88bc3c7a80f340114efcbb6779cb6cc08c0b7f9dd956378b03ea49774f45f3559
|
7
|
+
data.tar.gz: 696170d7064ea4890b7dd113892c0b2cb301dc1a698c3d9b9cf13fc4297daf987e802f22360bfca13cea7657ed666d24b67b1e60e02019c47dcdb7267b1b9469
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8; mode: ruby -*-
|
2
2
|
#
|
3
3
|
# Copyright (C) 2011-2013 Haruka Yoshihara <yoshihara@clear-code.com>
|
4
|
-
# Copyright (C) 2011 Kouhei Sutou <kou@clear-code.com>
|
4
|
+
# Copyright (C) 2011-2016 Kouhei Sutou <kou@clear-code.com>
|
5
5
|
#
|
6
6
|
# This library is free software; you can redistribute it and/or
|
7
7
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -38,11 +38,6 @@ def helper.version_tag
|
|
38
38
|
end
|
39
39
|
|
40
40
|
spec = helper.gemspec
|
41
|
-
Rake::Task["release"].prerequisites.clear
|
42
|
-
|
43
|
-
Gem::PackageTask.new(spec) do |pkg|
|
44
|
-
pkg.need_tar_gz = true
|
45
|
-
end
|
46
41
|
|
47
42
|
Packnga::DocumentTask.new(spec) do |task|
|
48
43
|
task.original_language = "en"
|
data/doc/text/news.textile
CHANGED
@@ -308,17 +308,28 @@ module Packnga
|
|
308
308
|
content = content.gsub(/lang="en"/, "lang=\"#{language}\"")
|
309
309
|
|
310
310
|
title = nil
|
311
|
-
content = content.gsub(/<title>(.+?)<\/title>/m) do
|
311
|
+
content = content.gsub(/<title>(.+?)<\/title>/m) do |matched_text|
|
312
312
|
title = $1
|
313
|
-
templates[:head]
|
313
|
+
head_template = templates[:head]
|
314
|
+
if head_template
|
315
|
+
head_template.result(binding)
|
316
|
+
else
|
317
|
+
matched_text
|
318
|
+
end
|
314
319
|
end
|
315
320
|
|
316
|
-
|
317
|
-
|
321
|
+
header_template = templates[:header]
|
322
|
+
if header_template
|
323
|
+
content = content.gsub(/<body(?:.*?)>/) do |body_start|
|
324
|
+
"#{body_start}\n#{header_template.result(binding)}\n"
|
325
|
+
end
|
318
326
|
end
|
319
327
|
|
320
|
-
|
321
|
-
|
328
|
+
footer_template = templates[:footer]
|
329
|
+
if footer_template
|
330
|
+
content = content.gsub(/<\/body/) do |body_end|
|
331
|
+
"\n#{footer_template.result(binding)}\n#{body_end}"
|
332
|
+
end
|
322
333
|
end
|
323
334
|
|
324
335
|
content
|
@@ -326,6 +337,7 @@ module Packnga
|
|
326
337
|
|
327
338
|
def erb_template(name)
|
328
339
|
file = File.join("doc/templates", "#{name}.html.erb")
|
340
|
+
return nil unless File.exist?(file)
|
329
341
|
template = File.read(file)
|
330
342
|
erb = ERB.new(template, nil, "-")
|
331
343
|
erb.filename = file
|
data/lib/packnga/version.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
#
|
3
3
|
# Copyright (C) 2011 Haruka Yoshihara <yoshihara@clear-code.com>
|
4
4
|
# Copyright (C) 2011-2014 Kouhei Sutou <kou@clear-code.com>
|
5
|
+
# Copyright (C) 2014 Masafumi Yokoyama <myokoym@gmail.com>
|
5
6
|
#
|
6
7
|
# This library is free software; you can redistribute it and/or
|
7
8
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -18,5 +19,5 @@
|
|
18
19
|
|
19
20
|
module Packnga
|
20
21
|
# Packnga version.
|
21
|
-
VERSION = "1.0.
|
22
|
+
VERSION = "1.0.2"
|
22
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: packnga
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Haruka Yoshihara
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -172,13 +172,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
172
|
version: '0'
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
|
-
rubygems_version: 2.
|
175
|
+
rubygems_version: 2.4.5.1
|
176
176
|
signing_key:
|
177
177
|
specification_version: 4
|
178
178
|
summary: An utility library to package i18n-ed library.
|
179
179
|
test_files:
|
180
|
-
- test/test-reference-task.rb
|
181
|
-
- test/test-release-task.rb
|
182
|
-
- test/test-document-task.rb
|
183
180
|
- test/run-test.rb
|
181
|
+
- test/test-document-task.rb
|
182
|
+
- test/test-release-task.rb
|
183
|
+
- test/test-reference-task.rb
|
184
184
|
has_rdoc:
|