From 8d872b15b6e9aacea340ddc99ab4bb4ebb4a2143 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Tue, 24 Jan 2023 12:44:20 -0500 Subject: [PATCH 01/12] bumping a whole lot of deps --- squib.gemspec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/squib.gemspec b/squib.gemspec index 6cf9d6f4..0937cad1 100644 --- a/squib.gemspec +++ b/squib.gemspec @@ -31,18 +31,18 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(/^(spec|samples|docs|benchmarks)\//) spec.require_paths = ['lib'] - spec.add_runtime_dependency 'cairo', '~> 1.17' - spec.add_runtime_dependency 'classy_hash', '1.0.0' - spec.add_runtime_dependency 'gio2', '~> 3.4' - spec.add_runtime_dependency 'gobject-introspection', '~> 3.4' - spec.add_runtime_dependency 'highline', '2.0.3' - spec.add_runtime_dependency 'mercenary', '0.4.0' - spec.add_runtime_dependency 'nokogiri', '~> 1.11' - spec.add_runtime_dependency 'pango', '~> 3.4' - spec.add_runtime_dependency 'rainbow', '~> 3.0' - spec.add_runtime_dependency 'roo', '~> 2.8' - spec.add_runtime_dependency 'rsvg2', '~> 3.4' - spec.add_runtime_dependency 'ruby-progressbar', '~> 1.11' + spec.add_runtime_dependency 'cairo', '~> 1.17' # https://rubygems.org/gems/cairo/ + spec.add_runtime_dependency 'classy_hash', '1.0.0' # https://rubygems.org/gems/classy_hash + spec.add_runtime_dependency 'gio2', '~> 4.0' # https://rubygems.org/gems/gio2 + spec.add_runtime_dependency 'gobject-introspection', '~> 4.0' # https://rubygems.org/gems/gobject-introspection + spec.add_runtime_dependency 'highline', '2.1.0' # https://rubygems.org/gems/highline + spec.add_runtime_dependency 'mercenary', '0.4.0' # https://rubygems.org/gems/mercenary + spec.add_runtime_dependency 'nokogiri', '~> 1.14' # https://rubygems.org/gems/nokogiri + spec.add_runtime_dependency 'pango', '~> 4.0' # https://rubygems.org/gems/pango + spec.add_runtime_dependency 'rainbow', '~> 3.1' # https://rubygems.org/gems/rainbow + spec.add_runtime_dependency 'roo', '~> 2.9' # https://rubygems.org/gems/roo + spec.add_runtime_dependency 'rsvg2', '~> 4.0' # https://rubygems.org/gems/rsvg2 + spec.add_runtime_dependency 'ruby-progressbar', '~> 1.11' # https://rubygems.org/gems/ruby-progressbar spec.add_development_dependency 'activesupport' spec.add_development_dependency 'bundler' From 433162527235b7951e2450e2f2bac9ef00fd10d0 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Tue, 24 Jan 2023 12:47:16 -0500 Subject: [PATCH 02/12] fix File and Dir exists? vs. exist? --- lib/squib/args/dir_validator.rb | 2 +- lib/squib/args/import.rb | 6 +++--- lib/squib/args/input_file.rb | 6 +++--- lib/squib/card.rb | 2 +- lib/squib/conf.rb | 2 +- lib/squib/layout_parser.rb | 4 ++-- spec/args/save_batch_spec.rb | 2 +- spec/commands/new_spec.rb | 6 +++--- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/squib/args/dir_validator.rb b/lib/squib/args/dir_validator.rb index 837eaa51..611bdc64 100644 --- a/lib/squib/args/dir_validator.rb +++ b/lib/squib/args/dir_validator.rb @@ -1,7 +1,7 @@ module Squib::Args::DirValidator def ensure_dir_created(dir) - unless Dir.exists?(dir) + unless Dir.exist?(dir) Squib.logger.warn "Dir '#{dir}' does not exist, creating it." FileUtils.mkdir_p dir end diff --git a/lib/squib/args/import.rb b/lib/squib/args/import.rb index 2c0bc253..ea7eb3f5 100644 --- a/lib/squib/args/import.rb +++ b/lib/squib/args/import.rb @@ -8,9 +8,9 @@ module Squib::Args end class Import - + def self.parameters - { + { data: nil, explode: 'qty', file: nil, @@ -49,7 +49,7 @@ def validate_explode(arg) def validate_file(arg) return nil if arg.nil? - raise "File #{File.expand_path(arg)} does not exist!" unless File.exists?(arg) + raise "File #{File.expand_path(arg)} does not exist!" unless File.exist?(arg) File.expand_path(arg) end diff --git a/lib/squib/args/input_file.rb b/lib/squib/args/input_file.rb index 15f778f9..79d0c07e 100644 --- a/lib/squib/args/input_file.rb +++ b/lib/squib/args/input_file.rb @@ -29,8 +29,8 @@ def self.params_with_units def validate_file(arg, i) return nil if arg.nil? - return File.expand_path(arg) if File.exists?(arg) - return File.expand_path(placeholder[i]) if File.exists?(placeholder[i].to_s) + return File.expand_path(arg) if File.exist?(arg) + return File.expand_path(placeholder[i]) if File.exist?(placeholder[i].to_s) case deck_conf.img_missing.to_sym when :error @@ -44,7 +44,7 @@ def validate_file(arg, i) def validate_placeholder(arg, _i) # What if they specify placeholder, but it doesn't exist? # ...always warn... that's probably a mistake they made - unless arg.nil? || File.exists?(arg) + unless arg.nil? || File.exist?(arg) msg = "Image placeholder #{File.expand_path(arg)} does not exist!" Squib.logger.warn msg return nil diff --git a/lib/squib/card.rb b/lib/squib/card.rb index a26842ec..b89e3a09 100644 --- a/lib/squib/card.rb +++ b/lib/squib/card.rb @@ -34,7 +34,7 @@ def make_surface(svgfile, backend) when :memory Cairo::ImageSurface.new(@width, @height) when :svg - FileUtils.mkdir_p @deck.dir unless Dir.exists?(@deck.dir) + FileUtils.mkdir_p @deck.dir unless Dir.exist?(@deck.dir) Cairo::SVGSurface.new(svgfile, @width, @height) else Squib.logger.fatal "Back end not recognized: '#{backend}'" diff --git a/lib/squib/conf.rb b/lib/squib/conf.rb index 7344c267..0870eeef 100644 --- a/lib/squib/conf.rb +++ b/lib/squib/conf.rb @@ -59,7 +59,7 @@ def initialize(config_hash = DEFAULTS) # @api private def self.load(file) yaml = {} - if File.exists? file + if File.exist? file Squib::logger.info { " using config: #{file}" } yaml = YAML.load_file(file) || {} end diff --git a/lib/squib/layout_parser.rb b/lib/squib/layout_parser.rb index b648fc10..7fa2f940 100644 --- a/lib/squib/layout_parser.rb +++ b/lib/squib/layout_parser.rb @@ -19,8 +19,8 @@ def load_layout(files, initial = {}) Squib::logger.info { " using layout(s): #{files}" } Array(files).each do |file| thefile = file - thefile = builtin(file) unless File.exists?(file) - if File.exists? thefile + thefile = builtin(file) unless File.exist?(file) + if File.exist? thefile # note: YAML.load_file returns false on empty file yml = layout.merge(YAML.load_file(thefile) || {}) yml.each do |key, value| diff --git a/spec/args/save_batch_spec.rb b/spec/args/save_batch_spec.rb index 25870406..9c63630a 100644 --- a/spec/args/save_batch_spec.rb +++ b/spec/args/save_batch_spec.rb @@ -12,7 +12,7 @@ expect(Squib.logger).to receive(:warn).with("Dir 'tocreate' does not exist, creating it.").once save_batch.load! opts expect(save_batch).to have_attributes({ dir: ['tocreate'] }) - expect(Dir.exists? 'tocreate').to be true + expect(Dir.exist? 'tocreate').to be true end end end diff --git a/spec/commands/new_spec.rb b/spec/commands/new_spec.rb index c33ec0b2..6cd655d5 100644 --- a/spec/commands/new_spec.rb +++ b/spec/commands/new_spec.rb @@ -25,18 +25,18 @@ it 'creates a basic template on an fresh directory' do @cmd.process(['foo'], false) - expect(File.exists?('foo/deck.rb')).to be true + expect(File.exist?('foo/deck.rb')).to be true end it 'creates an advanced template on an fresh directory' do @cmd.process(['foo'], true) - expect(File.exists?('foo/src/deck.rb')).to be true + expect(File.exist?('foo/src/deck.rb')).to be true end it 'creates a new template on an empty directory' do Dir.mkdir('foo') @cmd.process(['foo'], false) - expect(File.exists?('foo/deck.rb')).to be true + expect(File.exist?('foo/deck.rb')).to be true end it 'does not create a new template on an empty ' do From ed87b47a1eb035470254a7b5507c32afeefc62a5 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Tue, 24 Jan 2023 13:42:24 -0500 Subject: [PATCH 03/12] svg backends auto-finish, so no need to call them --- lib/squib/card.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/squib/card.rb b/lib/squib/card.rb index b89e3a09..56dfd5a7 100644 --- a/lib/squib/card.rb +++ b/lib/squib/card.rb @@ -54,7 +54,7 @@ def use_cairo(&block) def finish! begin - @cairo_surface.finish + @cairo_surface.finish unless @backend.to_sym == :svg rescue Cairo::SurfaceFinishedError # do nothin - if it's already finished that's fine end From ffc2c5071b4a927b05c288d50726ac68babe6d2c Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sun, 2 Apr 2023 18:59:15 -0400 Subject: [PATCH 04/12] sphinx vscode support --- .vscode/settings.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 86acf76e..7d0c00f9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "restructuredtext.confPath": "${workspaceFolder}\\docs", - "restructuredtext.linter.disabled": true + "restructuredtext.linter.disabled": true, + "esbonio.sphinx.confDir": "${workspaceFolder}\\docs" } \ No newline at end of file From e9777db5a4ac4dd75cb182d50d50fd79fae2c693 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sun, 2 Apr 2023 18:59:25 -0400 Subject: [PATCH 05/12] bump deps --- squib.gemspec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/squib.gemspec b/squib.gemspec index 0937cad1..16f89d5b 100644 --- a/squib.gemspec +++ b/squib.gemspec @@ -33,15 +33,15 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'cairo', '~> 1.17' # https://rubygems.org/gems/cairo/ spec.add_runtime_dependency 'classy_hash', '1.0.0' # https://rubygems.org/gems/classy_hash - spec.add_runtime_dependency 'gio2', '~> 4.0' # https://rubygems.org/gems/gio2 - spec.add_runtime_dependency 'gobject-introspection', '~> 4.0' # https://rubygems.org/gems/gobject-introspection + spec.add_runtime_dependency 'gio2', '~> 4.1' # https://rubygems.org/gems/gio2 + spec.add_runtime_dependency 'gobject-introspection', '~> 4.1' # https://rubygems.org/gems/gobject-introspection spec.add_runtime_dependency 'highline', '2.1.0' # https://rubygems.org/gems/highline spec.add_runtime_dependency 'mercenary', '0.4.0' # https://rubygems.org/gems/mercenary spec.add_runtime_dependency 'nokogiri', '~> 1.14' # https://rubygems.org/gems/nokogiri - spec.add_runtime_dependency 'pango', '~> 4.0' # https://rubygems.org/gems/pango + spec.add_runtime_dependency 'pango', '~> 4.1' # https://rubygems.org/gems/pango spec.add_runtime_dependency 'rainbow', '~> 3.1' # https://rubygems.org/gems/rainbow spec.add_runtime_dependency 'roo', '~> 2.9' # https://rubygems.org/gems/roo - spec.add_runtime_dependency 'rsvg2', '~> 4.0' # https://rubygems.org/gems/rsvg2 + spec.add_runtime_dependency 'rsvg2', '~> 4.1' # https://rubygems.org/gems/rsvg2 spec.add_runtime_dependency 'ruby-progressbar', '~> 1.11' # https://rubygems.org/gems/ruby-progressbar spec.add_development_dependency 'activesupport' From b26099314be93bf8e3b860488be737b58f1e77e6 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sun, 2 Apr 2023 19:13:40 -0400 Subject: [PATCH 06/12] making versions more pessimistic --- squib.gemspec | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/squib.gemspec b/squib.gemspec index 16f89d5b..be551127 100644 --- a/squib.gemspec +++ b/squib.gemspec @@ -31,18 +31,18 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(/^(spec|samples|docs|benchmarks)\//) spec.require_paths = ['lib'] - spec.add_runtime_dependency 'cairo', '~> 1.17' # https://rubygems.org/gems/cairo/ - spec.add_runtime_dependency 'classy_hash', '1.0.0' # https://rubygems.org/gems/classy_hash - spec.add_runtime_dependency 'gio2', '~> 4.1' # https://rubygems.org/gems/gio2 - spec.add_runtime_dependency 'gobject-introspection', '~> 4.1' # https://rubygems.org/gems/gobject-introspection - spec.add_runtime_dependency 'highline', '2.1.0' # https://rubygems.org/gems/highline - spec.add_runtime_dependency 'mercenary', '0.4.0' # https://rubygems.org/gems/mercenary - spec.add_runtime_dependency 'nokogiri', '~> 1.14' # https://rubygems.org/gems/nokogiri - spec.add_runtime_dependency 'pango', '~> 4.1' # https://rubygems.org/gems/pango - spec.add_runtime_dependency 'rainbow', '~> 3.1' # https://rubygems.org/gems/rainbow - spec.add_runtime_dependency 'roo', '~> 2.9' # https://rubygems.org/gems/roo - spec.add_runtime_dependency 'rsvg2', '~> 4.1' # https://rubygems.org/gems/rsvg2 - spec.add_runtime_dependency 'ruby-progressbar', '~> 1.11' # https://rubygems.org/gems/ruby-progressbar + spec.add_runtime_dependency 'cairo', '~> 1.17', '>= 1.17.8' # https://rubygems.org/gems/cairo/ + spec.add_runtime_dependency 'classy_hash', '1.0.0' # https://rubygems.org/gems/classy_hash + spec.add_runtime_dependency 'gio2', '~> 4.1', '>= 4.1.2' # https://rubygems.org/gems/gio2 + spec.add_runtime_dependency 'gobject-introspection', '~> 4.1', '>= 4.1.2' # https://rubygems.org/gems/gobject-introspection + spec.add_runtime_dependency 'highline', '2.1.0' # https://rubygems.org/gems/highline + spec.add_runtime_dependency 'mercenary', '0.4.0' # https://rubygems.org/gems/mercenary + spec.add_runtime_dependency 'nokogiri', '~> 1.14', '>= 1.14.2' # https://rubygems.org/gems/nokogiri + spec.add_runtime_dependency 'pango', '~> 4.1', '>= 4.1.2' # https://rubygems.org/gems/pango + spec.add_runtime_dependency 'rainbow', '~> 3.1' # https://rubygems.org/gems/rainbow + spec.add_runtime_dependency 'roo', '~> 2.9' # https://rubygems.org/gems/roo + spec.add_runtime_dependency 'rsvg2', '~> 4.1', '>= 4.1.2' # https://rubygems.org/gems/rsvg2 + spec.add_runtime_dependency 'ruby-progressbar', '~> 1.11' # https://rubygems.org/gems/ruby-progressbar spec.add_development_dependency 'activesupport' spec.add_development_dependency 'bundler' From 4ca367809e9ad5ddbca9ba3609e5f6469a2c6bfc Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Mon, 3 Apr 2023 22:32:38 -0400 Subject: [PATCH 07/12] bumping to b --- lib/squib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/squib/version.rb b/lib/squib/version.rb index 11443959..08f7471b 100644 --- a/lib/squib/version.rb +++ b/lib/squib/version.rb @@ -6,6 +6,6 @@ module Squib # Most of the time this is in the alpha of the next release. # e.g. v0.0.5a is on its way to becoming v0.0.5 # - VERSION = '0.19.0a' + VERSION = '0.19.0b' end From 20ee941b82153b0c0c330f80f5dc807999d35757 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sat, 8 Apr 2023 21:49:23 -0400 Subject: [PATCH 08/12] i dub thee v0.19.0 --- lib/squib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/squib/version.rb b/lib/squib/version.rb index 08f7471b..6b4569dc 100644 --- a/lib/squib/version.rb +++ b/lib/squib/version.rb @@ -6,6 +6,6 @@ module Squib # Most of the time this is in the alpha of the next release. # e.g. v0.0.5a is on its way to becoming v0.0.5 # - VERSION = '0.19.0b' + VERSION = '0.19.0' end From 15b73303c749435503c4ffb8a5fe1421b6d888e0 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sat, 8 Apr 2023 22:01:46 -0400 Subject: [PATCH 09/12] documenting v0.19 changelog --- CHANGELOG.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e5d16008..992626cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ # Squib CHANGELOG Squib follows [semantic versioning](http://semver.org). -## v0.18.0 / Unreleased +## v0.19.0 / 2023-04-08 + +Chores: +* Bumping dependencies, which should fix installation issues (e.g. [#376](https://github.com/andymeneely/squib/issues/376)) + +## v0.18.0 / 2021-10-26 Features: * Placeholders! Missing images to `svg` and `png` can be replaced by a `placeholder` (#339) From c9e6508c66fdf30aecce864b703143083361fe42 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sat, 8 Apr 2023 22:02:58 -0400 Subject: [PATCH 10/12] bump docs version --- docs/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 4425175d..a1408880 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -55,9 +55,9 @@ # built documents. # # The short X.Y version. -version = u'v0.18' +version = u'v0.19' # The full version, including alpha/beta/rc tags. -release = u'v0.18.0' +release = u'v0.19.0' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 2d1e20d45d3400c6fe90865afbddbd09a1656ec2 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sat, 8 Apr 2023 22:19:59 -0400 Subject: [PATCH 11/12] bump min version --- .github/workflows/tests.yml | 6 +++--- README.md | 2 +- squib.gemspec | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7b771fb5..8426e4e1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,9 +8,9 @@ jobs: fail-fast: false matrix: os: [ubuntu, macos] - ruby: [2.7, 3.0, head] - runs-on: ${{ matrix.os }}-latest - continue-on-error: ${{ endsWith(matrix.ruby, 'head') || (matrix.ruby == '3.0' && matrix.os == 'macos')}} + ruby: ['3.0', '3.1', '3.2', head] + runs-on: ${{ matrix.os }} + continue-on-error: ${{ endsWith(matrix.ruby, 'head') }} steps: - uses: actions/checkout@v2 - uses: ruby/setup-ruby@v1 diff --git a/README.md b/README.md index c6eebe8d..7e16585b 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Wanna see more? Check out the website: http://andymeneely.github.io/squib/ ## Installation -Squib requires Ruby 2.7 or later. +Squib requires Ruby 3.0 or later. Install it yourself with: diff --git a/squib.gemspec b/squib.gemspec index be551127..5f1c0469 100644 --- a/squib.gemspec +++ b/squib.gemspec @@ -7,7 +7,7 @@ Gem::Specification.new do |spec| spec.specification_version = 2 if spec.respond_to? :specification_version= spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version= spec.rubygems_version = '2.2.2' - spec.required_ruby_version = '>= 2.7.0' + spec.required_ruby_version = '>= 3.0.0' spec.name = 'squib' spec.version = Squib::VERSION From 1132233747bae3fc68a6aee6ce27feb132d450c8 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Sat, 8 Apr 2023 22:33:44 -0400 Subject: [PATCH 12/12] onward and upward --- lib/squib/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/squib/version.rb b/lib/squib/version.rb index 6b4569dc..c1570567 100644 --- a/lib/squib/version.rb +++ b/lib/squib/version.rb @@ -6,6 +6,6 @@ module Squib # Most of the time this is in the alpha of the next release. # e.g. v0.0.5a is on its way to becoming v0.0.5 # - VERSION = '0.19.0' + VERSION = '0.20.0a' end