From c6e1c67e5f46cdea6c73567cbeac5c5dbcad4a35 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Tue, 30 May 2017 16:02:23 -0400 Subject: [PATCH] Fix deprecation warnings --- CHANGELOG.md | 6 ++++++ lib/squib/args/paragraph.rb | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6ba38a..890c3e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ Features: * `save_sheet` method now supports `rtl` or "right-to-left", for easier duplex printing of backs (#204, #208) by @sparr * `yaml` method for reading in data, much like `csv` and `xlsx` by @blinks +Chores: +* Bumped dependencies for Cairo to 1.15.8, Pango et al. to 3.1.4, and nokogiri to 1.7.2. Locked in Cairo and Pango deps so we don't have live release issues that we had recently. + +Bugs: +* Fixed some deprecation warnings on `text` + Special thanks to @sparr and @blinks for all of their work!! ## v0.13.2 / 2017-01-27 diff --git a/lib/squib/args/paragraph.rb b/lib/squib/args/paragraph.rb index 2d08142..6fa12bf 100644 --- a/lib/squib/args/paragraph.rb +++ b/lib/squib/args/paragraph.rb @@ -49,11 +49,11 @@ module Squib def validate_align(arg, _i) case arg.to_s.downcase.strip when 'left' - Pango::ALIGN_LEFT + Pango::Alignment::LEFT when 'right' - Pango::ALIGN_RIGHT + Pango::Alignment::RIGHT when 'center' - Pango::ALIGN_CENTER + Pango::Alignment::CENTER else raise ArgumentError, 'align must be one of: center, left, right' end @@ -62,11 +62,11 @@ module Squib def validate_wrap(arg, _i) case arg.to_s.downcase.strip when 'word' - Pango::Layout::WRAP_WORD + Pango::WrapMode::WORD when 'char', 'false' - Pango::Layout::WRAP_CHAR + Pango::WrapMode::CHAR when 'word_char', 'true' - Pango::Layout::WRAP_WORD_CHAR + Pango::WrapMode::WORD_CHAR else raise ArgumentError, 'wrap must be one of: word, char, word_char, true, or false' end @@ -75,13 +75,13 @@ module Squib def validate_ellipsize(arg, _i) case arg.to_s.downcase.strip when 'none', 'false' - Pango::Layout::ELLIPSIZE_NONE + Pango::EllipsizeMode::NONE when 'start' - Pango::Layout::ELLIPSIZE_START + Pango::EllipsizeMode::START when 'middle' - Pango::Layout::ELLIPSIZE_MIDDLE + Pango::EllipsizeMode::MIDDLE when 'end', 'true' - Pango::Layout::ELLIPSIZE_END + Pango::EllipsizeMode::END else raise ArgumentError, 'ellipsize must be one of: none, start, middle, end, true, or false' end