webtranslateit-payday 1.4.0 → 1.6.0
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/dependabot.yml +3 -1
- data/.github/release-drafter.yml +36 -0
- data/.github/workflows/release-drafter.yml +29 -0
- data/.gitignore +1 -1
- data/.rubocop.yml +8 -150
- data/.rubocop_todo.yml +0 -7
- data/CHANGELOG.md +12 -0
- data/Gemfile +11 -1
- data/Gemfile.lock +139 -0
- data/Guardfile +2 -0
- data/Rakefile +2 -0
- data/lib/payday/config.rb +6 -0
- data/lib/payday/invoice.rb +6 -0
- data/lib/payday/invoiceable.rb +7 -1
- data/lib/payday/line_item.rb +6 -0
- data/lib/payday/line_itemable.rb +7 -1
- data/lib/payday/pdf_renderer.rb +46 -40
- data/lib/payday.rb +14 -13
- data/payday.gemspec +9 -20
- data/spec/invoice_spec.rb +7 -3
- data/spec/line_item_spec.rb +4 -0
- data/spec/pdf_renderer_spec.rb +4 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/support/asset_matchers.rb +2 -0
- metadata +68 -123
- data/lib/payday/i18n.rb +0 -3
- data/lib/payday/version.rb +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb7eb8b193dfb36f037b5c9cb428229579da578a6f645edbb25730899d20701d
|
|
4
|
+
data.tar.gz: 1812ebfd3a8c05fde6dd07a5626d715d614a3a63167ec7c89662c7c9d81770e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e0af2856aca3b1451e98ad8f6f5bd1c8bd5b58e72d3189e058e2b732e0a10202caed2219c7f5720527b79bf74c59e4ce98de0b18c27264b951a7f12161896805
|
|
7
|
+
data.tar.gz: d2386981f2a425f306b1c5211e9da53e1ad5d16327f14bc32f73d93bda1c2aa9a34cbfc87653e892f8490632f10cef12098d850e2c6796f7514e35c3cba775e3
|
data/.github/dependabot.yml
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name-template: '$RESOLVED_VERSION 🌈'
|
|
2
|
+
tag-template: '$RESOLVED_VERSION'
|
|
3
|
+
categories:
|
|
4
|
+
- title: '🚀 Features'
|
|
5
|
+
labels:
|
|
6
|
+
- 'feature'
|
|
7
|
+
- 'enhancement'
|
|
8
|
+
- title: '🐛 Bug Fixes'
|
|
9
|
+
labels:
|
|
10
|
+
- 'bug'
|
|
11
|
+
- 'design'
|
|
12
|
+
- 'performance'
|
|
13
|
+
- title: '🧰 Maintenance'
|
|
14
|
+
labels:
|
|
15
|
+
- 'admin'
|
|
16
|
+
- 'refactoring'
|
|
17
|
+
- 'dependencies'
|
|
18
|
+
- 'github_actions'
|
|
19
|
+
- 'tests'
|
|
20
|
+
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
|
|
21
|
+
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
|
|
22
|
+
version-resolver:
|
|
23
|
+
major:
|
|
24
|
+
labels:
|
|
25
|
+
- 'major'
|
|
26
|
+
minor:
|
|
27
|
+
labels:
|
|
28
|
+
- 'minor'
|
|
29
|
+
patch:
|
|
30
|
+
labels:
|
|
31
|
+
- 'patch'
|
|
32
|
+
default: patch
|
|
33
|
+
template: |
|
|
34
|
+
## Changes
|
|
35
|
+
|
|
36
|
+
$CHANGES
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Release Drafter
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
# branches to consider in the event; optional, defaults to all
|
|
6
|
+
branches:
|
|
7
|
+
- main
|
|
8
|
+
# pull_request event is required only for autolabeler
|
|
9
|
+
pull_request:
|
|
10
|
+
# Only following types are handled by the action, but one can default to all as well
|
|
11
|
+
types: [opened, reopened, synchronize]
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
update_release_draft:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
# (Optional) GitHub Enterprise requires GHE_HOST variable set
|
|
18
|
+
#- name: Set GHE_HOST
|
|
19
|
+
# run: |
|
|
20
|
+
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV
|
|
21
|
+
|
|
22
|
+
# Drafts your next Release notes as Pull Requests are merged into "master"
|
|
23
|
+
- uses: release-drafter/release-drafter@v5
|
|
24
|
+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
|
|
25
|
+
# with:
|
|
26
|
+
# config-name: my-config.yml
|
|
27
|
+
# disable-autolabeler: true
|
|
28
|
+
env:
|
|
29
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
require:
|
|
2
|
+
- rubocop-rspec
|
|
3
|
+
|
|
4
|
+
inherit_from:
|
|
5
|
+
- https://raw.githubusercontent.com/webtranslateit/webtranslateit/main/.rubocop_common.yml
|
|
6
|
+
- .rubocop_todo.yml
|
|
2
7
|
|
|
3
8
|
AllCops:
|
|
4
9
|
TargetRubyVersion: 3.1
|
|
@@ -6,152 +11,5 @@ AllCops:
|
|
|
6
11
|
- lib/generators/**/*
|
|
7
12
|
|
|
8
13
|
inherit_mode:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
require: rubocop-rspec
|
|
13
|
-
|
|
14
|
-
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
|
15
|
-
Enabled: true
|
|
16
|
-
Gemspec/RequireMFA: # new in 1.23
|
|
17
|
-
Enabled: true
|
|
18
|
-
Layout/LineEndStringConcatenationIndentation: # new in 1.18
|
|
19
|
-
Enabled: true
|
|
20
|
-
Layout/SpaceBeforeBrackets: # new in 1.7
|
|
21
|
-
Enabled: true
|
|
22
|
-
Lint/AmbiguousAssignment: # new in 1.7
|
|
23
|
-
Enabled: true
|
|
24
|
-
Lint/AmbiguousOperatorPrecedence: # new in 1.21
|
|
25
|
-
Enabled: true
|
|
26
|
-
Lint/AmbiguousRange: # new in 1.19
|
|
27
|
-
Enabled: true
|
|
28
|
-
Lint/DeprecatedConstants: # new in 1.8
|
|
29
|
-
Enabled: true
|
|
30
|
-
Lint/DuplicateBranch: # new in 1.3
|
|
31
|
-
Enabled: true
|
|
32
|
-
Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
|
|
33
|
-
Enabled: true
|
|
34
|
-
Lint/EmptyBlock: # new in 1.1
|
|
35
|
-
Enabled: true
|
|
36
|
-
Lint/EmptyClass: # new in 1.3
|
|
37
|
-
Enabled: true
|
|
38
|
-
Lint/EmptyInPattern: # new in 1.16
|
|
39
|
-
Enabled: true
|
|
40
|
-
Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
|
|
41
|
-
Enabled: true
|
|
42
|
-
Lint/LambdaWithoutLiteralBlock: # new in 1.8
|
|
43
|
-
Enabled: true
|
|
44
|
-
Lint/NoReturnInBeginEndBlocks: # new in 1.2
|
|
45
|
-
Enabled: true
|
|
46
|
-
Lint/NumberedParameterAssignment: # new in 1.9
|
|
47
|
-
Enabled: true
|
|
48
|
-
Lint/OrAssignmentToConstant: # new in 1.9
|
|
49
|
-
Enabled: true
|
|
50
|
-
Lint/RedundantDirGlobSort: # new in 1.8
|
|
51
|
-
Enabled: true
|
|
52
|
-
Lint/RefinementImportMethods: # new in 1.27
|
|
53
|
-
Enabled: true
|
|
54
|
-
Lint/RequireRelativeSelfPath: # new in 1.22
|
|
55
|
-
Enabled: true
|
|
56
|
-
Lint/SymbolConversion: # new in 1.9
|
|
57
|
-
Enabled: true
|
|
58
|
-
Lint/ToEnumArguments: # new in 1.1
|
|
59
|
-
Enabled: true
|
|
60
|
-
Lint/TripleQuotes: # new in 1.9
|
|
61
|
-
Enabled: true
|
|
62
|
-
Lint/UnexpectedBlockArity: # new in 1.5
|
|
63
|
-
Enabled: true
|
|
64
|
-
Lint/UnmodifiedReduceAccumulator: # new in 1.1
|
|
65
|
-
Enabled: true
|
|
66
|
-
Lint/UselessRuby2Keywords: # new in 1.23
|
|
67
|
-
Enabled: true
|
|
68
|
-
Naming/BlockForwarding: # new in 1.24
|
|
69
|
-
Enabled: true
|
|
70
|
-
Security/CompoundHash: # new in 1.28
|
|
71
|
-
Enabled: true
|
|
72
|
-
Security/IoMethods: # new in 1.22
|
|
73
|
-
Enabled: true
|
|
74
|
-
Style/ArgumentsForwarding: # new in 1.1
|
|
75
|
-
Enabled: true
|
|
76
|
-
Style/CollectionCompact: # new in 1.2
|
|
77
|
-
Enabled: true
|
|
78
|
-
Style/DocumentDynamicEvalDefinition: # new in 1.1
|
|
79
|
-
Enabled: true
|
|
80
|
-
Style/EndlessMethod: # new in 1.8
|
|
81
|
-
Enabled: true
|
|
82
|
-
Style/EnvHome: # new in 1.29
|
|
83
|
-
Enabled: true
|
|
84
|
-
Style/FetchEnvVar: # new in 1.28
|
|
85
|
-
Enabled: true
|
|
86
|
-
Style/FileRead: # new in 1.24
|
|
87
|
-
Enabled: true
|
|
88
|
-
Style/FileWrite: # new in 1.24
|
|
89
|
-
Enabled: true
|
|
90
|
-
Style/HashConversion: # new in 1.10
|
|
91
|
-
Enabled: true
|
|
92
|
-
Style/HashExcept: # new in 1.7
|
|
93
|
-
Enabled: true
|
|
94
|
-
Style/IfWithBooleanLiteralBranches: # new in 1.9
|
|
95
|
-
Enabled: true
|
|
96
|
-
Style/InPatternThen: # new in 1.16
|
|
97
|
-
Enabled: true
|
|
98
|
-
Style/MapCompactWithConditionalBlock: # new in 1.30
|
|
99
|
-
Enabled: true
|
|
100
|
-
Style/MapToHash: # new in 1.24
|
|
101
|
-
Enabled: true
|
|
102
|
-
Style/MultilineInPatternThen: # new in 1.16
|
|
103
|
-
Enabled: true
|
|
104
|
-
Style/NegatedIfElseCondition: # new in 1.2
|
|
105
|
-
Enabled: true
|
|
106
|
-
Style/NestedFileDirname: # new in 1.26
|
|
107
|
-
Enabled: true
|
|
108
|
-
Style/NilLambda: # new in 1.3
|
|
109
|
-
Enabled: true
|
|
110
|
-
Style/NumberedParameters: # new in 1.22
|
|
111
|
-
Enabled: true
|
|
112
|
-
Style/NumberedParametersLimit: # new in 1.22
|
|
113
|
-
Enabled: true
|
|
114
|
-
Style/ObjectThen: # new in 1.28
|
|
115
|
-
Enabled: true
|
|
116
|
-
Style/OpenStructUse: # new in 1.23
|
|
117
|
-
Enabled: true
|
|
118
|
-
Style/QuotedSymbols: # new in 1.16
|
|
119
|
-
Enabled: true
|
|
120
|
-
Style/RedundantArgument: # new in 1.4
|
|
121
|
-
Enabled: true
|
|
122
|
-
Style/RedundantInitialize: # new in 1.27
|
|
123
|
-
Enabled: true
|
|
124
|
-
Style/RedundantSelfAssignmentBranch: # new in 1.19
|
|
125
|
-
Enabled: true
|
|
126
|
-
Style/SelectByRegexp: # new in 1.22
|
|
127
|
-
Enabled: true
|
|
128
|
-
Style/StringChars: # new in 1.12
|
|
129
|
-
Enabled: true
|
|
130
|
-
Style/SwapValues: # new in 1.1
|
|
131
|
-
Enabled: true
|
|
132
|
-
RSpec/BeEq: # new in 2.9.0
|
|
133
|
-
Enabled: true
|
|
134
|
-
RSpec/BeNil: # new in 2.9.0
|
|
135
|
-
Enabled: true
|
|
136
|
-
RSpec/ChangeByZero: # new in 2.11.0
|
|
137
|
-
Enabled: true
|
|
138
|
-
RSpec/ExcessiveDocstringSpacing: # new in 2.5
|
|
139
|
-
Enabled: true
|
|
140
|
-
RSpec/IdenticalEqualityAssertion: # new in 2.4
|
|
141
|
-
Enabled: true
|
|
142
|
-
RSpec/SubjectDeclaration: # new in 2.5
|
|
143
|
-
Enabled: true
|
|
144
|
-
RSpec/VerifiedDoubleReference: # new in 2.10.0
|
|
145
|
-
Enabled: true
|
|
146
|
-
RSpec/FactoryBot/SyntaxMethods: # new in 2.7
|
|
147
|
-
Enabled: true
|
|
148
|
-
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
|
149
|
-
Enabled: true
|
|
150
|
-
Layout/LineContinuationLeadingSpace: # new in 1.31
|
|
151
|
-
Enabled: true
|
|
152
|
-
Layout/LineContinuationSpacing: # new in 1.31
|
|
153
|
-
Enabled: true
|
|
154
|
-
Lint/ConstantOverwrittenInRescue: # new in 1.31
|
|
155
|
-
Enabled: true
|
|
156
|
-
Lint/NonAtomicFileOperation: # new in 1.31
|
|
157
|
-
Enabled: true
|
|
14
|
+
merge:
|
|
15
|
+
- Exclude
|
data/.rubocop_todo.yml
CHANGED
|
@@ -13,10 +13,3 @@ Style/Documentation:
|
|
|
13
13
|
- 'spec/**/*'
|
|
14
14
|
- 'test/**/*'
|
|
15
15
|
- 'lib/generators/payday/setup/setup_generator.rb'
|
|
16
|
-
|
|
17
|
-
# Offense count: 19
|
|
18
|
-
# Cop supports --auto-correct.
|
|
19
|
-
# Configuration parameters: EnforcedStyle.
|
|
20
|
-
# SupportedStyles: always, always_true, never
|
|
21
|
-
Style/FrozenStringLiteralComment:
|
|
22
|
-
Enabled: false
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 1.6.0 (2002-08-16)
|
|
4
|
+
|
|
5
|
+
* Set up release-drafter.
|
|
6
|
+
* Don’t leave gemspec dependencies open ended.
|
|
7
|
+
* Move development dependencies to Gemfile and add Gemfile.lock to version control so dependabot can update them.
|
|
8
|
+
* Inherit rubocop styles from our defaults and fix offences.
|
|
9
|
+
* Load gem’s files using Zeitwerk.
|
|
10
|
+
|
|
11
|
+
## 1.5.0 (2002-08-09)
|
|
12
|
+
|
|
13
|
+
* Rubocop offences fixes.
|
|
14
|
+
|
|
3
15
|
## 1.4.0 (2022-06-29)
|
|
4
16
|
|
|
5
17
|
* Target ruby 3.1.
|
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
webtranslateit-payday (1.6.0)
|
|
5
|
+
activesupport (~> 7, < 8)
|
|
6
|
+
i18n (~> 1.12, < 2)
|
|
7
|
+
money (~> 6.16, < 7)
|
|
8
|
+
prawn (~> 2.4, < 3)
|
|
9
|
+
prawn-svg (~> 0.32, < 1)
|
|
10
|
+
prawn-table (~> 0.2, < 1)
|
|
11
|
+
zeitwerk (~> 2.6, < 3)
|
|
12
|
+
|
|
13
|
+
GEM
|
|
14
|
+
remote: https://rubygems.org/
|
|
15
|
+
specs:
|
|
16
|
+
activesupport (7.0.3.1)
|
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
18
|
+
i18n (>= 1.6, < 2)
|
|
19
|
+
minitest (>= 5.1)
|
|
20
|
+
tzinfo (~> 2.0)
|
|
21
|
+
addressable (2.8.0)
|
|
22
|
+
public_suffix (>= 2.0.2, < 5.0)
|
|
23
|
+
ast (2.4.2)
|
|
24
|
+
coderay (1.1.3)
|
|
25
|
+
concurrent-ruby (1.1.10)
|
|
26
|
+
css_parser (1.11.0)
|
|
27
|
+
addressable
|
|
28
|
+
diff-lcs (1.5.0)
|
|
29
|
+
ffi (1.15.5)
|
|
30
|
+
formatador (1.1.0)
|
|
31
|
+
guard (2.18.0)
|
|
32
|
+
formatador (>= 0.2.4)
|
|
33
|
+
listen (>= 2.7, < 4.0)
|
|
34
|
+
lumberjack (>= 1.0.12, < 2.0)
|
|
35
|
+
nenv (~> 0.1)
|
|
36
|
+
notiffany (~> 0.0)
|
|
37
|
+
pry (>= 0.13.0)
|
|
38
|
+
shellany (~> 0.0)
|
|
39
|
+
thor (>= 0.18.1)
|
|
40
|
+
guard-compat (1.2.1)
|
|
41
|
+
guard-rspec (4.7.3)
|
|
42
|
+
guard (~> 2.1)
|
|
43
|
+
guard-compat (~> 1.1)
|
|
44
|
+
rspec (>= 2.99.0, < 4.0)
|
|
45
|
+
guard-rubocop (1.5.0)
|
|
46
|
+
guard (~> 2.0)
|
|
47
|
+
rubocop (< 2.0)
|
|
48
|
+
i18n (1.12.0)
|
|
49
|
+
concurrent-ruby (~> 1.0)
|
|
50
|
+
json (2.6.2)
|
|
51
|
+
listen (3.7.1)
|
|
52
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
53
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
|
54
|
+
lumberjack (1.2.8)
|
|
55
|
+
matrix (0.4.2)
|
|
56
|
+
method_source (1.0.0)
|
|
57
|
+
minitest (5.16.2)
|
|
58
|
+
money (6.16.0)
|
|
59
|
+
i18n (>= 0.6.4, <= 2)
|
|
60
|
+
nenv (0.3.0)
|
|
61
|
+
notiffany (0.1.3)
|
|
62
|
+
nenv (~> 0.1)
|
|
63
|
+
shellany (~> 0.0)
|
|
64
|
+
parallel (1.22.1)
|
|
65
|
+
parser (3.1.2.1)
|
|
66
|
+
ast (~> 2.4.1)
|
|
67
|
+
pdf-core (0.9.0)
|
|
68
|
+
prawn (2.4.0)
|
|
69
|
+
pdf-core (~> 0.9.0)
|
|
70
|
+
ttfunk (~> 1.7)
|
|
71
|
+
prawn-svg (0.32.0)
|
|
72
|
+
css_parser (~> 1.6)
|
|
73
|
+
prawn (>= 0.11.1, < 3)
|
|
74
|
+
rexml (~> 3.2)
|
|
75
|
+
prawn-table (0.2.2)
|
|
76
|
+
prawn (>= 1.3.0, < 3.0.0)
|
|
77
|
+
pry (0.14.1)
|
|
78
|
+
coderay (~> 1.1)
|
|
79
|
+
method_source (~> 1.0)
|
|
80
|
+
public_suffix (4.0.7)
|
|
81
|
+
rainbow (3.1.1)
|
|
82
|
+
rb-fsevent (0.11.1)
|
|
83
|
+
rb-inotify (0.10.1)
|
|
84
|
+
ffi (~> 1.0)
|
|
85
|
+
regexp_parser (2.5.0)
|
|
86
|
+
rexml (3.2.5)
|
|
87
|
+
rspec (3.11.0)
|
|
88
|
+
rspec-core (~> 3.11.0)
|
|
89
|
+
rspec-expectations (~> 3.11.0)
|
|
90
|
+
rspec-mocks (~> 3.11.0)
|
|
91
|
+
rspec-core (3.11.0)
|
|
92
|
+
rspec-support (~> 3.11.0)
|
|
93
|
+
rspec-expectations (3.11.0)
|
|
94
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
95
|
+
rspec-support (~> 3.11.0)
|
|
96
|
+
rspec-mocks (3.11.1)
|
|
97
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
98
|
+
rspec-support (~> 3.11.0)
|
|
99
|
+
rspec-support (3.11.0)
|
|
100
|
+
rubocop (1.35.0)
|
|
101
|
+
json (~> 2.3)
|
|
102
|
+
parallel (~> 1.10)
|
|
103
|
+
parser (>= 3.1.2.1)
|
|
104
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
105
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
106
|
+
rexml (>= 3.2.5, < 4.0)
|
|
107
|
+
rubocop-ast (>= 1.20.1, < 2.0)
|
|
108
|
+
ruby-progressbar (~> 1.7)
|
|
109
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
110
|
+
rubocop-ast (1.21.0)
|
|
111
|
+
parser (>= 3.1.1.0)
|
|
112
|
+
rubocop-rspec (2.12.1)
|
|
113
|
+
rubocop (~> 1.31)
|
|
114
|
+
ruby-progressbar (1.11.0)
|
|
115
|
+
shellany (0.0.1)
|
|
116
|
+
thor (1.2.1)
|
|
117
|
+
ttfunk (1.7.0)
|
|
118
|
+
tzinfo (2.0.5)
|
|
119
|
+
concurrent-ruby (~> 1.0)
|
|
120
|
+
unicode-display_width (2.2.0)
|
|
121
|
+
zeitwerk (2.6.0)
|
|
122
|
+
|
|
123
|
+
PLATFORMS
|
|
124
|
+
arm64-darwin-21
|
|
125
|
+
x86_64-darwin-21
|
|
126
|
+
x86_64-linux
|
|
127
|
+
|
|
128
|
+
DEPENDENCIES
|
|
129
|
+
guard
|
|
130
|
+
guard-rspec
|
|
131
|
+
guard-rubocop
|
|
132
|
+
matrix
|
|
133
|
+
rspec (~> 3.11.0)
|
|
134
|
+
rubocop
|
|
135
|
+
rubocop-rspec
|
|
136
|
+
webtranslateit-payday!
|
|
137
|
+
|
|
138
|
+
BUNDLED WITH
|
|
139
|
+
2.3.12
|
data/Guardfile
CHANGED
data/Rakefile
CHANGED
data/lib/payday/config.rb
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Payday
|
|
4
|
+
|
|
2
5
|
# Configuration for Payday. This is a singleton, so to set the company_name you would call
|
|
3
6
|
# Payday::Config.default.company_name = "Awesome Corp".
|
|
4
7
|
class Config
|
|
8
|
+
|
|
5
9
|
attr_accessor :invoice_logo, :company_name, :company_details, :date_format, :currency
|
|
6
10
|
|
|
7
11
|
# Sets the page size to use. See the
|
|
@@ -31,5 +35,7 @@ module Payday
|
|
|
31
35
|
def initialize
|
|
32
36
|
reset
|
|
33
37
|
end
|
|
38
|
+
|
|
34
39
|
end
|
|
40
|
+
|
|
35
41
|
end
|
data/lib/payday/invoice.rb
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Payday
|
|
4
|
+
|
|
2
5
|
# Basically just an invoice. Stick a ton of line items in it, add some details, and then render it out!
|
|
3
6
|
class Invoice
|
|
7
|
+
|
|
4
8
|
include Payday::Invoiceable
|
|
5
9
|
|
|
6
10
|
attr_accessor :invoice_number, :bill_to, :ship_to, :notes, :line_items, :shipping_description,
|
|
@@ -48,5 +52,7 @@ module Payday
|
|
|
48
52
|
def add_line_item(options = {})
|
|
49
53
|
line_items << Payday::LineItem.new(options)
|
|
50
54
|
end
|
|
55
|
+
|
|
51
56
|
end
|
|
57
|
+
|
|
52
58
|
end
|
data/lib/payday/invoiceable.rb
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# Include {Payday::Invoiceable} in your Invoice class to make it Payday compatible. Payday
|
|
2
4
|
# expects that a +line_items+ method containing an Enumerable of {Payday::LineItem} compatible
|
|
3
5
|
# elements exists. Those LineItem objects primarily need to include quantity, price, and description methods.
|
|
@@ -15,7 +17,9 @@
|
|
|
15
17
|
# rubocop:enable Layout/LineLength
|
|
16
18
|
# paid dates, and refunded dates, as well as stamps showing if the invoice is paid or due.
|
|
17
19
|
module Payday
|
|
18
|
-
|
|
20
|
+
|
|
21
|
+
module Invoiceable
|
|
22
|
+
|
|
19
23
|
# Who the invoice is being sent to.
|
|
20
24
|
def bill_to
|
|
21
25
|
"Goofy McGoofison\nYour Invoice Doesn't\nHave It's Own BillTo Method"
|
|
@@ -83,5 +87,7 @@ module Payday
|
|
|
83
87
|
block.call(detail[0], detail[1])
|
|
84
88
|
end
|
|
85
89
|
end
|
|
90
|
+
|
|
86
91
|
end
|
|
92
|
+
|
|
87
93
|
end
|
data/lib/payday/line_item.rb
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Payday
|
|
4
|
+
|
|
2
5
|
# Represents a line item in an invoice.
|
|
3
6
|
#
|
|
4
7
|
# rubocop:todo Layout/LineLength
|
|
@@ -7,6 +10,7 @@ module Payday
|
|
|
7
10
|
# them your invoice math could get pretty messed up. It's recommended that both values be set to +BigDecimal+ values.
|
|
8
11
|
# Otherwise, we'll do our best to convert the set values to a +BigDecimal+.
|
|
9
12
|
class LineItem
|
|
13
|
+
|
|
10
14
|
include LineItemable
|
|
11
15
|
|
|
12
16
|
attr_accessor :description, :display_quantity, :display_price
|
|
@@ -42,5 +46,7 @@ module Payday
|
|
|
42
46
|
value = 0 if value.to_s.blank?
|
|
43
47
|
@predefined_amount = BigDecimal(value.to_s)
|
|
44
48
|
end
|
|
49
|
+
|
|
45
50
|
end
|
|
51
|
+
|
|
46
52
|
end
|
data/lib/payday/line_itemable.rb
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
# Include this module into your line item implementation to make sure that Payday stays happy
|
|
2
4
|
# with it, or just make sure that your line item implements the amount method.
|
|
3
5
|
module Payday
|
|
4
|
-
|
|
6
|
+
|
|
7
|
+
module LineItemable
|
|
8
|
+
|
|
5
9
|
# Returns the total amount for this {LineItemable}, or +price * quantity+
|
|
6
10
|
def amount
|
|
7
11
|
return predefined_amount if predefined_amount
|
|
8
12
|
|
|
9
13
|
price * quantity
|
|
10
14
|
end
|
|
15
|
+
|
|
11
16
|
end
|
|
17
|
+
|
|
12
18
|
end
|
data/lib/payday/pdf_renderer.rb
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
module Payday
|
|
4
|
+
|
|
2
5
|
# The PDF renderer. We use this internally in Payday to render pdfs, but really you should just need to call
|
|
3
6
|
# {{Payday::Invoiceable#render_pdf}} to render pdfs yourself.
|
|
4
7
|
class PdfRenderer # rubocop:todo Metrics/ClassLength
|
|
8
|
+
|
|
5
9
|
# Renders the given invoice as a pdf on disk
|
|
6
10
|
def self.render_to_file(invoice, path)
|
|
7
11
|
pdf(invoice).render_file(path)
|
|
@@ -17,8 +21,8 @@ module Payday
|
|
|
17
21
|
|
|
18
22
|
font_dir = File.join(File.dirname(__dir__), '..', 'fonts')
|
|
19
23
|
pdf.font_families.update(
|
|
20
|
-
'NotoSans' => {
|
|
21
|
-
|
|
24
|
+
'NotoSans' => {normal: File.join(font_dir, 'NotoSans-Regular.ttf'),
|
|
25
|
+
bold: File.join(font_dir, 'NotoSans-Bold.ttf')}
|
|
22
26
|
)
|
|
23
27
|
|
|
24
28
|
# set up some default styling
|
|
@@ -75,10 +79,10 @@ module Payday
|
|
|
75
79
|
end
|
|
76
80
|
|
|
77
81
|
if File.extname(image) == '.svg'
|
|
78
|
-
logo_info = pdf.svg(File.read(image), at: pdf.bounds.top_left, width
|
|
82
|
+
logo_info = pdf.svg(File.read(image), at: pdf.bounds.top_left, width: width, height: height)
|
|
79
83
|
logo_height = logo_info[:height]
|
|
80
84
|
else
|
|
81
|
-
logo_info = pdf.image(image, at: pdf.bounds.top_left, width
|
|
85
|
+
logo_info = pdf.image(image, at: pdf.bounds.top_left, width: width, height: height)
|
|
82
86
|
logo_height = logo_info.scaled_height
|
|
83
87
|
end
|
|
84
88
|
|
|
@@ -88,7 +92,7 @@ module Payday
|
|
|
88
92
|
|
|
89
93
|
invoice_or_default(invoice, :company_details).lines.each { |line| table_data << [line] }
|
|
90
94
|
|
|
91
|
-
table = pdf.make_table(table_data, cell_style: {
|
|
95
|
+
table = pdf.make_table(table_data, cell_style: {borders: [], padding: 0})
|
|
92
96
|
pdf.bounding_box([pdf.bounds.width - table.width, pdf.bounds.top], width: table.width,
|
|
93
97
|
height: table.height + 5) do
|
|
94
98
|
table.draw
|
|
@@ -100,7 +104,7 @@ module Payday
|
|
|
100
104
|
|
|
101
105
|
# rubocop:todo Metrics/MethodLength
|
|
102
106
|
def self.bill_to_ship_to(invoice, pdf) # rubocop:todo Metrics/AbcSize, Metrics/MethodLength
|
|
103
|
-
bill_to_cell_style = {
|
|
107
|
+
bill_to_cell_style = {borders: [], padding: [2, 0]}
|
|
104
108
|
bill_to_ship_to_bottom = 0
|
|
105
109
|
|
|
106
110
|
# render bill to
|
|
@@ -136,21 +140,21 @@ module Payday
|
|
|
136
140
|
# invoice number
|
|
137
141
|
if defined?(invoice.invoice_number) && invoice.invoice_number
|
|
138
142
|
table_data << if invoice.paid?
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
[bold_cell(pdf, I18n.t('payday.invoice.receipt_no', default: 'Receipt #:')),
|
|
144
|
+
bold_cell(pdf, invoice.invoice_number.to_s, align: :right)]
|
|
145
|
+
else
|
|
146
|
+
[bold_cell(pdf, I18n.t('payday.invoice.invoice_no', default: 'Invoice #:')),
|
|
147
|
+
bold_cell(pdf, invoice.invoice_number.to_s, align: :right)]
|
|
148
|
+
end
|
|
145
149
|
end
|
|
146
150
|
|
|
147
151
|
# Due on
|
|
148
152
|
if defined?(invoice.due_at) && invoice.due_at
|
|
149
153
|
due_date = if invoice.due_at.is_a?(Date) || invoice.due_at.is_a?(Time)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
+
invoice.due_at.strftime(Payday::Config.default.date_format)
|
|
155
|
+
else
|
|
156
|
+
invoice.due_at.to_s
|
|
157
|
+
end
|
|
154
158
|
|
|
155
159
|
table_data << [bold_cell(pdf, I18n.t('payday.invoice.due_date', default: 'Due Date:')),
|
|
156
160
|
bold_cell(pdf, due_date, align: :right)]
|
|
@@ -159,10 +163,10 @@ module Payday
|
|
|
159
163
|
# Paid on
|
|
160
164
|
if defined?(invoice.paid_at) && invoice.paid_at
|
|
161
165
|
paid_date = if invoice.paid_at.is_a?(Date) || invoice.due_at.is_a?(Time)
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
+
invoice.paid_at.strftime(Payday::Config.default.date_format)
|
|
167
|
+
else
|
|
168
|
+
invoice.paid_at.to_s
|
|
169
|
+
end
|
|
166
170
|
|
|
167
171
|
table_data << [bold_cell(pdf, I18n.t('payday.invoice.paid_date', default: 'Paid Date:')),
|
|
168
172
|
bold_cell(pdf, paid_date, align: :right)]
|
|
@@ -176,7 +180,7 @@ module Payday
|
|
|
176
180
|
|
|
177
181
|
return unless table_data.length.positive?
|
|
178
182
|
|
|
179
|
-
pdf.table(table_data, cell_style: {
|
|
183
|
+
pdf.table(table_data, cell_style: {borders: [], padding: [1, 10, 1, 1]})
|
|
180
184
|
end
|
|
181
185
|
# rubocop:enable Metrics/AbcSize
|
|
182
186
|
# rubocop:enable Metrics/MethodLength
|
|
@@ -193,20 +197,20 @@ module Payday
|
|
|
193
197
|
bold_cell(pdf, I18n.t('payday.line_item.amount', default: 'Amount'), align: :center, borders: [])]
|
|
194
198
|
invoice.line_items.each do |line|
|
|
195
199
|
table_data << if line.predefined_amount
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
[line.description, '', '', number_to_currency(line.predefined_amount, invoice)]
|
|
201
|
+
else
|
|
202
|
+
[line.description,
|
|
203
|
+
(line.display_price || number_to_currency(line.price, invoice)),
|
|
204
|
+
(line.display_quantity || BigDecimal(line.quantity.to_s).to_s('F')),
|
|
205
|
+
number_to_currency(line.amount, invoice)]
|
|
206
|
+
end
|
|
203
207
|
end
|
|
204
208
|
|
|
205
209
|
pdf.move_cursor_to(pdf.cursor - 20)
|
|
206
210
|
pdf.table(table_data, width: pdf.bounds.width, header: true,
|
|
207
|
-
cell_style: {
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
cell_style: {border_width: 0.5, border_left_color: 'FFFFFF', border_right_color: 'FFFFFF',
|
|
212
|
+
border_top_color: 'F6F9FC', border_bottom_color: 'BCC6D0', padding: [5, 10],
|
|
213
|
+
inline_format: true},
|
|
210
214
|
row_colors: %w[F6F9FC ffffff]) do
|
|
211
215
|
# left align the number columns
|
|
212
216
|
columns(1..3).rows(1..row_length - 1).style(align: :right)
|
|
@@ -227,10 +231,10 @@ module Payday
|
|
|
227
231
|
]
|
|
228
232
|
|
|
229
233
|
tax_description = if invoice.tax_description.nil?
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
+
I18n.t('payday.invoice.tax', default: 'Tax:')
|
|
235
|
+
else
|
|
236
|
+
invoice.tax_description
|
|
237
|
+
end
|
|
234
238
|
|
|
235
239
|
table_data << [
|
|
236
240
|
bold_cell(pdf, tax_description),
|
|
@@ -239,10 +243,10 @@ module Payday
|
|
|
239
243
|
|
|
240
244
|
if invoice.shipping_rate.positive?
|
|
241
245
|
shipping_description = if invoice.shipping_description.nil?
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
+
I18n.t('payday.invoice.shipping', default: 'Shipping:')
|
|
247
|
+
else
|
|
248
|
+
invoice.shipping_description
|
|
249
|
+
end
|
|
246
250
|
|
|
247
251
|
table_data << [
|
|
248
252
|
bold_cell(pdf, shipping_description),
|
|
@@ -256,7 +260,7 @@ module Payday
|
|
|
256
260
|
cell(pdf, number_to_currency(invoice.total, invoice),
|
|
257
261
|
size: 12, align: :right)
|
|
258
262
|
]
|
|
259
|
-
table = pdf.make_table(table_data, cell_style: {
|
|
263
|
+
table = pdf.make_table(table_data, cell_style: {borders: []})
|
|
260
264
|
pdf.bounding_box([pdf.bounds.width - table.width, pdf.cursor],
|
|
261
265
|
width: table.width, height: table.height + 2) do
|
|
262
266
|
table.draw
|
|
@@ -318,5 +322,7 @@ module Payday
|
|
|
318
322
|
|
|
319
323
|
max
|
|
320
324
|
end
|
|
325
|
+
|
|
321
326
|
end
|
|
327
|
+
|
|
322
328
|
end
|
data/lib/payday.rb
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
require '
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'zeitwerk'
|
|
4
|
+
loader = Zeitwerk::Loader.for_gem
|
|
5
|
+
loader.ignore("#{__dir__}/generators")
|
|
6
|
+
loader.setup
|
|
7
|
+
|
|
8
|
+
require 'active_support/core_ext/object/blank' # For Object#blank? method
|
|
4
9
|
require 'bigdecimal'
|
|
10
|
+
require 'date'
|
|
11
|
+
require 'money'
|
|
5
12
|
require 'prawn'
|
|
6
13
|
require 'prawn/table'
|
|
7
14
|
require 'prawn-svg'
|
|
8
|
-
require '
|
|
9
|
-
require 'active_support/all'
|
|
15
|
+
require 'time'
|
|
10
16
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
require_relative 'payday/line_itemable'
|
|
15
|
-
require_relative 'payday/line_item'
|
|
16
|
-
require_relative 'payday/pdf_renderer'
|
|
17
|
-
require_relative 'payday/invoiceable'
|
|
18
|
-
require_relative 'payday/invoice'
|
|
17
|
+
# Load translations from the locale folder
|
|
18
|
+
I18n.enforce_available_locales = false
|
|
19
|
+
I18n.load_path.concat(Dir[File.join('lib', 'payday', 'locale', '*.yml')])
|
data/payday.gemspec
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
require 'payday/version'
|
|
1
|
+
# frozen_string_literal: true
|
|
3
2
|
|
|
4
3
|
Gem::Specification.new do |s|
|
|
5
4
|
s.name = 'webtranslateit-payday'
|
|
6
|
-
s.version =
|
|
5
|
+
s.version = '1.6.0'
|
|
7
6
|
s.required_ruby_version = '>= 3.1'
|
|
8
7
|
s.platform = Gem::Platform::RUBY
|
|
9
8
|
s.authors = ['Alan Johnson', 'Edouard Briere']
|
|
@@ -12,25 +11,15 @@ Gem::Specification.new do |s|
|
|
|
12
11
|
s.summary = 'A simple library for rendering invoices.'
|
|
13
12
|
s.description = 'Payday is a library for rendering invoices to pdf.'
|
|
14
13
|
|
|
15
|
-
s.add_dependency 'activesupport'
|
|
16
|
-
s.add_dependency 'i18n', '
|
|
17
|
-
s.add_dependency 'money', '~> 6.16'
|
|
18
|
-
s.add_dependency 'prawn', '
|
|
19
|
-
s.add_dependency 'prawn-svg', '
|
|
20
|
-
s.add_dependency 'prawn-table', '
|
|
21
|
-
s.add_dependency '
|
|
22
|
-
|
|
23
|
-
s.add_development_dependency 'guard'
|
|
24
|
-
s.add_development_dependency 'guard-rspec'
|
|
25
|
-
s.add_development_dependency 'guard-rubocop'
|
|
26
|
-
s.add_development_dependency 'matrix' # for compat reasons, required in builds
|
|
27
|
-
s.add_development_dependency 'rspec', '~> 3.11.0'
|
|
28
|
-
s.add_development_dependency 'rubocop'
|
|
29
|
-
s.add_development_dependency 'rubocop-rspec'
|
|
14
|
+
s.add_dependency 'activesupport', '~> 7', '< 8'
|
|
15
|
+
s.add_dependency 'i18n', '~> 1.12', '< 2'
|
|
16
|
+
s.add_dependency 'money', '~> 6.16', '< 7'
|
|
17
|
+
s.add_dependency 'prawn', '~> 2.4', '< 3'
|
|
18
|
+
s.add_dependency 'prawn-svg', '~> 0.32', '< 1'
|
|
19
|
+
s.add_dependency 'prawn-table', '~> 0.2', '< 1'
|
|
20
|
+
s.add_dependency 'zeitwerk', '~> 2.6', '< 3'
|
|
30
21
|
|
|
31
22
|
s.files = `git ls-files`.split("\n")
|
|
32
|
-
s.executables =
|
|
33
|
-
`git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
|
34
23
|
s.require_paths = ['lib']
|
|
35
24
|
s.metadata['rubygems_mfa_required'] = 'true'
|
|
36
25
|
end
|
data/spec/invoice_spec.rb
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
module Payday # rubocop:todo Metrics/ModuleLength
|
|
6
|
+
|
|
4
7
|
describe Invoice do
|
|
5
8
|
# rubocop:todo RSpec/MultipleExpectations
|
|
6
9
|
it 'is able to be initialized with a hash of options' do # rubocop:todo RSpec/ExampleLength, RSpec/MultipleExpectations
|
|
@@ -125,7 +128,7 @@ module Payday # rubocop:todo Metrics/ModuleLength
|
|
|
125
128
|
it 'is able to iterate through invoice_details as a hash' do # rubocop:todo RSpec/ExampleLength, RSpec/MultipleExpectations
|
|
126
129
|
# rubocop:enable RSpec/MultipleExpectations
|
|
127
130
|
i = described_class.new(invoice_details:
|
|
128
|
-
{
|
|
131
|
+
{'Test' => 'Yes', 'Awesome' => 'Absolutely'})
|
|
129
132
|
details = []
|
|
130
133
|
i.each_detail do |key, value|
|
|
131
134
|
details << [key, value]
|
|
@@ -209,11 +212,11 @@ module Payday # rubocop:todo Metrics/ModuleLength
|
|
|
209
212
|
|
|
210
213
|
context 'paid, with an svg logo' do # rubocop:todo RSpec/ContextWording
|
|
211
214
|
before do
|
|
212
|
-
logo = {
|
|
215
|
+
logo = {filename: 'spec/assets/tiger.svg', size: '100x100'}
|
|
213
216
|
Payday::Config.default.invoice_logo = logo
|
|
214
217
|
end
|
|
215
218
|
|
|
216
|
-
let(:invoice_params) { {
|
|
219
|
+
let(:invoice_params) { {paid_at: Date.civil(2012, 2, 22)} }
|
|
217
220
|
|
|
218
221
|
it 'renders an invoice correctly' do # rubocop:todo RSpec/ExampleLength
|
|
219
222
|
invoice.line_items += [
|
|
@@ -241,4 +244,5 @@ module Payday # rubocop:todo Metrics/ModuleLength
|
|
|
241
244
|
end
|
|
242
245
|
end
|
|
243
246
|
end
|
|
247
|
+
|
|
244
248
|
end
|
data/spec/line_item_spec.rb
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require 'spec_helper'
|
|
2
4
|
|
|
3
5
|
module Payday
|
|
6
|
+
|
|
4
7
|
describe LineItem do
|
|
5
8
|
it 'is able to be initialized with a price' do
|
|
6
9
|
li = described_class.new(price: BigDecimal('20'))
|
|
@@ -27,4 +30,5 @@ module Payday
|
|
|
27
30
|
expect(li.amount).to eq(BigDecimal('244'))
|
|
28
31
|
end
|
|
29
32
|
end
|
|
33
|
+
|
|
30
34
|
end
|
data/spec/pdf_renderer_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: webtranslateit-payday
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alan Johnson
|
|
@@ -9,36 +9,48 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2022-
|
|
12
|
+
date: 2022-08-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
requirements:
|
|
18
|
-
- - "
|
|
18
|
+
- - "~>"
|
|
19
|
+
- !ruby/object:Gem::Version
|
|
20
|
+
version: '7'
|
|
21
|
+
- - "<"
|
|
19
22
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: '
|
|
23
|
+
version: '8'
|
|
21
24
|
type: :runtime
|
|
22
25
|
prerelease: false
|
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
27
|
requirements:
|
|
25
|
-
- - "
|
|
28
|
+
- - "~>"
|
|
26
29
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: '
|
|
30
|
+
version: '7'
|
|
31
|
+
- - "<"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '8'
|
|
28
34
|
- !ruby/object:Gem::Dependency
|
|
29
35
|
name: i18n
|
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|
|
31
37
|
requirements:
|
|
32
|
-
- - "
|
|
38
|
+
- - "~>"
|
|
33
39
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '
|
|
40
|
+
version: '1.12'
|
|
41
|
+
- - "<"
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '2'
|
|
35
44
|
type: :runtime
|
|
36
45
|
prerelease: false
|
|
37
46
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
47
|
requirements:
|
|
39
|
-
- - "
|
|
48
|
+
- - "~>"
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '1.12'
|
|
51
|
+
- - "<"
|
|
40
52
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '
|
|
53
|
+
version: '2'
|
|
42
54
|
- !ruby/object:Gem::Dependency
|
|
43
55
|
name: money
|
|
44
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -46,6 +58,9 @@ dependencies:
|
|
|
46
58
|
- - "~>"
|
|
47
59
|
- !ruby/object:Gem::Version
|
|
48
60
|
version: '6.16'
|
|
61
|
+
- - "<"
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '7'
|
|
49
64
|
type: :runtime
|
|
50
65
|
prerelease: false
|
|
51
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -53,160 +68,89 @@ dependencies:
|
|
|
53
68
|
- - "~>"
|
|
54
69
|
- !ruby/object:Gem::Version
|
|
55
70
|
version: '6.16'
|
|
71
|
+
- - "<"
|
|
72
|
+
- !ruby/object:Gem::Version
|
|
73
|
+
version: '7'
|
|
56
74
|
- !ruby/object:Gem::Dependency
|
|
57
75
|
name: prawn
|
|
58
76
|
requirement: !ruby/object:Gem::Requirement
|
|
59
77
|
requirements:
|
|
60
|
-
- - "
|
|
61
|
-
- !ruby/object:Gem::Version
|
|
62
|
-
version: '2.0'
|
|
63
|
-
type: :runtime
|
|
64
|
-
prerelease: false
|
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
66
|
-
requirements:
|
|
67
|
-
- - ">="
|
|
78
|
+
- - "~>"
|
|
68
79
|
- !ruby/object:Gem::Version
|
|
69
|
-
version: '2.
|
|
70
|
-
-
|
|
71
|
-
name: prawn-svg
|
|
72
|
-
requirement: !ruby/object:Gem::Requirement
|
|
73
|
-
requirements:
|
|
74
|
-
- - ">="
|
|
80
|
+
version: '2.4'
|
|
81
|
+
- - "<"
|
|
75
82
|
- !ruby/object:Gem::Version
|
|
76
|
-
version:
|
|
83
|
+
version: '3'
|
|
77
84
|
type: :runtime
|
|
78
85
|
prerelease: false
|
|
79
86
|
version_requirements: !ruby/object:Gem::Requirement
|
|
80
87
|
requirements:
|
|
81
|
-
- - "
|
|
88
|
+
- - "~>"
|
|
82
89
|
- !ruby/object:Gem::Version
|
|
83
|
-
version:
|
|
84
|
-
-
|
|
85
|
-
name: prawn-table
|
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
|
87
|
-
requirements:
|
|
88
|
-
- - ">="
|
|
90
|
+
version: '2.4'
|
|
91
|
+
- - "<"
|
|
89
92
|
- !ruby/object:Gem::Version
|
|
90
|
-
version:
|
|
91
|
-
type: :runtime
|
|
92
|
-
prerelease: false
|
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
-
requirements:
|
|
95
|
-
- - ">="
|
|
96
|
-
- !ruby/object:Gem::Version
|
|
97
|
-
version: 0.2.2
|
|
93
|
+
version: '3'
|
|
98
94
|
- !ruby/object:Gem::Dependency
|
|
99
|
-
name:
|
|
95
|
+
name: prawn-svg
|
|
100
96
|
requirement: !ruby/object:Gem::Requirement
|
|
101
97
|
requirements:
|
|
102
|
-
- - "
|
|
98
|
+
- - "~>"
|
|
103
99
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: '0'
|
|
100
|
+
version: '0.32'
|
|
101
|
+
- - "<"
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '1'
|
|
105
104
|
type: :runtime
|
|
106
105
|
prerelease: false
|
|
107
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
108
107
|
requirements:
|
|
109
|
-
- - "
|
|
110
|
-
- !ruby/object:Gem::Version
|
|
111
|
-
version: '0'
|
|
112
|
-
- !ruby/object:Gem::Dependency
|
|
113
|
-
name: guard
|
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
|
115
|
-
requirements:
|
|
116
|
-
- - ">="
|
|
108
|
+
- - "~>"
|
|
117
109
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: '0'
|
|
119
|
-
|
|
120
|
-
prerelease: false
|
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
122
|
-
requirements:
|
|
123
|
-
- - ">="
|
|
110
|
+
version: '0.32'
|
|
111
|
+
- - "<"
|
|
124
112
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: '
|
|
113
|
+
version: '1'
|
|
126
114
|
- !ruby/object:Gem::Dependency
|
|
127
|
-
name:
|
|
115
|
+
name: prawn-table
|
|
128
116
|
requirement: !ruby/object:Gem::Requirement
|
|
129
117
|
requirements:
|
|
130
|
-
- - "
|
|
118
|
+
- - "~>"
|
|
131
119
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: '0'
|
|
133
|
-
|
|
134
|
-
prerelease: false
|
|
135
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
136
|
-
requirements:
|
|
137
|
-
- - ">="
|
|
120
|
+
version: '0.2'
|
|
121
|
+
- - "<"
|
|
138
122
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: '
|
|
140
|
-
|
|
141
|
-
name: guard-rubocop
|
|
142
|
-
requirement: !ruby/object:Gem::Requirement
|
|
143
|
-
requirements:
|
|
144
|
-
- - ">="
|
|
145
|
-
- !ruby/object:Gem::Version
|
|
146
|
-
version: '0'
|
|
147
|
-
type: :development
|
|
123
|
+
version: '1'
|
|
124
|
+
type: :runtime
|
|
148
125
|
prerelease: false
|
|
149
126
|
version_requirements: !ruby/object:Gem::Requirement
|
|
150
127
|
requirements:
|
|
151
|
-
- - "
|
|
152
|
-
- !ruby/object:Gem::Version
|
|
153
|
-
version: '0'
|
|
154
|
-
- !ruby/object:Gem::Dependency
|
|
155
|
-
name: matrix
|
|
156
|
-
requirement: !ruby/object:Gem::Requirement
|
|
157
|
-
requirements:
|
|
158
|
-
- - ">="
|
|
128
|
+
- - "~>"
|
|
159
129
|
- !ruby/object:Gem::Version
|
|
160
|
-
version: '0'
|
|
161
|
-
|
|
162
|
-
prerelease: false
|
|
163
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
164
|
-
requirements:
|
|
165
|
-
- - ">="
|
|
130
|
+
version: '0.2'
|
|
131
|
+
- - "<"
|
|
166
132
|
- !ruby/object:Gem::Version
|
|
167
|
-
version: '
|
|
133
|
+
version: '1'
|
|
168
134
|
- !ruby/object:Gem::Dependency
|
|
169
|
-
name:
|
|
135
|
+
name: zeitwerk
|
|
170
136
|
requirement: !ruby/object:Gem::Requirement
|
|
171
137
|
requirements:
|
|
172
138
|
- - "~>"
|
|
173
139
|
- !ruby/object:Gem::Version
|
|
174
|
-
version:
|
|
175
|
-
|
|
176
|
-
prerelease: false
|
|
177
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
178
|
-
requirements:
|
|
179
|
-
- - "~>"
|
|
180
|
-
- !ruby/object:Gem::Version
|
|
181
|
-
version: 3.11.0
|
|
182
|
-
- !ruby/object:Gem::Dependency
|
|
183
|
-
name: rubocop
|
|
184
|
-
requirement: !ruby/object:Gem::Requirement
|
|
185
|
-
requirements:
|
|
186
|
-
- - ">="
|
|
140
|
+
version: '2.6'
|
|
141
|
+
- - "<"
|
|
187
142
|
- !ruby/object:Gem::Version
|
|
188
|
-
version: '
|
|
189
|
-
type: :
|
|
143
|
+
version: '3'
|
|
144
|
+
type: :runtime
|
|
190
145
|
prerelease: false
|
|
191
146
|
version_requirements: !ruby/object:Gem::Requirement
|
|
192
147
|
requirements:
|
|
193
|
-
- - "
|
|
194
|
-
- !ruby/object:Gem::Version
|
|
195
|
-
version: '0'
|
|
196
|
-
- !ruby/object:Gem::Dependency
|
|
197
|
-
name: rubocop-rspec
|
|
198
|
-
requirement: !ruby/object:Gem::Requirement
|
|
199
|
-
requirements:
|
|
200
|
-
- - ">="
|
|
148
|
+
- - "~>"
|
|
201
149
|
- !ruby/object:Gem::Version
|
|
202
|
-
version: '
|
|
203
|
-
|
|
204
|
-
prerelease: false
|
|
205
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
206
|
-
requirements:
|
|
207
|
-
- - ">="
|
|
150
|
+
version: '2.6'
|
|
151
|
+
- - "<"
|
|
208
152
|
- !ruby/object:Gem::Version
|
|
209
|
-
version: '
|
|
153
|
+
version: '3'
|
|
210
154
|
description: Payday is a library for rendering invoices to pdf.
|
|
211
155
|
email:
|
|
212
156
|
- edouard@webtranslateit.com
|
|
@@ -216,12 +160,15 @@ extra_rdoc_files: []
|
|
|
216
160
|
files:
|
|
217
161
|
- ".gitattributes"
|
|
218
162
|
- ".github/dependabot.yml"
|
|
163
|
+
- ".github/release-drafter.yml"
|
|
219
164
|
- ".github/workflows/ci.yml"
|
|
165
|
+
- ".github/workflows/release-drafter.yml"
|
|
220
166
|
- ".gitignore"
|
|
221
167
|
- ".rubocop.yml"
|
|
222
168
|
- ".rubocop_todo.yml"
|
|
223
169
|
- CHANGELOG.md
|
|
224
170
|
- Gemfile
|
|
171
|
+
- Gemfile.lock
|
|
225
172
|
- Guardfile
|
|
226
173
|
- README.md
|
|
227
174
|
- Rakefile
|
|
@@ -234,7 +181,6 @@ files:
|
|
|
234
181
|
- lib/generators/payday/setup/templates/migration.rb
|
|
235
182
|
- lib/payday.rb
|
|
236
183
|
- lib/payday/config.rb
|
|
237
|
-
- lib/payday/i18n.rb
|
|
238
184
|
- lib/payday/invoice.rb
|
|
239
185
|
- lib/payday/invoiceable.rb
|
|
240
186
|
- lib/payday/line_item.rb
|
|
@@ -246,7 +192,6 @@ files:
|
|
|
246
192
|
- lib/payday/locale/nl.yml
|
|
247
193
|
- lib/payday/locale/zh-CN.yml
|
|
248
194
|
- lib/payday/pdf_renderer.rb
|
|
249
|
-
- lib/payday/version.rb
|
|
250
195
|
- payday.gemspec
|
|
251
196
|
- spec/assets/default_logo.png
|
|
252
197
|
- spec/assets/svg.pdf
|
data/lib/payday/i18n.rb
DELETED