forked from mcfox/ruby_danfe
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
24 lines (21 loc) · 678 Bytes
/
Rakefile
File metadata and controls
24 lines (21 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require "bundler/gem_tasks"
require "ruby_danfe"
desc "Open an irb session preloaded ruby_danfe classes"
task :console do
sh "irb -rubygems -I lib -r ruby_danfe.rb"
end
namespace :spec do
namespace :fixtures do
desc "Recreate all pdfs fixtures. Use this task always that output pdf format is changed."
task :recreate_pdfs do
Dir["spec/fixtures/nfe*.xml"].each do |f|
puts "Recreating #{f}.fixture.pdf"
RubyDanfe.generate("#{f}.fixture.pdf", "#{f}")
end
Dir["spec/fixtures/cte*.xml"].each do |f|
puts "Recreating #{f}.fixture.pdf"
RubyDanfe.generate("#{f}.fixture.pdf", "#{f}", :dacte)
end
end
end
end