acts_as_flying_saucer 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,7 +72,7 @@ module ActsAsFlyingSaucer
72
72
  generate_options = ActsAsFlyingSaucer::Config.options.merge({
73
73
  :input_file => input_file,
74
74
  :output_file => output_file,
75
- :html => html,
75
+ :html => html
76
76
  })
77
77
 
78
78
  ActsAsFlyingSaucer::Xhtml2Pdf.write_pdf(generate_options)
@@ -29,9 +29,12 @@ module ActsAsFlyingSaucer
29
29
  sleep(1)
30
30
  count+=1
31
31
  end
32
- acts_as_flying_saucer_jar_path = File.expand_path(File.join(File.dirname(__FILE__),'java','jar','acts_as_flying_saucer.jar'))
32
+ java_dir = File.join(File.expand_path(File.dirname(__FILE__)), "java")
33
+ Dir.glob("#{java_dir}/jar/*.jar") do |jar|
34
+ Nailgun::NgCommand.ng_cp(jar)
35
+ end
33
36
  # ADD IN NAILGUN CLASS
34
- Nailgun::NgCommand.ng_cp(acts_as_flying_saucer_jar_path)
37
+
35
38
  Nailgun::NgCommand.ng_alias("Xhtml2Pdf","acts_as_flying_saucer.Xhtml2Pdf")
36
39
  Nailgun::NgCommand.ng_alias("encryptPdf", "acts_as_flying_saucer.encryptPdf")
37
40
 
@@ -1,3 +1,3 @@
1
1
  module ActsAsFlyingSaucer
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
@@ -5,14 +5,18 @@ module ActsAsFlyingSaucer
5
5
  #
6
6
  class Xhtml2Pdf
7
7
  def self.write_pdf(options)
8
+
8
9
  if !File.exists?(options[:input_file])
9
10
  File.open(options[:input_file], 'w') do |file|
10
11
  file << options[:html]
11
12
  end
12
13
  end
13
-
14
+ class_path = ""
14
15
  java_dir = File.join(File.expand_path(File.dirname(__FILE__)), "java")
15
- class_path = "'.#{options[:classpath_separator]}#{java_dir}/jar/acts_as_flying_saucer.jar'"
16
+ Dir.glob("#{java_dir}/jar/*.jar") do |jar|
17
+ class_path << "#{options[:classpath_separator]}#{jar}"
18
+ end
19
+
16
20
 
17
21
  if options[:nailgun]
18
22
  command = "#{Nailgun::NgCommand::NGPATH} --nailgun-server #{ActsAsFlyingSaucer::Config.options[:nailgun_host]} --nailgun-port #{ ActsAsFlyingSaucer::Config.options[:nailgun_port]} Xhtml2Pdf #{options[:input_file]} #{options[:output_file]}"
metadata CHANGED
@@ -1,61 +1,55 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: acts_as_flying_saucer
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
5
  prerelease:
6
- segments:
7
- - 1
8
- - 0
9
- - 2
10
- version: 1.0.2
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Amar Daxini
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-11-11 00:00:00 +05:30
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-04-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: nailgun
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: tidy_ffi
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: tidy_ffi
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :runtime
48
- version_requirements: *id002
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
49
46
  description: XHTML to PDF using Flying Saucer java library
50
- email:
47
+ email:
51
48
  - amardaxini@gmail.com
52
49
  executables: []
53
-
54
50
  extensions: []
55
-
56
51
  extra_rdoc_files: []
57
-
58
- files:
52
+ files:
59
53
  - .gitignore
60
54
  - Gemfile
61
55
  - README.markdown
@@ -65,43 +59,36 @@ files:
65
59
  - lib/acts_as_flying_saucer/acts_as_flying_saucer_controller.rb
66
60
  - lib/acts_as_flying_saucer/config.rb
67
61
  - lib/acts_as_flying_saucer/java/jar/acts_as_flying_saucer.jar
62
+ - lib/acts_as_flying_saucer/java/jar/core-renderer.jar
63
+ - lib/acts_as_flying_saucer/java/jar/iText-2.1.7.jar
64
+ - lib/acts_as_flying_saucer/java/jar/xml-apis-xerces-2.9.1.jar
68
65
  - lib/acts_as_flying_saucer/java/src/Xhtml2Pdf.java
69
66
  - lib/acts_as_flying_saucer/java/src/encryptPdf.java
70
67
  - lib/acts_as_flying_saucer/version.rb
71
68
  - lib/acts_as_flying_saucer/xhtml2pdf.rb
72
- has_rdoc: true
73
69
  homepage: http://rubygems.org/gems/acts_as_flying_saucer
74
70
  licenses: []
75
-
76
71
  post_install_message:
77
72
  rdoc_options: []
78
-
79
- require_paths:
73
+ require_paths:
80
74
  - lib
81
- required_ruby_version: !ruby/object:Gem::Requirement
75
+ required_ruby_version: !ruby/object:Gem::Requirement
82
76
  none: false
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- hash: 3
87
- segments:
88
- - 0
89
- version: "0"
90
- required_rubygems_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - ! '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
91
82
  none: false
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- hash: 3
96
- segments:
97
- - 0
98
- version: "0"
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
99
87
  requirements: []
100
-
101
88
  rubyforge_project: acts_as_flying_saucer
102
- rubygems_version: 1.4.2
89
+ rubygems_version: 1.8.18
103
90
  signing_key:
104
91
  specification_version: 3
105
92
  summary: XHTML to PDF using Flying Saucer java library
106
93
  test_files: []
107
-
94
+ has_rdoc: