diff --git a/.github/workflows/specs.yml b/.github/workflows/specs.yml index 470a629..a8be957 100644 --- a/.github/workflows/specs.yml +++ b/.github/workflows/specs.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - ruby: ['2.6', '2.7', '3.0'] + ruby: ['2.5', '2.6', '2.7', '3.0'] steps: - name: Checkout repository diff --git a/.rubocop.yml b/.rubocop.yml index 2edf5b3..64b4698 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -34,3 +34,12 @@ RSpec/ExampleLength: RSpec/MultipleMemoizedHelpers: # default: 5 Max: 6 + +RSpec/SubjectStub: + Exclude: + - spec/units/prawn_html/attributes_spec.rb + +Style/OpenStructUse: + Exclude: + - lib/prawn_html/attributes.rb + - spec/units/prawn_html/attributes_spec.rb diff --git a/prawn-html.gemspec b/prawn-html.gemspec index 690653e..954d174 100644 --- a/prawn-html.gemspec +++ b/prawn-html.gemspec @@ -9,12 +9,17 @@ Gem::Specification.new do |spec| spec.version = PrawnHtml::VERSION spec.summary = 'Prawn PDF - HTML renderer' spec.description = 'HTML to PDF with Prawn PDF' + spec.required_ruby_version = '>= 2.5.0' - spec.license = 'MIT' - spec.authors = ['Mattia Roccoberton'] - spec.email = 'mat@blocknot.es' - spec.homepage = 'https://github.com/blocknotes/prawn-html' + spec.license = 'MIT' + spec.authors = ['Mattia Roccoberton'] + spec.email = 'mat@blocknot.es' + spec.homepage = 'https://github.com/blocknotes/prawn-html' + + spec.metadata['homepage_uri'] = spec.homepage + spec.metadata['source_code_uri'] = spec.homepage + spec.metadata['rubygems_mfa_required'] = 'true' spec.files = Dir['lib/**/*', 'LICENSE.txt', 'README.md'] spec.require_paths = ['lib'] diff --git a/spec/units/prawn_html/utils_spec.rb b/spec/units/prawn_html/utils_spec.rb index 485ce09..b925d83 100644 --- a/spec/units/prawn_html/utils_spec.rb +++ b/spec/units/prawn_html/utils_spec.rb @@ -127,13 +127,13 @@ context 'with a nil value' do let(:value) { nil } - it { is_expected.to eq nil } + it { is_expected.to be_nil } end context 'with a blank string value' do let(:value) { '' } - it { is_expected.to eq nil } + it { is_expected.to be_nil } end context 'with a string value (ex. "some_string")' do @@ -161,7 +161,7 @@ context 'with an invalid value (ex. "some_string")' do let(:value) { 'some_string' } - it { is_expected.to eq nil } + it { is_expected.to be_nil } end context 'with a valid value (ex. " bOlD ")' do