Browse Source

Upgrade Roo to 2.1.x

Looks like the main difference is that xlsm is now supported, so I added test for it.
dev
Andy Meneely 11 years ago
parent
commit
cddea47ba5
  1. 8
      CHANGELOG.md
  2. 9
      spec/api/api_data_spec.rb
  3. BIN
      spec/data/xlsx/with_macros.xlsm
  4. 2
      squib.gemspec

8
CHANGELOG.md

@ -4,13 +4,13 @@ Squib follows [semantic versioning](http://semver.org).
## v0.7.0 / Unreleased
Features
* Added `cap` option to `line` and `curve` to define how ends of lines are drawn (#42)
* Added `cap` option to `line` and `curve` to define how those ends are drawn (#42)
* Added `join` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) to define how corners are drawn. (#42)
* Added `dash` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) so you can specify your own dash pattern. Just specify a string with space-separated numbers to specify the on-and-off alternating pattern (e.g. `dash: '2 2'` with a stroke width of `2` is evenly spaced dots). Supports unit conversion (e.g. `dash: '0.02in 0.02in'`) (#42)
* Added `dash` option to all drawing operations (e.g. `rect`, `star`, even outlines for `text`) so you can specify your own dash pattern. Just specify a string with space-separated numbers to specify the on-and-off alternating pattern (e.g. `dash: '2 2'` with a stroke width of 2 is evenly spaced dots). Supports unit conversion (e.g. `dash: '0.02in 0.02in'`) (#42)
* Added an idiom to the `ranges.rb` sample for drawing a different number of images based on the column in a table (e.g. 2 arrows to indicate 2 actions). Based on question #90. There are probably even cleaner, Ruby-ish ways to do this too - pull requests are welcome.
* The `text` method and several other methods will throw errors on invalid input. This means your scripts will be more likely to break if you provide bad input. Please report bugs if you thinkg this unfairly breaks your code.
* The `text` method and several other methods will throw errors on invalid input. This means your scripts will be more likely to break if you provided bad input in the past.
* The `text` embedding icon now allows singleton expansion, which means that you can have icons have different sizes on different cards. The sample `embed_text.rb` demonstrates this. (#54)
* The `text` method will throw a warning when it needs to ellipsize text (i.e. too much text for a fixed-size text box). Can be turned off in `config.yml`. (#80)
* Upgraded roo (Excel parsing) to 2.1.0. Macro-enabled Excel files can be parsed now (i.e. `xlsm`), although I've only mildly tested this.
Compatibility:
* All drawn shapes (e.g. circle, triangle, star) will now draw their stroke on top of the fill. This was not consistent before, and now it is (because Squib is more DRY about it!). This means that your `stroke_width` might render wider than before, but now it's accurate.

9
spec/api/api_data_spec.rb

@ -46,5 +46,12 @@ describe Squib::Deck do
})
end
it 'loads xlsm files with macros' do
expect(Squib.xlsx(file: xlsx_file('with_macros.xlsm'))).to eq({
'foo' => %w(8 10),
'bar' => %w(9 11),
})
end
end
end
end

BIN
spec/data/xlsx/with_macros.xlsm

Binary file not shown.

2
squib.gemspec

@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency 'cairo', '~> 1.14.0'
spec.add_runtime_dependency 'pango', '~> 2.2.0'
spec.add_runtime_dependency 'roo', '~> 2.0.0'
spec.add_runtime_dependency 'roo', '~> 2.1.0'
spec.add_runtime_dependency 'rsvg2', '~> 2.2.0'
spec.add_runtime_dependency 'mercenary', '~> 0.3.4'
spec.add_runtime_dependency 'ruby-progressbar', '~> 1.6'

Loading…
Cancel
Save