Sha256: 95889d0c025f639b4dfb7b9fbdf3afcfe41da4d75dba201d19eb5497680b85e1

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

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

      puts "Recreating spec/fixtures/4_decimals_nfe_simples_nacional.xml.fixture.pdf"
      RubyDanfe.options = {"quantity_decimals" => 4}
      RubyDanfe.generate("spec/fixtures/4_decimals_nfe_simples_nacional.xml.fixture.pdf", "spec/fixtures/4_decimals_nfe_simples_nacional.xml")

      Dir["spec/fixtures/cte*.xml"].each do |f|
        puts "Recreating #{f}.fixture.pdf"
        RubyDanfe.generate("#{f}.fixture.pdf", "#{f}", :dacte)
      end

      Dir["spec/fixtures/nfse*.xml"].each do |f|
        puts "Recreating #{f}.fixture.pdf"
        RubyDanfe.generate("#{f}.fixture.pdf", "#{f}", :danfse)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby_danfe-1.15.4 Rakefile
ruby_danfe-1.15.2 Rakefile
ruby_danfe-1.15.1 Rakefile
ruby_danfe-1.15.0 Rakefile