webtranslateit-payday 1.6.4 → 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 +4 -8
- data/.github/workflows/release-drafter.yml +1 -1
- data/.rubocop_todo.yml +0 -7
- data/CHANGELOG.md +19 -6
- data/Gemfile +1 -1
- data/Gemfile.lock +81 -61
- 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
|
@@ -7,21 +7,17 @@
|
|
|
7
7
|
|
|
8
8
|
name: Ruby
|
|
9
9
|
|
|
10
|
-
on:
|
|
11
|
-
push:
|
|
12
|
-
branches:
|
|
13
|
-
pull_request:
|
|
14
|
-
branches:
|
|
10
|
+
on: push
|
|
15
11
|
|
|
16
12
|
jobs:
|
|
17
13
|
test:
|
|
18
14
|
runs-on: ubuntu-latest
|
|
19
15
|
strategy:
|
|
20
16
|
matrix:
|
|
21
|
-
ruby-version: ['3.1']
|
|
17
|
+
ruby-version: ['3.1', '3.2', '3.3']
|
|
22
18
|
|
|
23
19
|
steps:
|
|
24
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v4
|
|
25
21
|
- name: Set up Ruby
|
|
26
22
|
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
27
23
|
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
@@ -39,7 +35,7 @@ jobs:
|
|
|
39
35
|
|
|
40
36
|
steps:
|
|
41
37
|
- name: Checkout repository
|
|
42
|
-
uses: actions/checkout@
|
|
38
|
+
uses: actions/checkout@v4
|
|
43
39
|
|
|
44
40
|
- name: Install ruby and gems
|
|
45
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
|
@@ -1,22 +1,35 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
-
## 1.6.
|
|
3
|
+
## 1.6.7 (2024-09-23)
|
|
4
|
+
|
|
5
|
+
* Code Improvement (rubocop).
|
|
6
|
+
|
|
7
|
+
## 1.6.6 (2023-12-04)
|
|
8
|
+
|
|
9
|
+
* Code Improvement (rubocop).
|
|
10
|
+
|
|
11
|
+
## 1.6.5 (2023-06-16)
|
|
12
|
+
|
|
13
|
+
* Add ruby 3.2 to test matrix.
|
|
14
|
+
* Dependencies update.
|
|
15
|
+
|
|
16
|
+
## 1.6.4 (2022-10-24)
|
|
4
17
|
|
|
5
18
|
* Code refactoring.
|
|
6
19
|
|
|
7
|
-
## 1.6.3 (
|
|
20
|
+
## 1.6.3 (2022-08-29)
|
|
8
21
|
|
|
9
22
|
* Fix styling of Notes heading.
|
|
10
23
|
|
|
11
|
-
## 1.6.2 (
|
|
24
|
+
## 1.6.2 (2022-08-16)
|
|
12
25
|
|
|
13
26
|
* Use rubocop-performance and fix one performance issue.
|
|
14
27
|
|
|
15
|
-
## 1.6.1 (
|
|
28
|
+
## 1.6.1 (2022-08-16)
|
|
16
29
|
|
|
17
30
|
* Fix booting of Payday. It requires the module Payday to be declared.
|
|
18
31
|
|
|
19
|
-
## 1.6.0 (
|
|
32
|
+
## 1.6.0 (2022-08-16)
|
|
20
33
|
|
|
21
34
|
* Set up release-drafter.
|
|
22
35
|
* Don’t leave gemspec dependencies open ended.
|
|
@@ -24,7 +37,7 @@
|
|
|
24
37
|
* Inherit rubocop styles from our defaults and fix offences.
|
|
25
38
|
* Load gem’s files using Zeitwerk.
|
|
26
39
|
|
|
27
|
-
## 1.5.0 (
|
|
40
|
+
## 1.5.0 (2022-08-09)
|
|
28
41
|
|
|
29
42
|
* Rubocop offences fixes.
|
|
30
43
|
|
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,86 +55,96 @@ GEM
|
|
|
45
55
|
guard-rubocop (1.5.0)
|
|
46
56
|
guard (~> 2.0)
|
|
47
57
|
rubocop (< 2.0)
|
|
48
|
-
i18n (1.
|
|
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.22.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
|
-
unicode-display_width (>=
|
|
110
|
-
rubocop-ast (1.
|
|
111
|
-
parser (>= 3.
|
|
112
|
-
rubocop-performance (1.
|
|
113
|
-
rubocop (>= 1.
|
|
114
|
-
rubocop-ast (>=
|
|
115
|
-
rubocop-rspec (
|
|
116
|
-
rubocop (~> 1.
|
|
117
|
-
ruby-progressbar (1.
|
|
125
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
|
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)
|
|
133
|
+
ruby-progressbar (1.13.0)
|
|
134
|
+
securerandom (0.3.1)
|
|
118
135
|
shellany (0.0.1)
|
|
119
|
-
thor (1.2.
|
|
120
|
-
ttfunk (1.
|
|
121
|
-
|
|
136
|
+
thor (1.2.2)
|
|
137
|
+
ttfunk (1.8.0)
|
|
138
|
+
bigdecimal (~> 3.1)
|
|
139
|
+
tzinfo (2.0.6)
|
|
122
140
|
concurrent-ruby (~> 1.0)
|
|
123
|
-
unicode-display_width (2.
|
|
124
|
-
zeitwerk (2.6.
|
|
141
|
+
unicode-display_width (2.6.0)
|
|
142
|
+
zeitwerk (2.6.18)
|
|
125
143
|
|
|
126
144
|
PLATFORMS
|
|
127
145
|
arm64-darwin-21
|
|
146
|
+
arm64-darwin-22
|
|
147
|
+
arm64-darwin-23
|
|
128
148
|
x86_64-darwin-21
|
|
129
149
|
x86_64-linux
|
|
130
150
|
|
|
@@ -133,11 +153,11 @@ DEPENDENCIES
|
|
|
133
153
|
guard-rspec
|
|
134
154
|
guard-rubocop
|
|
135
155
|
matrix
|
|
136
|
-
rspec (~> 3.
|
|
156
|
+
rspec (~> 3.13.0)
|
|
137
157
|
rubocop
|
|
138
158
|
rubocop-performance
|
|
139
159
|
rubocop-rspec
|
|
140
160
|
webtranslateit-payday!
|
|
141
161
|
|
|
142
162
|
BUNDLED WITH
|
|
143
|
-
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
|