write_invoice 0.1.81 → 0.1.82

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d17ffa14ee1d6ebb33dd0eb85f54e1d033e4c1b184b926edd77755c13cc6e0b
4
- data.tar.gz: 5e684d02938160f627e69e2294cd13c9e23206ec952fa798482513e55f3bf45b
3
+ metadata.gz: c0b0dbb6f31234d819783ff45fa18f9b9bbc2743855a9c36e60d141a34f10496
4
+ data.tar.gz: c978bdb242dba4e124bb27fe1503ef928edb9eabd8ffa004f11682e288e9a7c9
5
5
  SHA512:
6
- metadata.gz: 2df6cacfd019e2b5512f09cdb891561395ae90e775f44e30c7fd1d4c01b5b82a4368a6cd76a5568e34b6571b2396fffe9eaf37e6a33d9b5db54241ec7b97f362
7
- data.tar.gz: 266660213a3bc34154c7bc7de3b4a3191b4278ccf3a56834a86d77e07301942fb88383414ad8024d65bab79152a16c73a7d8bf54c74557d7a253c92324cfc324
6
+ metadata.gz: 0b81e8a6b0e0ee65422d893aca4f9de5a6394ce35e3130124774e368d85a8554d23471505ff164df4ab1b212b5921d70dba053d05b325905525b554c3ac5bea4
7
+ data.tar.gz: 7459a31ee19eb2ccea30ce3849f72a2a297c395547eda94ab2be90520cc7760a1a0b5cc256abc3da285c729a30d937f2499aed41d32d1861896452ee8a98a86a
@@ -871,7 +871,12 @@ module Options
871
871
  messages.each { | m | puts( '- ' + m ) }
872
872
  end
873
873
 
874
- return validation ? messages.length == 0 : insert
874
+
875
+ if validation ?
876
+ return [ messages.length == 0, messages ]
877
+ else
878
+ return insert
879
+ end
875
880
  end
876
881
 
877
882
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WriteInvoice
4
- VERSION = "0.1.81"
4
+ VERSION = "0.1.82"
5
5
  end
data/lib/write_invoice.rb CHANGED
@@ -44,7 +44,9 @@ module WriteInvoice
44
44
  def self.generate( output: nil, payload: nil, options: {}, debug: true )
45
45
 
46
46
  template = Marshal.load( Marshal.dump( get_options ) )
47
- if options_update( options, template, true )
47
+ valid, messages = options_update( options, template, true )
48
+
49
+ if valid
48
50
  debug ? print( 'Document ' ) : ''
49
51
  pdf = self.document( template, options, payload, output, debug )
50
52
  debug ? puts : ''
@@ -59,7 +61,7 @@ module WriteInvoice
59
61
  end
60
62
 
61
63
  else
62
- return false
64
+ return messages
63
65
  end
64
66
  end
65
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: write_invoice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.81
4
+ version: 0.1.82
5
5
  platform: ruby
6
6
  authors:
7
7
  - a6b8
@@ -117,7 +117,6 @@ files:
117
117
  - lib/write_invoice/document/sections.rb
118
118
  - lib/write_invoice/example/index.rb
119
119
  - lib/write_invoice/version.rb
120
- - write_invoice-0.1.8.gem
121
120
  homepage: https://github.com/a6b8/write-invoice-for-ruby
122
121
  licenses:
123
122
  - MIT
Binary file