crayfish 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +1 -1
- data/lib/crayfish/rails/pdf.rb +2 -2
- data/lib/crayfish/version.rb +1 -1
- data/test/dummy/log/test.log +23 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZWFjYjBlNGFmOWNlNmM3NWI2MTA0Nzg0NjVmYzc5MWJmZDFmYTkzYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MThlYzk3MDI0MzliZTBjOWQ2MGFlNDkzOTZlMDZlYTViOTlmMmI5Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDJlMjZmMGJkY2Y0Njc0ZjgxOTgxOGEzYjFkYTFmZTRiMDk5MzM0NWE1ZDRm
|
10
|
+
OGI4MjE5MmYzZDcwNDk3NWFmZDQwOGU3MTczOTAxMzE1YzEyYjk1MGRiZWU1
|
11
|
+
OWU5NTJiYmExNzEwMDQ1Nzk0YzUxODM3YjRlZTQ5NjhkYjg4ZGY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2EyM2M1ZTUxMDYxYTJhMzIwMDgyMTlmYTJkYTNiZDFhNzYzZmY3YjBmMDli
|
14
|
+
MDU4NDc1NDZlOGZjZWMyMDE3NTU2MzU3ZmMwZmYxMzUzZTU1N2IyYzAwNDNm
|
15
|
+
OGQzMWJhZTZkNWZhOTRlZDAyZGE5MWZiNDVkZmY3MGM2ZmQ2MDE=
|
data/README.md
CHANGED
@@ -70,7 +70,7 @@ gem 'prawn', :git => 'git://github.com/teknobingo/prawn.git', :branch => 'master
|
|
70
70
|
|
71
71
|
Which gives you a single paged PDF looking like this:
|
72
72
|
|
73
|
-
![](
|
73
|
+
![](https://raw.githubusercontent.com/patrickhno/crayfish/master/doc/example.png)
|
74
74
|
|
75
75
|
You can also use Prawn directly:
|
76
76
|
|
data/lib/crayfish/rails/pdf.rb
CHANGED
@@ -31,7 +31,7 @@ module Crayfish
|
|
31
31
|
controller_options = controller ? controller.send(:options) || {} : {}
|
32
32
|
@options = Crayfish::ActionController.options.merge(Hash[*controller_options.map{ |k,v| [k.to_sym,v] }.flatten])
|
33
33
|
|
34
|
-
if controller
|
34
|
+
if controller && controller.respond_to?(:response)
|
35
35
|
if options[:html]
|
36
36
|
controller.response.content_type ||= Mime::HTML
|
37
37
|
else
|
@@ -41,7 +41,7 @@ module Crayfish
|
|
41
41
|
|
42
42
|
inline = options[:inline] ? 'inline' : 'attachment'
|
43
43
|
filename = options[:filename] ? "filename=#{options[:filename]}" : nil
|
44
|
-
controller.headers["Content-Disposition"] = [inline,filename].compact.join(';') if controller
|
44
|
+
controller.headers["Content-Disposition"] = [inline,filename].compact.join(';') if controller && controller.respond_to?(:headers)
|
45
45
|
end
|
46
46
|
|
47
47
|
end
|
data/lib/crayfish/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1809,3 +1809,26 @@ undefined local variable or method `aaa' for #<CrayfishActionViewTest::ActionVie
|
|
1809
1809
|
[1m[35m (0.0ms)[0m rollback transaction
|
1810
1810
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1811
1811
|
[1m[35m (0.0ms)[0m rollback transaction
|
1812
|
+
[1m[36m (0.7ms)[0m [1mbegin transaction[0m
|
1813
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1814
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1815
|
+
[1;31munknown node p in CrayHtml[0m
|
1816
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1817
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1818
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1819
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1820
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1821
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1822
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1823
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1824
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1825
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1826
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1827
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1828
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1829
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1830
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1831
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1832
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1833
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1834
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crayfish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Hanevold
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|