webtranslateit-payday 1.6.5 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.github/workflows/release-drafter.yml +1 -1
- data/.rubocop_todo.yml +0 -7
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +77 -64
- data/lib/payday/invoiceable.rb +1 -1
- data/lib/payday/pdf_renderer.rb +2 -2
- data/payday.gemspec +1 -1
- data/spec/assets/svg.pdf +176 -104
- data/spec/assets/testing.pdf +214 -151
- data/spec/assets/testing_es.pdf +0 -0
- data/spec/assets/testing_predefined_amount.pdf +0 -0
- data/spec/invoice_spec.rb +3 -3
- data/spec/line_item_spec.rb +5 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af18c3bd87aeaf146cb6f1f7dc4ad521942e9b5dbc2036ed023189f869fe913a
|
|
4
|
+
data.tar.gz: 5dcb1819cc85de4ecb6b84a1ffee84ea53b02b7f512b336a45954984f228821d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba62084ebf6655f679cdfeb63b62e010415b9fe2858419b14208490398363928c37b78560613f07eaa8deb5e8b6d813be6d241f219b4960b041102749e1c7802
|
|
7
|
+
data.tar.gz: 65e0aafffbbdb47987d06b897fa1aea90531b4f17ce39562b93e30f562d6262b0482f1981f71334657caf990bc382f7963c4a3a7ee0ef2c3b045dc30ac814a62
|
data/.github/workflows/ci.yml
CHANGED
|
@@ -14,10 +14,10 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
|
-
ruby-version: ['3.1', '3.2']
|
|
17
|
+
ruby-version: ['3.1', '3.2', '3.3']
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
21
|
- name: Set up Ruby
|
|
22
22
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
23
23
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
@@ -35,7 +35,7 @@ jobs:
|
|
|
35
35
|
|
|
36
36
|
steps:
|
|
37
37
|
- name: Checkout repository
|
|
38
|
-
uses: actions/checkout@
|
|
38
|
+
uses: actions/checkout@v4
|
|
39
39
|
|
|
40
40
|
- name: Install ruby and gems
|
|
41
41
|
uses: ruby/setup-ruby@v1
|
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
|
21
21
|
|
|
22
22
|
# Drafts your next Release notes as Pull Requests are merged into "master"
|
|
23
|
-
- uses: release-drafter/release-drafter@
|
|
23
|
+
- uses: release-drafter/release-drafter@v6
|
|
24
24
|
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
|
25
25
|
# with:
|
|
26
26
|
# config-name: my-config.yml
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config --exclude-limit 100`
|
|
3
|
-
# on 2022-08-16 13:38:41 UTC using RuboCop version 1.35.0.
|
|
4
|
-
# The point is for the user to remove these configuration records
|
|
5
|
-
# one by one as the offenses are removed from the code base.
|
|
6
|
-
# Note that changes in the inspected code, or installation of new
|
|
7
|
-
# versions of RuboCop, may require this file to be generated again.
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
webtranslateit-payday (1.6.
|
|
4
|
+
webtranslateit-payday (1.6.7)
|
|
5
5
|
activesupport (~> 7, < 8)
|
|
6
6
|
i18n (~> 1.12, < 2)
|
|
7
7
|
money (~> 6.16, < 7)
|
|
@@ -13,22 +13,32 @@ PATH
|
|
|
13
13
|
GEM
|
|
14
14
|
remote: https://rubygems.org/
|
|
15
15
|
specs:
|
|
16
|
-
activesupport (7.
|
|
17
|
-
|
|
16
|
+
activesupport (7.2.1)
|
|
17
|
+
base64
|
|
18
|
+
bigdecimal
|
|
19
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
20
|
+
connection_pool (>= 2.2.5)
|
|
21
|
+
drb
|
|
18
22
|
i18n (>= 1.6, < 2)
|
|
23
|
+
logger (>= 1.4.2)
|
|
19
24
|
minitest (>= 5.1)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
securerandom (>= 0.3)
|
|
26
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
27
|
+
addressable (2.8.7)
|
|
28
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
23
29
|
ast (2.4.2)
|
|
30
|
+
base64 (0.2.0)
|
|
31
|
+
bigdecimal (3.1.8)
|
|
24
32
|
coderay (1.1.3)
|
|
25
|
-
concurrent-ruby (1.
|
|
26
|
-
|
|
33
|
+
concurrent-ruby (1.3.4)
|
|
34
|
+
connection_pool (2.4.1)
|
|
35
|
+
css_parser (1.19.0)
|
|
27
36
|
addressable
|
|
28
|
-
diff-lcs (1.5.
|
|
37
|
+
diff-lcs (1.5.1)
|
|
38
|
+
drb (2.2.1)
|
|
29
39
|
ffi (1.15.5)
|
|
30
40
|
formatador (1.1.0)
|
|
31
|
-
guard (2.18.
|
|
41
|
+
guard (2.18.1)
|
|
32
42
|
formatador (>= 0.2.4)
|
|
33
43
|
listen (>= 2.7, < 4.0)
|
|
34
44
|
lumberjack (>= 1.0.12, < 2.0)
|
|
@@ -45,93 +55,96 @@ GEM
|
|
|
45
55
|
guard-rubocop (1.5.0)
|
|
46
56
|
guard (~> 2.0)
|
|
47
57
|
rubocop (< 2.0)
|
|
48
|
-
i18n (1.14.
|
|
58
|
+
i18n (1.14.6)
|
|
49
59
|
concurrent-ruby (~> 1.0)
|
|
50
|
-
json (2.
|
|
51
|
-
|
|
60
|
+
json (2.7.2)
|
|
61
|
+
language_server-protocol (3.17.0.3)
|
|
62
|
+
listen (3.8.0)
|
|
52
63
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
53
64
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
54
|
-
|
|
65
|
+
logger (1.6.1)
|
|
66
|
+
lumberjack (1.2.9)
|
|
55
67
|
matrix (0.4.2)
|
|
56
68
|
method_source (1.0.0)
|
|
57
|
-
minitest (5.
|
|
58
|
-
money (6.
|
|
69
|
+
minitest (5.25.1)
|
|
70
|
+
money (6.19.0)
|
|
59
71
|
i18n (>= 0.6.4, <= 2)
|
|
60
72
|
nenv (0.3.0)
|
|
61
73
|
notiffany (0.1.3)
|
|
62
74
|
nenv (~> 0.1)
|
|
63
75
|
shellany (~> 0.0)
|
|
64
|
-
parallel (1.
|
|
65
|
-
parser (3.
|
|
76
|
+
parallel (1.26.3)
|
|
77
|
+
parser (3.3.5.0)
|
|
66
78
|
ast (~> 2.4.1)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
79
|
+
racc
|
|
80
|
+
pdf-core (0.10.0)
|
|
81
|
+
prawn (2.5.0)
|
|
82
|
+
matrix (~> 0.4)
|
|
83
|
+
pdf-core (~> 0.10.0)
|
|
84
|
+
ttfunk (~> 1.8)
|
|
85
|
+
prawn-svg (0.35.1)
|
|
72
86
|
css_parser (~> 1.6)
|
|
87
|
+
matrix (~> 0.4.2)
|
|
73
88
|
prawn (>= 0.11.1, < 3)
|
|
74
|
-
rexml (
|
|
89
|
+
rexml (>= 3.2.0, < 4)
|
|
75
90
|
prawn-table (0.2.2)
|
|
76
91
|
prawn (>= 1.3.0, < 3.0.0)
|
|
77
|
-
pry (0.14.
|
|
92
|
+
pry (0.14.2)
|
|
78
93
|
coderay (~> 1.1)
|
|
79
94
|
method_source (~> 1.0)
|
|
80
|
-
public_suffix (
|
|
95
|
+
public_suffix (6.0.1)
|
|
96
|
+
racc (1.8.1)
|
|
81
97
|
rainbow (3.1.1)
|
|
82
|
-
rb-fsevent (0.11.
|
|
98
|
+
rb-fsevent (0.11.2)
|
|
83
99
|
rb-inotify (0.10.1)
|
|
84
100
|
ffi (~> 1.0)
|
|
85
|
-
regexp_parser (2.
|
|
86
|
-
rexml (3.
|
|
87
|
-
rspec (3.
|
|
88
|
-
rspec-core (~> 3.
|
|
89
|
-
rspec-expectations (~> 3.
|
|
90
|
-
rspec-mocks (~> 3.
|
|
91
|
-
rspec-core (3.
|
|
92
|
-
rspec-support (~> 3.
|
|
93
|
-
rspec-expectations (3.
|
|
101
|
+
regexp_parser (2.9.2)
|
|
102
|
+
rexml (3.3.7)
|
|
103
|
+
rspec (3.13.0)
|
|
104
|
+
rspec-core (~> 3.13.0)
|
|
105
|
+
rspec-expectations (~> 3.13.0)
|
|
106
|
+
rspec-mocks (~> 3.13.0)
|
|
107
|
+
rspec-core (3.13.0)
|
|
108
|
+
rspec-support (~> 3.13.0)
|
|
109
|
+
rspec-expectations (3.13.0)
|
|
94
110
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
|
-
rspec-support (~> 3.
|
|
96
|
-
rspec-mocks (3.
|
|
111
|
+
rspec-support (~> 3.13.0)
|
|
112
|
+
rspec-mocks (3.13.0)
|
|
97
113
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
|
-
rspec-support (~> 3.
|
|
99
|
-
rspec-support (3.
|
|
100
|
-
rubocop (1.
|
|
114
|
+
rspec-support (~> 3.13.0)
|
|
115
|
+
rspec-support (3.13.0)
|
|
116
|
+
rubocop (1.66.1)
|
|
101
117
|
json (~> 2.3)
|
|
118
|
+
language_server-protocol (>= 3.17.0)
|
|
102
119
|
parallel (~> 1.10)
|
|
103
|
-
parser (>= 3.
|
|
120
|
+
parser (>= 3.3.0.2)
|
|
104
121
|
rainbow (>= 2.2.2, < 4.0)
|
|
105
|
-
regexp_parser (>=
|
|
106
|
-
|
|
107
|
-
rubocop-ast (>= 1.28.0, < 2.0)
|
|
122
|
+
regexp_parser (>= 2.4, < 3.0)
|
|
123
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
|
108
124
|
ruby-progressbar (~> 1.7)
|
|
109
125
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
110
|
-
rubocop-ast (1.
|
|
111
|
-
parser (>= 3.
|
|
112
|
-
rubocop-
|
|
113
|
-
rubocop (
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
rubocop (>= 1.7.0, < 2.0)
|
|
118
|
-
rubocop-ast (>= 0.4.0)
|
|
119
|
-
rubocop-rspec (2.22.0)
|
|
120
|
-
rubocop (~> 1.33)
|
|
121
|
-
rubocop-capybara (~> 2.17)
|
|
122
|
-
rubocop-factory_bot (~> 2.22)
|
|
126
|
+
rubocop-ast (1.32.3)
|
|
127
|
+
parser (>= 3.3.1.0)
|
|
128
|
+
rubocop-performance (1.22.1)
|
|
129
|
+
rubocop (>= 1.48.1, < 2.0)
|
|
130
|
+
rubocop-ast (>= 1.31.1, < 2.0)
|
|
131
|
+
rubocop-rspec (3.0.5)
|
|
132
|
+
rubocop (~> 1.61)
|
|
123
133
|
ruby-progressbar (1.13.0)
|
|
134
|
+
securerandom (0.3.1)
|
|
124
135
|
shellany (0.0.1)
|
|
125
|
-
thor (1.2.
|
|
126
|
-
ttfunk (1.
|
|
136
|
+
thor (1.2.2)
|
|
137
|
+
ttfunk (1.8.0)
|
|
138
|
+
bigdecimal (~> 3.1)
|
|
127
139
|
tzinfo (2.0.6)
|
|
128
140
|
concurrent-ruby (~> 1.0)
|
|
129
|
-
unicode-display_width (2.
|
|
130
|
-
zeitwerk (2.6.
|
|
141
|
+
unicode-display_width (2.6.0)
|
|
142
|
+
zeitwerk (2.6.18)
|
|
131
143
|
|
|
132
144
|
PLATFORMS
|
|
133
145
|
arm64-darwin-21
|
|
134
146
|
arm64-darwin-22
|
|
147
|
+
arm64-darwin-23
|
|
135
148
|
x86_64-darwin-21
|
|
136
149
|
x86_64-linux
|
|
137
150
|
|
|
@@ -140,11 +153,11 @@ DEPENDENCIES
|
|
|
140
153
|
guard-rspec
|
|
141
154
|
guard-rubocop
|
|
142
155
|
matrix
|
|
143
|
-
rspec (~> 3.
|
|
156
|
+
rspec (~> 3.13.0)
|
|
144
157
|
rubocop
|
|
145
158
|
rubocop-performance
|
|
146
159
|
rubocop-rspec
|
|
147
160
|
webtranslateit-payday!
|
|
148
161
|
|
|
149
162
|
BUNDLED WITH
|
|
150
|
-
2.
|
|
163
|
+
2.5.19
|
data/lib/payday/invoiceable.rb
CHANGED
|
@@ -27,7 +27,7 @@ module Payday
|
|
|
27
27
|
|
|
28
28
|
# Calculates the subtotal of this invoice by adding up all of the line items
|
|
29
29
|
def subtotal
|
|
30
|
-
line_items.reduce(BigDecimal(
|
|
30
|
+
line_items.reduce(BigDecimal(0)) { |result, item| result + item.amount }
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# The tax for this invoice, as a BigDecimal
|
data/lib/payday/pdf_renderer.rb
CHANGED
|
@@ -200,8 +200,8 @@ module Payday
|
|
|
200
200
|
[line.description, '', '', number_to_currency(line.predefined_amount, invoice)]
|
|
201
201
|
else
|
|
202
202
|
[line.description,
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
line.display_price || number_to_currency(line.price, invoice),
|
|
204
|
+
line.display_quantity || BigDecimal(line.quantity.to_s).to_s('F'),
|
|
205
205
|
number_to_currency(line.amount, invoice)]
|
|
206
206
|
end
|
|
207
207
|
end
|