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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b871576cd6bbd5c6047d8b19d06f6e866619ffad6f9a87d8b87d4e5c232d62fb
4
- data.tar.gz: 4f46751e69cbf6c16acb4d47b35da624a813bbe51e25973c8b261fb0ac5c09d8
3
+ metadata.gz: 842bfa9c7b5cf094139d3a5076498d4c947c5701ba7e28a0e227bbb459d084c6
4
+ data.tar.gz: 1bac34a2bd9e729397f3492e56e9649101efdcf126fe687482980210cdce715c
5
5
  SHA512:
6
- metadata.gz: 8269db93891aec3995c0036a525818a65838c8a7ff3247b6f45e95e5669b4f197e763e21cb2f3bf1e3393511be3eee1175679150393f0495b72e2977440f863f
7
- data.tar.gz: adc4cb0553f11f927d8df25e39e3827935d0bb4ed5f1828e99180784f9f99101ce893ac361005b6a7313e862288703240a3b06283071b15a97ef108b7525fb39
6
+ metadata.gz: 0d3ccddb211b49394f2402125264fdbf914558320d4359ca898729eae6b2cebd67c6fd7f7bd41592e54979361443238a773710ccb76d7bbfd58beddf310eb0cb
7
+ data.tar.gz: c128c0239f0566faecd6bd63a95b300839824766cf31e8928bf2823c932ada8b0ac4f3e001adcee118be46699beac44dbb1683a7471da11a682314d3efd22528
@@ -18,7 +18,7 @@ jobs:
18
18
  runs-on: ubuntu-latest
19
19
  strategy:
20
20
  matrix:
21
- ruby-version: ['3.0', '3.1']
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.0.4 # Use .ruby-version file instead of duplicating here and in Gemfile?
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.0
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
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.4.0 (2022-06-29)
4
+
5
+ * Target ruby 3.1.
6
+
3
7
  ## 1.3.0 (2022-06-14)
4
8
 
5
9
  * Target ruby 3.0.
@@ -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: width, height: height)
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: width, height: height)
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
 
@@ -1,5 +1,5 @@
1
1
  # This is Payday!
2
2
  module Payday
3
3
  # Current Version
4
- VERSION = '1.3.0'.freeze
4
+ VERSION = '1.4.0'.freeze
5
5
  end
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.0'
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
- Dir.mkdir('tmp') unless File.exist?('tmp')
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
- File.unlink('tmp/testing.pdf') if File.exist?('tmp/testing.pdf')
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.3.0
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-14 00:00:00.000000000 Z
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.0'
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.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.