From 5735da28ee4e8c48a77a1a933ca899d44cacccca Mon Sep 17 00:00:00 2001 From: Jakob Vad Nielsen Date: Tue, 1 Mar 2022 23:37:55 +0100 Subject: [PATCH] Merged #39 and fixed deps --- .gitignore | 1 + .rubocop.yml | 3 - Gemfile.lock | 111 ++++++++++++++++++++--------------- HISTORY.md | 4 ++ lib/premonition/processor.rb | 4 +- lib/premonition/version.rb | 2 +- premonition.gemspec | 9 +-- test/test_helper.rb | 8 --- 8 files changed, 76 insertions(+), 66 deletions(-) diff --git a/.gitignore b/.gitignore index a143f62..4b4f2de 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ build-iPhoneSimulator/ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc +./vendor \ No newline at end of file diff --git a/.rubocop.yml b/.rubocop.yml index 8363541..37483e7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -19,9 +19,6 @@ Metrics/ClassLength: Metrics/PerceivedComplexity: Enabled: false -Naming/MethodParameterName: - MinNameLength: 1 - Style/Documentation: Enabled: false diff --git a/Gemfile.lock b/Gemfile.lock index 6d4477b..d91341c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,109 +1,124 @@ PATH remote: . specs: - premonition (4.0.1) + premonition (4.0.2) jekyll (>= 3.7, < 5.0) GEM remote: https://rubygems.org/ specs: - addressable (2.7.0) + activesupport (6.1.4.6) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) - ansi (1.5.0) - ast (2.4.0) + ast (2.4.2) colorator (1.1.0) - concurrent-ruby (1.1.7) - em-websocket (0.5.2) + concurrent-ruby (1.1.9) + em-websocket (0.5.3) eventmachine (>= 0.12.9) - http_parser.rb (~> 0.6.0) + http_parser.rb (~> 0) eventmachine (1.2.7) - ffi (1.13.1) + ffi (1.15.5) forwardable-extended (2.6.0) - http_parser.rb (0.6.0) - i18n (1.8.5) + http_parser.rb (0.8.0) + i18n (1.10.0) concurrent-ruby (~> 1.0) - jaro_winkler (1.5.4) - jekyll (4.1.1) + jekyll (4.2.1) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) i18n (~> 1.0) jekyll-sass-converter (~> 2.0) jekyll-watch (~> 2.0) - kramdown (~> 2.1) + kramdown (~> 2.3) kramdown-parser-gfm (~> 1.0) liquid (~> 4.0) mercenary (~> 0.4.0) pathutil (~> 0.9) rouge (~> 3.0) safe_yaml (~> 1.0) - terminal-table (~> 1.8) - jekyll-sass-converter (2.1.0) + terminal-table (~> 2.0) + jekyll-sass-converter (2.2.0) sassc (> 2.0.1, < 3.0) jekyll-watch (2.2.1) listen (~> 3.0) - kramdown (2.3.0) + kramdown (2.3.1) rexml kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.3) - listen (3.2.1) + listen (3.7.1) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.4.0) - minitest (4.7.5) + minitest (5.15.0) mocha (1.11.2) - parallel (1.19.1) - parser (2.7.0.5) - ast (~> 2.4.0) + parallel (1.21.0) + parser (3.1.1.0) + ast (~> 2.4.1) pathutil (0.16.2) forwardable-extended (~> 2.6) - power_assert (1.1.7) + power_assert (2.0.1) public_suffix (4.0.6) - rainbow (3.0.0) - rake (13.0.1) - rb-fsevent (0.10.4) + rack (2.2.3) + rainbow (3.1.1) + rake (13.0.6) + rb-fsevent (0.11.1) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.4) - rouge (3.23.0) - rubocop (0.71.0) - jaro_winkler (~> 1.5.1) + regexp_parser (2.2.1) + rexml (3.2.5) + rouge (3.28.0) + rubocop (1.18.4) parallel (~> 1.10) - parser (>= 2.6) + parser (>= 3.0.0.0) rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml + rubocop-ast (>= 1.8.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 1.7) - rubocop-jekyll (0.10.0) - rubocop (>= 0.68.0, < 0.72.0) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.16.0) + parser (>= 3.1.1.0) + rubocop-jekyll (0.12.0) + rubocop (~> 1.18.0) rubocop-performance (~> 1.2) - rubocop-performance (1.5.2) - rubocop (>= 0.71.0) - ruby-progressbar (1.10.1) + rubocop-performance (1.13.2) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + rubocop-rails (2.13.2) + activesupport (>= 4.2.0) + rack (>= 1.1) + rubocop (>= 1.7.0, < 2.0) + ruby-progressbar (1.11.0) safe_yaml (1.0.5) sassc (2.4.0) ffi (~> 1.9) - terminal-table (1.8.0) + terminal-table (2.0.0) unicode-display_width (~> 1.1, >= 1.1.1) - test-unit (3.3.5) + test-unit (3.3.9) power_assert - turn (0.9.7) - ansi - minitest (~> 4) - unicode-display_width (1.6.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + unicode-display_width (1.8.0) + zeitwerk (2.5.4) PLATFORMS - ruby + universal-darwin-21 DEPENDENCIES - bundler (~> 2.1.4) + bundler (> 2.1.4, <= 2.3.8) mocha (~> 1.11.2) premonition! rake (~> 13.0.1) - rubocop (>= 0.68.0, < 0.72.0) - rubocop-jekyll (~> 0.10.0) + rubocop (>= 0.68.0, <= 1.25.1) + rubocop-jekyll (~> 0.12.0) + rubocop-rails (~> 2.13.2) test-unit (~> 3.3.5) - turn (~> 0.9.7) BUNDLED WITH - 2.1.4 + 2.3.8 diff --git a/HISTORY.md b/HISTORY.md index a297ebf..41d32ba 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,3 +1,7 @@ +## 4.0.2 + +- Added collection support: https://github.com/lazee/premonition/pull/39 [Feature] +- Upgraded packages and removed turn in order to work for newer package versions. ## 4.0.1 diff --git a/lib/premonition/processor.rb b/lib/premonition/processor.rb index 8600167..01c881f 100644 --- a/lib/premonition/processor.rb +++ b/lib/premonition/processor.rb @@ -57,13 +57,13 @@ def load_references(content) content.each_line do |l| # refs << l if l.strip!.match(/^\[.*\]:.*\".*\"$/i) - refs << l if l.strip.length>0 && l.strip.match(/^\[.*\]:.*\".*\"$/i) + refs << l if l.strip.length.positive? && l.strip.match(/^\[.*\]:.*\".*\"$/i) end refs end def code_block_line?(line) - line.strip.start_with?('~~~') + line.strip.start_with?('~~~') || line.strip.start_with?('```') end def blockquote?(line) diff --git a/lib/premonition/version.rb b/lib/premonition/version.rb index 38d15b8..c37ed4a 100644 --- a/lib/premonition/version.rb +++ b/lib/premonition/version.rb @@ -3,6 +3,6 @@ module Jekyll module Premonition # Make sure to change this manually before a release. - VERSION = '4.0.1' + VERSION = '4.0.2' end end diff --git a/premonition.gemspec b/premonition.gemspec index 11e7cf7..b0ffa4a 100644 --- a/premonition.gemspec +++ b/premonition.gemspec @@ -14,12 +14,13 @@ Gem::Specification.new do |s| s.extra_rdoc_files = ['README.md'] s.add_dependency 'jekyll', '>= 3.7', '< 5.0' - s.add_development_dependency 'bundler', '~> 2.1.4' + s.add_development_dependency 'bundler', '> 2.1.4', '<= 2.3.8' s.add_development_dependency 'mocha', '~> 1.11.2' s.add_development_dependency 'rake', '~> 13.0.1' - s.add_development_dependency 'rubocop', '>= 0.68.0', '< 0.72.0' - s.add_development_dependency 'rubocop-jekyll', '~> 0.10.0' + s.add_development_dependency 'rubocop', '>= 0.68.0', '<= 1.25.1' + s.add_development_dependency 'rubocop-jekyll', '~> 0.12.0' + s.add_development_dependency 'rubocop-rails', '~> 2.13.2' s.add_development_dependency 'test-unit', '~> 3.3.5' - s.add_development_dependency 'turn', '~> 0.9.7' + #s.add_development_dependency 'turn', '~> 0.9.7' end diff --git a/test/test_helper.rb b/test/test_helper.rb index 79b6ca8..a4e14e9 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -4,14 +4,6 @@ require 'mocha/test_unit' require 'premonition' -begin - require 'turn' -rescue LoadError - puts '**********************************************' - puts 'Install the Turn gem for prettier test output.' - puts '> gem install turn' - puts '**********************************************' -end class Test::Unit::TestCase end