chili_pdf 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +14 -0
- data/Manifest.txt +1 -0
- data/README.md +14 -6
- data/assets/stylesheets/pdf.css +14 -0
- data/init.rb +2 -0
- data/lib/chili_pdf.rb +1 -1
- data/lib/chili_pdf/tag_mangler.rb +1 -15
- data/lib/wiki_format_hook_listener.rb +5 -0
- data/test/chili_pdf/tag_mangler_test.rb +0 -19
- metadata +5 -4
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
=== 0.4.4 / 2011-06-27
|
2
|
+
|
3
|
+
* Minor enhancements:
|
4
|
+
|
5
|
+
* Removed #-based link -> absolute URLs conversions, as it
|
6
|
+
was not necessary (wkhtmltopdf handles those links correctly as link
|
7
|
+
to another location in the generated PDF).
|
8
|
+
* Added hook listener so a "PDF" link is added to the bottom of project
|
9
|
+
wiki pages. Requires a 1-line patch outlined/proposed
|
10
|
+
"here":https://www.chiliproject.org/issues/488 to work. You can apply
|
11
|
+
it yourself manually if you like until the patch is (hopefully)
|
12
|
+
accepted.
|
13
|
+
* Added some base styles for HTML tables
|
14
|
+
|
1
15
|
=== 0.4.3 / 2011-06-20
|
2
16
|
|
3
17
|
* Bugfix:
|
data/Manifest.txt
CHANGED
data/README.md
CHANGED
@@ -15,12 +15,18 @@ ChiliProject (/Redmine) plugin which implements/enhances PDF-export functionalit
|
|
15
15
|
server. Technically this is a dependency of the library being used to
|
16
16
|
generate the PDFs ([wicked_pdf](https://github.com/mileszs/wicked_pdf)),
|
17
17
|
but, it's something you should be aware of.
|
18
|
-
1.
|
19
|
-
prevent a 'Double render' error on the
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
1. Two patches to consider adding to your Redmine/ChiliProject core application:
|
19
|
+
1. (REQUIRED) In order to prevent a 'Double render' error on the
|
20
|
+
WikiController. A pull request [has been submitted](http://bit.ly/jMrtYb)
|
21
|
+
to the ChiliProject core team. Until then, you can manually apply the
|
22
|
+
(small) patch to your app if you like. The changeset can be found
|
23
|
+
[here](http://bit.ly/jAPnuy).
|
24
|
+
1. (Optional) To get a "PDF" link on the bottom of your project wiki pages,
|
25
|
+
you need to apply a (one-line) diff to your ChiliProject codebase. You can
|
26
|
+
find the diff [here](http://bit.ly/wiki_view_format_link_hooks). There is
|
27
|
+
a "Feature request" issue set up with a patch/pull request for the
|
28
|
+
implementation so it may be in the core soon. You can follow along with
|
29
|
+
the issue status [here](https://www.chiliproject.org/issues/488).
|
24
30
|
|
25
31
|
## FEATURES:
|
26
32
|
|
@@ -32,6 +38,8 @@ ChiliProject (/Redmine) plugin which implements/enhances PDF-export functionalit
|
|
32
38
|
own CSS and/or JavaScript on the plugin configuration page.
|
33
39
|
1. Custom logo support. You can specify the URL of an image to place in the
|
34
40
|
top-right corner of the first page of all exported PDFs.
|
41
|
+
1. Adds a "PDF" link to the "Also available in" list of links at the bottom of
|
42
|
+
all wiki pages ([merged, but not released yet](http://bit.ly/jdcko9)).
|
35
43
|
|
36
44
|
## SCREENSHOTS:
|
37
45
|
|
data/assets/stylesheets/pdf.css
CHANGED
@@ -54,3 +54,17 @@ pre {
|
|
54
54
|
padding:10px; background:#DDD;
|
55
55
|
margin:5px 0;
|
56
56
|
}
|
57
|
+
|
58
|
+
table {
|
59
|
+
border:1px solid #999;
|
60
|
+
border-collapse:collapse;
|
61
|
+
}
|
62
|
+
table th,
|
63
|
+
table td {
|
64
|
+
padding:5px;
|
65
|
+
vertical-align:top;
|
66
|
+
border:1px solid #999;
|
67
|
+
}
|
68
|
+
table th {
|
69
|
+
font-weight:bold;
|
70
|
+
}
|
data/init.rb
CHANGED
data/lib/chili_pdf.rb
CHANGED
@@ -9,13 +9,7 @@ class TagMangler
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def to_absolute_url
|
12
|
-
|
13
|
-
"#{base_url}#{relative_url}"
|
14
|
-
elsif anchor_tag
|
15
|
-
"#{@request_like.url}#{anchor_tag}"
|
16
|
-
else
|
17
|
-
@src_attribute
|
18
|
-
end
|
12
|
+
relative_url? ? "#{base_url}#{relative_url}" : @src_attribute
|
19
13
|
end
|
20
14
|
|
21
15
|
private
|
@@ -31,14 +25,6 @@ class TagMangler
|
|
31
25
|
end
|
32
26
|
end
|
33
27
|
|
34
|
-
def anchor_tag
|
35
|
-
@src_attribute[%r!^(#.*)!]
|
36
|
-
end
|
37
|
-
|
38
|
-
def anchor_tag?
|
39
|
-
!anchor_tag.blank
|
40
|
-
end
|
41
|
-
|
42
28
|
def relative_url
|
43
29
|
@src_attribute.match(%r!^/(.*)!) && $1
|
44
30
|
end
|
@@ -142,24 +142,5 @@ class TokenManagerTest < Test::Unit::TestCase
|
|
142
142
|
assert_equal @absolute_url, @mangler.to_absolute_url
|
143
143
|
end
|
144
144
|
end
|
145
|
-
|
146
|
-
context "when the content passed in has an anchor to another location in the current page" do
|
147
|
-
setup do
|
148
|
-
@base_url = "http://example.com"
|
149
|
-
@current_page = "/current_page"
|
150
|
-
@absolute_url = "#{@base_url}#{@current_page}"
|
151
|
-
|
152
|
-
mock_request = 'Mocked Request'
|
153
|
-
mock_request.stubs(:request_uri).returns(@current_page)
|
154
|
-
mock_request.stubs(:url).returns(@absolute_url)
|
155
|
-
|
156
|
-
@requested_asset = "#HeadingOnPage"
|
157
|
-
@mangler = make_mangler_with(@requested_asset, mock_request)
|
158
|
-
end
|
159
|
-
|
160
|
-
should "should return an absolute URL to the original page" do
|
161
|
-
assert_equal "#{@absolute_url}#{@requested_asset}", @mangler.to_absolute_url
|
162
|
-
end
|
163
|
-
end
|
164
145
|
end
|
165
146
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chili_pdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 4
|
10
|
+
version: 0.4.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Tom Kersten
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
NVADJA==
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2011-06-
|
39
|
+
date: 2011-06-27 00:00:00 -05:00
|
40
40
|
default_executable:
|
41
41
|
dependencies:
|
42
42
|
- !ruby/object:Gem::Dependency
|
@@ -132,6 +132,7 @@ files:
|
|
132
132
|
- lib/tasks/contributor_tasks.rb
|
133
133
|
- lib/tasks/test_lib_dir.rake
|
134
134
|
- lib/user_patch.rb
|
135
|
+
- lib/wiki_format_hook_listener.rb
|
135
136
|
- rails/init.rb
|
136
137
|
- test/chili_pdf/config_test.rb
|
137
138
|
- test/chili_pdf/formatter_test.rb
|
metadata.gz.sig
CHANGED
Binary file
|