summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZsolt Kozaroczy <[email protected]>2023-05-25 10:47:29 +0200
committerGitHub <[email protected]>2023-05-25 10:47:29 +0200
commitf5c8c1384412ff1d235c2295a3b7449a21146ef5 (patch)
tree3c8ebca7f641b4adb599b01954629b04c7e4243b
parent14b7da239879d5299775c48666b43f3016add8ec (diff)
parent3d4e8a7681b8a84f23f86bb77c76a2f57008c843 (diff)
downloadcaxlsx-f5c8c1384412ff1d235c2295a3b7449a21146ef5.tar.gz
caxlsx-f5c8c1384412ff1d235c2295a3b7449a21146ef5.zip
Merge pull request #212 from westonganger/master
Fix axlsx_styler gem deprecation error
-rw-r--r--CHANGELOG.md1
-rw-r--r--lib/axlsx.rb8
2 files changed, 3 insertions, 6 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf7a02ba..c7e0fc8b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,7 @@ CHANGELOG
- Fix `SimpleTypedList#to_a` and `SimpleTypedList#to_ary` returning the internal list instance
- Remove ability to set `u=` to true in favor of using :single or one of the other underline options
- Fix `Workbook#sheet_by_name` not returning sheets with encoded characters in the name
+ - Raise exception if `axlsx_styler` gem is present as its code was merged directly into `caxlsx` in v3.3.0
- **April.23.23**: 3.4.1
- [PR #209](https://github.com/caxlsx/caxlsx/pull/209) - Revert characters other than `=` being considered as formulas.
diff --git a/lib/axlsx.rb b/lib/axlsx.rb
index 58096e7c..20af45e0 100644
--- a/lib/axlsx.rb
+++ b/lib/axlsx.rb
@@ -33,12 +33,8 @@ require 'bigdecimal'
require 'set'
require 'time'
-begin
- if Gem.loaded_specs.has_key?("axlsx_styler")
- raise StandardError, "Please remove `axlsx_styler` from your Gemfile, the associated functionality is now built-in to `caxlsx` directly."
- end
-rescue StandardError
- # Do nothing
+if Gem.loaded_specs.has_key?("axlsx_styler")
+ raise StandardError, "Please remove `axlsx_styler` from your Gemfile, the associated functionality is now built-in to `caxlsx` directly."
end
# xlsx generation with charts, images, automated column width, customizable styles