webtranslateit-payday 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +2 -2
- data/.rubocop.yml +9 -3
- data/CHANGELOG.md +4 -0
- data/lib/payday/pdf_renderer.rb +2 -2
- data/lib/payday/version.rb +1 -1
- data/payday.gemspec +1 -1
- data/spec/invoice_spec.rb +2 -2
- data/spec/support/asset_matchers.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 842bfa9c7b5cf094139d3a5076498d4c947c5701ba7e28a0e227bbb459d084c6
|
4
|
+
data.tar.gz: 1bac34a2bd9e729397f3492e56e9649101efdcf126fe687482980210cdce715c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d3ccddb211b49394f2402125264fdbf914558320d4359ca898729eae6b2cebd67c6fd7f7bd41592e54979361443238a773710ccb76d7bbfd58beddf310eb0cb
|
7
|
+
data.tar.gz: c128c0239f0566faecd6bd63a95b300839824766cf31e8928bf2823c932ada8b0ac4f3e001adcee118be46699beac44dbb1683a7471da11a682314d3efd22528
|
data/.github/workflows/ci.yml
CHANGED
@@ -18,7 +18,7 @@ jobs:
|
|
18
18
|
runs-on: ubuntu-latest
|
19
19
|
strategy:
|
20
20
|
matrix:
|
21
|
-
ruby-version: ['3.
|
21
|
+
ruby-version: ['3.1']
|
22
22
|
|
23
23
|
steps:
|
24
24
|
- uses: actions/checkout@v2
|
@@ -44,7 +44,7 @@ jobs:
|
|
44
44
|
- name: Install ruby and gems
|
45
45
|
uses: ruby/setup-ruby@v1
|
46
46
|
with:
|
47
|
-
ruby-version: 3.
|
47
|
+
ruby-version: 3.1.2 # Use .ruby-version file instead of duplicating here and in Gemfile?
|
48
48
|
bundler-cache: true
|
49
49
|
|
50
50
|
- name: Run ruby linter
|
data/.rubocop.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
3
|
AllCops:
|
4
|
-
TargetRubyVersion: 3.
|
4
|
+
TargetRubyVersion: 3.1
|
5
5
|
Exclude:
|
6
6
|
- lib/generators/**/*
|
7
7
|
|
@@ -11,8 +11,6 @@ inherit_mode:
|
|
11
11
|
|
12
12
|
require: rubocop-rspec
|
13
13
|
|
14
|
-
Gemspec/DateAssignment: # new in 1.10
|
15
|
-
Enabled: true
|
16
14
|
Gemspec/DeprecatedAttributeAssignment: # new in 1.30
|
17
15
|
Enabled: true
|
18
16
|
Gemspec/RequireMFA: # new in 1.23
|
@@ -149,3 +147,11 @@ RSpec/FactoryBot/SyntaxMethods: # new in 2.7
|
|
149
147
|
Enabled: true
|
150
148
|
RSpec/Rails/AvoidSetupHook: # new in 2.4
|
151
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
|
data/CHANGELOG.md
CHANGED
data/lib/payday/pdf_renderer.rb
CHANGED
@@ -75,10 +75,10 @@ module Payday
|
|
75
75
|
end
|
76
76
|
|
77
77
|
if File.extname(image) == '.svg'
|
78
|
-
logo_info = pdf.svg(File.read(image), at: pdf.bounds.top_left, width
|
78
|
+
logo_info = pdf.svg(File.read(image), at: pdf.bounds.top_left, width:, height:)
|
79
79
|
logo_height = logo_info[:height]
|
80
80
|
else
|
81
|
-
logo_info = pdf.image(image, at: pdf.bounds.top_left, width
|
81
|
+
logo_info = pdf.image(image, at: pdf.bounds.top_left, width:, height:)
|
82
82
|
logo_height = logo_info.scaled_height
|
83
83
|
end
|
84
84
|
|
data/lib/payday/version.rb
CHANGED
data/payday.gemspec
CHANGED
@@ -4,7 +4,7 @@ require 'payday/version'
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = 'webtranslateit-payday'
|
6
6
|
s.version = Payday::VERSION
|
7
|
-
s.required_ruby_version = '>= 3.
|
7
|
+
s.required_ruby_version = '>= 3.1'
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ['Alan Johnson', 'Edouard Briere']
|
10
10
|
s.email = ['edouard@webtranslateit.com']
|
data/spec/invoice_spec.rb
CHANGED
@@ -138,7 +138,7 @@ module Payday # rubocop:todo Metrics/ModuleLength
|
|
138
138
|
|
139
139
|
describe 'rendering' do
|
140
140
|
before do
|
141
|
-
|
141
|
+
FileUtils.mkdir_p('tmp')
|
142
142
|
Config.default.reset
|
143
143
|
end
|
144
144
|
|
@@ -146,7 +146,7 @@ module Payday # rubocop:todo Metrics/ModuleLength
|
|
146
146
|
let(:invoice_params) { {} }
|
147
147
|
|
148
148
|
it 'renders to a file' do
|
149
|
-
|
149
|
+
FileUtils.rm_rf('tmp/testing.pdf')
|
150
150
|
|
151
151
|
invoice.render_pdf_to_file('tmp/testing.pdf')
|
152
152
|
|
@@ -20,7 +20,7 @@ RSpec::Matchers.define(:match_binary_asset) do |file_name|
|
|
20
20
|
expected_output_path = File.join('spec/assets', file_name)
|
21
21
|
actual_output_path = File.join('tmp/rendered_output', file_name)
|
22
22
|
|
23
|
-
"expected output to match '#{expected_output_path}' "\
|
23
|
+
"expected output to match '#{expected_output_path}' " \
|
24
24
|
"(see #{actual_output_path})"
|
25
25
|
end
|
26
26
|
end
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alan Johnson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-06-
|
12
|
+
date: 2022-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -270,14 +270,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
270
270
|
requirements:
|
271
271
|
- - ">="
|
272
272
|
- !ruby/object:Gem::Version
|
273
|
-
version: '3.
|
273
|
+
version: '3.1'
|
274
274
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
275
275
|
requirements:
|
276
276
|
- - ">="
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: '0'
|
279
279
|
requirements: []
|
280
|
-
rubygems_version: 3.3.
|
280
|
+
rubygems_version: 3.3.7
|
281
281
|
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: A simple library for rendering invoices.
|