polish_invoicer 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -109,6 +109,7 @@ invoice.save_to_pdf('/path/to/invoice.pdf')
109
109
  :logger, # możliwość ustawienia loggera
110
110
  # podczas użycia w aplikacji Rails
111
111
  # logger ustawia się automatycznie
112
+ :wkhtmltopdf_path # ścieżka do polecenia wkhtmltopdf
112
113
  :wkhtmltopdf_command # komenda wywołania polecenia wkhtmltopdf
113
114
  # bez podawania plików html i pdf
114
115
 
@@ -24,7 +24,8 @@ module PolishInvoicer
24
24
  ]
25
25
 
26
26
  attr_accessor *AVAILABLE_PARAMS
27
- attr_accessor :template_path, :logger, :wkhtmltopdf_command
27
+ attr_accessor :template_path
28
+ attr_accessor :logger, :wkhtmltopdf_path, :wkhtmltopdf_command
28
29
 
29
30
  def initialize(params={})
30
31
  set_defaults
@@ -1,3 +1,3 @@
1
1
  module PolishInvoicer
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,13 +1,14 @@
1
1
  module PolishInvoicer
2
2
  class Writer
3
3
  attr_accessor :invoice, :template_path
4
- attr_accessor :logger, :wkhtmltopdf_command
4
+ attr_accessor :logger, :wkhtmltopdf_path, :wkhtmltopdf_command
5
5
 
6
6
  def initialize(invoice)
7
7
  @invoice = invoice
8
8
  default_template_path = File.expand_path('../../../tpl/invoice.slim', __FILE__)
9
9
  @template_path = @invoice.template_path || default_template_path
10
10
  @logger = @invoice.logger
11
+ @wkhtmltopdf_path = @invoice.wkhtmltopdf_path
11
12
  @wkhtmltopdf_command = @invoice.wkhtmltopdf_command
12
13
  end
13
14
 
@@ -24,6 +25,7 @@ module PolishInvoicer
24
25
  protected
25
26
  def create_writer
26
27
  @writer = Slim2pdf::Writer.new(template_path)
28
+ @writer.wkhtmltopdf_path = wkhtmltopdf_path
27
29
  @writer.wkhtmltopdf_command = wkhtmltopdf_command
28
30
  @writer.logger = logger
29
31
  data = @invoice.to_hash
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "rake"
23
23
  spec.add_development_dependency "simplecov"
24
24
 
25
- spec.add_dependency 'slim2pdf', '~> 0.0.2'
25
+ spec.add_dependency 'slim2pdf', '~> 0.0.3'
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polish_invoicer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -66,7 +66,7 @@ dependencies:
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 0.0.2
69
+ version: 0.0.3
70
70
  type: :runtime
71
71
  prerelease: false
72
72
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,7 +74,7 @@ dependencies:
74
74
  requirements:
75
75
  - - ~>
76
76
  - !ruby/object:Gem::Version
77
- version: 0.0.2
77
+ version: 0.0.3
78
78
  description: Creates polish invoices and proforms as HTML or PDF files
79
79
  email:
80
80
  - piotr@macuk.pl
@@ -124,7 +124,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  segments:
126
126
  - 0
127
- hash: -4419558403918347538
127
+ hash: -4309936482089687920
128
128
  required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  segments:
135
135
  - 0
136
- hash: -4419558403918347538
136
+ hash: -4309936482089687920
137
137
  requirements: []
138
138
  rubyforge_project:
139
139
  rubygems_version: 1.8.25