squib 0.17.2 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/bug_report.md +39 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +22 -0
- data/.github/ISSUE_TEMPLATE/help-wanted.md +13 -0
- data/{RELEASE TODO.md → .github/ISSUE_TEMPLATE/release-todo.md} +9 -1
- data/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- data/.github/workflows/tests.yml +3 -3
- data/.vscode/settings.json +4 -0
- data/CHANGELOG.md +15 -0
- data/README.md +1 -1
- data/bin/squib +1 -0
- data/lib/squib/args/arg_loader.rb +9 -0
- data/lib/squib/args/input_file.rb +26 -4
- data/lib/squib/conf.rb +5 -0
- data/lib/squib/dsl/png.rb +1 -0
- data/lib/squib/dsl/save_sheet.rb +1 -1
- data/lib/squib/dsl/svg.rb +1 -0
- data/lib/squib/dsl/text_embed.rb +1 -0
- data/lib/squib/graphics/save_doc.rb +33 -17
- data/lib/squib/import/xlsx_importer.rb +1 -1
- data/lib/squib/version.rb +1 -1
- data/lib/squib.rb +3 -4
- data/samples/images/_placeholders.rb +49 -0
- data/samples/saves/_saves.rb +15 -2
- data/squib.gemspec +1 -1
- metadata +12 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8e5921a89334684b7770be1b6d85ef150fd02f5c1b305ae795c0b349ac3e8a6d
|
|
4
|
+
data.tar.gz: bd29c5c8b101957a1ade535d14a128137185c002195d832d349e51c0aff9fcf4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 021b8f98bab301f65e300523447fb4fc172cc12df0d7436da200e716e6dfd87d843b11ac3e07bd8496319eaa62803c59ad1a5ed88d9dc830e8858f99c4288366
|
|
7
|
+
data.tar.gz: 8c3d7a1b44ac551ce24716ab6da853e1bfcacac55c5ce8ba13a847990c863860cb5bc186832812d8b14aacc774ee96bf3d41057cd65ee966cbad1dda130681e7
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report something that seems wrong
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. My code looks like this...
|
|
16
|
+
2. When I run it like this...
|
|
17
|
+
3. I see this error...
|
|
18
|
+
|
|
19
|
+
**Expected behavior**
|
|
20
|
+
A clear and concise description of what you expected to happen.
|
|
21
|
+
|
|
22
|
+
**Screenshots**
|
|
23
|
+
We love screenshots!
|
|
24
|
+
* Windows: `Print Screen` key and then `ctrl+v` directly into GitHub issues here.
|
|
25
|
+
* Shift + Command + 3, then `command+v` directly into GitHub issues here.
|
|
26
|
+
|
|
27
|
+
**Environment**
|
|
28
|
+
- OS: (e.g. Windows 11)
|
|
29
|
+
- Ruby version (e.g. 2.7, 3.0)
|
|
30
|
+
|
|
31
|
+
**Additional context**
|
|
32
|
+
Add any other context about the problem here.
|
|
33
|
+
|
|
34
|
+
**Check the following:**
|
|
35
|
+
|
|
36
|
+
- [ ] I have updated Squib to the latest version.
|
|
37
|
+
- [ ] I have checked the Squib issues backlog for something similar
|
|
38
|
+
- [ ] I have attempted to make a minimal script demonstrating my problem
|
|
39
|
+
- [ ] I have reviewed the [Squib Docs](https://squib.readthedocs.io/) and there's still a problem
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen. Make an example of what you want the syntax to look like.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
21
|
+
|
|
22
|
+
- [ ] I might be interested in implementing this myself
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Help Wanted - USE GITHUB DISCUSSIONS INSTEAD
|
|
3
|
+
about: Need help doing something in Squib? We prefer you use the (new!) Discussions tab
|
|
4
|
+
title: Help Wanted - USE GITHUB DISCUSSIONS INSTEAD
|
|
5
|
+
labels: help wanted
|
|
6
|
+
assignees: andymeneely
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Need help doing something in Squib? We prefer you use the (new!) Discussions tab
|
|
10
|
+
|
|
11
|
+
We prefer that GitHub issues be used for features or bugs.
|
|
12
|
+
|
|
13
|
+
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: Release TODO list
|
|
3
|
+
about: Use this checklist when we release
|
|
4
|
+
title: Release v0.XYZ
|
|
5
|
+
labels: release
|
|
6
|
+
assignees: andymeneely
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Be sure to remember to do the following for releases.
|
|
2
10
|
|
|
3
11
|
- [ ] CHANGELOG is written for all new changes
|
|
4
12
|
- [ ] README is updated
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
### Motivation
|
|
2
|
+
|
|
3
|
+
*Replace this line with why you are making this change.*
|
|
4
|
+
|
|
5
|
+
### Have you...
|
|
6
|
+
|
|
7
|
+
- [ ] Written a sample in `_samples`?
|
|
8
|
+
- [ ] Updated documentation in the `docs/` folder?
|
|
9
|
+
- [ ] Linked this PR to an issue?
|
|
10
|
+
- [ ] Written any automated tests?
|
|
11
|
+
- [ ] Refactored your code to be maintainable?
|
|
12
|
+
|
|
13
|
+
The above things are not required, but appreciated.
|
data/.github/workflows/tests.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
name: Squib Unit Tests
|
|
2
2
|
|
|
3
|
-
on: [push]
|
|
3
|
+
on: [push, pull_request]
|
|
4
4
|
|
|
5
5
|
jobs:
|
|
6
6
|
test:
|
|
@@ -8,9 +8,9 @@ jobs:
|
|
|
8
8
|
fail-fast: false
|
|
9
9
|
matrix:
|
|
10
10
|
os: [ubuntu, macos]
|
|
11
|
-
ruby: [2.
|
|
11
|
+
ruby: [2.7, 3.0, head]
|
|
12
12
|
runs-on: ${{ matrix.os }}-latest
|
|
13
|
-
continue-on-error: ${{ endsWith(matrix.ruby, 'head') ||
|
|
13
|
+
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || (matrix.ruby == '3.0' && matrix.os == 'macos')}}
|
|
14
14
|
steps:
|
|
15
15
|
- uses: actions/checkout@v2
|
|
16
16
|
- uses: ruby/setup-ruby@v1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
# Squib CHANGELOG
|
|
2
2
|
Squib follows [semantic versioning](http://semver.org).
|
|
3
3
|
|
|
4
|
+
## v0.18.0 / Unreleased
|
|
5
|
+
|
|
6
|
+
Features:
|
|
7
|
+
* Placeholders! Missing images to `svg` and `png` can be replaced by a `placeholder` (#339)
|
|
8
|
+
* New config option: `img_missing`. When an image is missing, warn or error to the console (#339)
|
|
9
|
+
* `save_sheet` learned how to `rotate` individual images! (#301)
|
|
10
|
+
|
|
11
|
+
Compatibility:
|
|
12
|
+
* Because of the features above, the new default behavior is to warn instead of errors on a missing file
|
|
13
|
+
* Ruby 2.7 is officially our minimum Ruby, since Ruby 2.6 will EOL in about six months from now
|
|
14
|
+
|
|
4
15
|
## v0.17.1 / 2021-09-07
|
|
5
16
|
|
|
6
17
|
Bugs:
|
|
7
18
|
* Fix frozen string error on `Squib.xlsx` import when stripping newlines is enabled
|
|
19
|
+
* `save_sheet` works with `rtl` and `trim` altogether properly now.
|
|
20
|
+
|
|
21
|
+
Chores:
|
|
22
|
+
* Added autoloading for various slow-loading libraries, speeding up initial `require`
|
|
8
23
|
|
|
9
24
|
## v0.17.1 / 2021-08-11
|
|
10
25
|
|
data/README.md
CHANGED
data/bin/squib
CHANGED
|
@@ -126,4 +126,13 @@ module Squib::Args::ArgLoader
|
|
|
126
126
|
self
|
|
127
127
|
end
|
|
128
128
|
|
|
129
|
+
# Return the deck's configuration
|
|
130
|
+
# This keeps the @deck local to this mixin instead of forcing args classes
|
|
131
|
+
# to "know" that @deck works.
|
|
132
|
+
#
|
|
133
|
+
# It also makes unit testing easier. Sue me.
|
|
134
|
+
def deck_conf
|
|
135
|
+
@deck.conf
|
|
136
|
+
end
|
|
137
|
+
|
|
129
138
|
end
|
|
@@ -13,7 +13,10 @@ module Squib::Args
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def self.parameters
|
|
16
|
-
{
|
|
16
|
+
{
|
|
17
|
+
file: nil,
|
|
18
|
+
placeholder: nil
|
|
19
|
+
}
|
|
17
20
|
end
|
|
18
21
|
|
|
19
22
|
def self.expanding_parameters
|
|
@@ -24,10 +27,29 @@ module Squib::Args
|
|
|
24
27
|
[] # none of them
|
|
25
28
|
end
|
|
26
29
|
|
|
27
|
-
def validate_file(arg,
|
|
30
|
+
def validate_file(arg, i)
|
|
28
31
|
return nil if arg.nil?
|
|
29
|
-
|
|
30
|
-
File.expand_path(
|
|
32
|
+
return File.expand_path(arg) if File.exists?(arg)
|
|
33
|
+
return File.expand_path(placeholder[i]) if File.exists?(placeholder[i].to_s)
|
|
34
|
+
|
|
35
|
+
case deck_conf.img_missing.to_sym
|
|
36
|
+
when :error
|
|
37
|
+
raise "File #{File.expand_path(arg)} does not exist!"
|
|
38
|
+
when :warn
|
|
39
|
+
Squib.logger.warn "File #{File.expand_path(arg)} does not exist!"
|
|
40
|
+
end
|
|
41
|
+
return nil # the silent option - as if nil in the first place
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def validate_placeholder(arg, _i)
|
|
45
|
+
# What if they specify placeholder, but it doesn't exist?
|
|
46
|
+
# ...always warn... that's probably a mistake they made
|
|
47
|
+
unless arg.nil? || File.exists?(arg)
|
|
48
|
+
msg = "Image placeholder #{File.expand_path(arg)} does not exist!"
|
|
49
|
+
Squib.logger.warn msg
|
|
50
|
+
return nil
|
|
51
|
+
end
|
|
52
|
+
return arg
|
|
31
53
|
end
|
|
32
54
|
end
|
|
33
55
|
end
|
data/lib/squib/conf.rb
CHANGED
|
@@ -23,6 +23,7 @@ module Squib
|
|
|
23
23
|
'dir' => '_output',
|
|
24
24
|
'hint' => :none,
|
|
25
25
|
'img_dir' => '.',
|
|
26
|
+
'img_missing' => :warn,
|
|
26
27
|
'progress_bars' => false,
|
|
27
28
|
'prefix' => 'card_',
|
|
28
29
|
'ldquote' => "\u201C", # UTF8 chars
|
|
@@ -74,6 +75,10 @@ module Squib
|
|
|
74
75
|
@config_hash['img_dir']
|
|
75
76
|
end
|
|
76
77
|
|
|
78
|
+
def img_missing
|
|
79
|
+
@config_hash['img_missing'].to_sym
|
|
80
|
+
end
|
|
81
|
+
|
|
77
82
|
def text_hint
|
|
78
83
|
@config_hash['text_hint']
|
|
79
84
|
end
|
data/lib/squib/dsl/png.rb
CHANGED
data/lib/squib/dsl/save_sheet.rb
CHANGED
data/lib/squib/dsl/svg.rb
CHANGED
data/lib/squib/dsl/text_embed.rb
CHANGED
|
@@ -4,13 +4,13 @@ module Squib
|
|
|
4
4
|
# :nodoc:
|
|
5
5
|
# @api private
|
|
6
6
|
def render_sheet(range, batch, sheet)
|
|
7
|
-
|
|
8
|
-
sheet_height = (sheet
|
|
7
|
+
rotate = batch.rotate.any? true # either rotate all or none
|
|
8
|
+
w,h,sheet_width,sheet_height = compute_dimensions(sheet, rotate)
|
|
9
9
|
cc = Cairo::Context.new(Cairo::ImageSurface.new(sheet_width, sheet_height))
|
|
10
10
|
num_this_sheet = 0
|
|
11
11
|
sheet_num = 0
|
|
12
12
|
y = sheet.margin
|
|
13
|
-
x = sheet.rtl ? (sheet_width
|
|
13
|
+
x = sheet.rtl ? rtl_start_x(sheet_width, sheet, w) : sheet.margin
|
|
14
14
|
@progress_bar.start("Saving PNG sheet to #{batch.summary}", @cards.size + 1) do |bar|
|
|
15
15
|
range.each do |i|
|
|
16
16
|
if num_this_sheet >= (sheet.columns * sheet.rows) # new sheet
|
|
@@ -20,17 +20,19 @@ module Squib
|
|
|
20
20
|
num_this_sheet = 0
|
|
21
21
|
sheet_num += 1
|
|
22
22
|
y = sheet.margin
|
|
23
|
-
x = sheet.rtl ? (sheet_width
|
|
23
|
+
x = sheet.rtl ? rtl_start_x(sheet_width, sheet, w) : sheet.margin
|
|
24
24
|
cc = Cairo::Context.new(Cairo::ImageSurface.new(sheet_width, sheet_height))
|
|
25
25
|
end
|
|
26
|
-
surface =
|
|
26
|
+
surface = preprocess(@cards[i].cairo_surface,
|
|
27
|
+
sheet.trim, w, h,
|
|
28
|
+
rotate, batch.angle[i])
|
|
27
29
|
cc.set_source(surface, x, y)
|
|
28
30
|
cc.paint
|
|
29
31
|
num_this_sheet += 1
|
|
30
|
-
x += (
|
|
32
|
+
x += (w + sheet.gap) * (sheet.rtl ? -1 : 1)
|
|
31
33
|
if num_this_sheet % sheet.columns == 0 # new row
|
|
32
|
-
x = sheet.rtl ? (sheet_width
|
|
33
|
-
y +=
|
|
34
|
+
x = sheet.rtl ? rtl_start_x(sheet_width, sheet, w) : sheet.margin
|
|
35
|
+
y += h + sheet.gap
|
|
34
36
|
end
|
|
35
37
|
bar.increment
|
|
36
38
|
end
|
|
@@ -38,18 +40,32 @@ module Squib
|
|
|
38
40
|
end
|
|
39
41
|
end
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
def compute_dimensions(sheet, rotate)
|
|
44
|
+
w,h = rotate ? [@height,@width] : [@width,@height]
|
|
45
|
+
w -= 2 * sheet.trim
|
|
46
|
+
h -= 2 * sheet.trim
|
|
47
|
+
sheet_width = (sheet.columns * (w + 2 * sheet.gap)) + (2 * sheet.margin)
|
|
48
|
+
sheet_height = (sheet.rows * (h + 2 * sheet.gap)) + (2 * sheet.margin)
|
|
49
|
+
return [w, h, sheet_width, sheet_height]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def rtl_start_x(sheet_width, sheet, w)
|
|
53
|
+
return sheet_width - sheet.margin - sheet.gap - w
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Return a new Cairo::ImageSurface that is trimmed and rotated
|
|
57
|
+
# from the original
|
|
47
58
|
# :nodoc:
|
|
48
59
|
# @api private
|
|
49
|
-
def
|
|
50
|
-
if trim > 0
|
|
51
|
-
tmp = Cairo::ImageSurface.new(
|
|
60
|
+
def preprocess(surface, trim, w, h, rotate, angle)
|
|
61
|
+
if trim > 0 || rotate
|
|
62
|
+
tmp = Cairo::ImageSurface.new(w, h)
|
|
52
63
|
cc = Cairo::Context.new(tmp)
|
|
64
|
+
if rotate
|
|
65
|
+
cc.translate w * 0.5, h * 0.5
|
|
66
|
+
cc.rotate angle
|
|
67
|
+
cc.translate h * -0.5, w * -0.5
|
|
68
|
+
end
|
|
53
69
|
cc.set_source(surface, -1 * trim, -1 * trim)
|
|
54
70
|
cc.paint
|
|
55
71
|
surface = tmp
|
data/lib/squib/version.rb
CHANGED
data/lib/squib.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
autoload :Cairo, 'cairo'
|
|
2
|
+
autoload :Pango, 'pango'
|
|
3
|
+
autoload :Rsvg, 'rsvg2'
|
|
1
4
|
require 'logger'
|
|
2
|
-
require 'cairo'
|
|
3
|
-
require 'pango'
|
|
4
|
-
require 'rsvg2'
|
|
5
5
|
require 'rainbow/refinement'
|
|
6
6
|
require_relative 'squib/version'
|
|
7
7
|
require_relative 'squib/commands/cli'
|
|
@@ -9,7 +9,6 @@ require_relative 'squib/deck'
|
|
|
9
9
|
require_relative 'squib/card'
|
|
10
10
|
require_relative 'squib/system_fonts'
|
|
11
11
|
|
|
12
|
-
|
|
13
12
|
module Squib
|
|
14
13
|
using Rainbow # we can colorize strings now!
|
|
15
14
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# require 'squib'
|
|
2
|
+
require_relative '../../lib/squib'
|
|
3
|
+
|
|
4
|
+
# By default Squib will simply warn you if an image is missing
|
|
5
|
+
# Instead, you can give it a `placeholder`
|
|
6
|
+
Squib.configure img_missing: :silent # no warnings, no errors, no placeholder
|
|
7
|
+
# Squib.configure img_missing: :warn # default
|
|
8
|
+
# Squib.configure img_missing: :error # pre Squib v0.18 behavior... blech
|
|
9
|
+
|
|
10
|
+
Squib::Deck.new(width: 100, height: 100, cards: 3) do
|
|
11
|
+
background color: :white
|
|
12
|
+
|
|
13
|
+
files = %w(angler-fish.png does-not-exist.png) # last one is nil
|
|
14
|
+
png file: files, placeholder: 'grit.png'
|
|
15
|
+
save_sheet columns: 1, prefix: 'placeholder_sheet_'
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Placeholders can be per-image too.
|
|
19
|
+
# What if a placeholder is specified but doesn't exist? It'll always warn.
|
|
20
|
+
Squib.configure img_missing: :warn # default
|
|
21
|
+
Squib::Deck.new(width: 100, height: 100, cards: 4) do
|
|
22
|
+
background color: :white
|
|
23
|
+
|
|
24
|
+
files = %w(angler-fish.png does-not-exist.png does-not-exist.png does-not-exist.png)
|
|
25
|
+
placeholders = %w(grit.png does-not-exist.png grit.png )
|
|
26
|
+
png file: files, placeholder: placeholders
|
|
27
|
+
|
|
28
|
+
# text embeds can have placeholders too
|
|
29
|
+
text(str: 'A', color: :red) do |embed|
|
|
30
|
+
embed.png key: 'A', file: files, placeholder: placeholders, width: 30, height: 30
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
save_sheet columns: 1, prefix: 'multi_placeholder_sheet_'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Do errors work?
|
|
37
|
+
# If you REALLY want the old, pre-Squib v0.18 functionality
|
|
38
|
+
# ...you can still have it
|
|
39
|
+
# This is really more of a regression test than example.
|
|
40
|
+
Squib.configure img_missing: :error
|
|
41
|
+
Squib::Deck.new(width: 100, height: 100, cards: 1) do
|
|
42
|
+
begin
|
|
43
|
+
png file: 'does-not-exist.png' # no placeholder... should error!
|
|
44
|
+
raise Exception.new 'Runtime Error should have been thrown!'
|
|
45
|
+
rescue RuntimeError => e
|
|
46
|
+
# a runtime error should have happened here. So nothing happens. Good.
|
|
47
|
+
Squib.logger.error 'Yay! An error we expected was thrown.'
|
|
48
|
+
end
|
|
49
|
+
end
|
data/samples/saves/_saves.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
require 'squib'
|
|
1
|
+
# require 'squib'
|
|
2
|
+
require_relative '../../lib/squib'
|
|
2
3
|
|
|
3
4
|
# This sample demonstrates how to use the various save methods
|
|
4
|
-
|
|
5
5
|
Squib::Deck.new(width: 825, height: 1125, cards: 16) do
|
|
6
6
|
background color: :gray
|
|
7
7
|
rect x: 38, y: 38, width: 750, height: 1050,
|
|
@@ -60,3 +60,16 @@ Squib::Deck.new(width: 100, height: 100, cards: 3) do
|
|
|
60
60
|
# Buggy behavior was to revert to 1 row and not respect the rows arg.
|
|
61
61
|
save_sheet prefix: 'save_sheet_bug332_', rows: 2, columns: 4
|
|
62
62
|
end
|
|
63
|
+
|
|
64
|
+
# Allow rotating
|
|
65
|
+
Squib::Deck.new(width: 100, height: 50, cards: 8) do
|
|
66
|
+
background color: :white
|
|
67
|
+
rect x: 10, y: 10, width: 80, height: 30
|
|
68
|
+
rect x: 5, y: 5, width: 90, height: 40, stroke_width: 5, stroke_color: :blue
|
|
69
|
+
text y: 2, str: 0..7, font: 'Open Sans Bold 8', align: :center, width: 100
|
|
70
|
+
save_sheet prefix: 'save_sheet_unrotated_', rows: 2, columns: 3
|
|
71
|
+
save_sheet prefix: 'save_sheet_custom_rotate_', rows: 2, columns: 3, rotate: [:clockwise, :counterclockwise] * 4
|
|
72
|
+
save_sheet prefix: 'save_sheet_rotated_', rows: 2, columns: 3, rotate: true
|
|
73
|
+
save_sheet prefix: 'save_sheet_rotated_trimmed_', rows: 2, columns: 3, rotate: true, trim: 5
|
|
74
|
+
save_sheet prefix: 'save_sheet_rotated_trimmed_rtl_', rows: 2, columns: 3, rotate: true, trim: 5, rtl: true
|
|
75
|
+
end
|
data/squib.gemspec
CHANGED
|
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
|
7
7
|
spec.specification_version = 2 if spec.respond_to? :specification_version=
|
|
8
8
|
spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version=
|
|
9
9
|
spec.rubygems_version = '2.2.2'
|
|
10
|
-
spec.required_ruby_version = '>= 2.
|
|
10
|
+
spec.required_ruby_version = '>= 2.7.0'
|
|
11
11
|
|
|
12
12
|
spec.name = 'squib'
|
|
13
13
|
spec.version = Squib::VERSION
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: squib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.18.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andy Meneely
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cairo
|
|
@@ -341,6 +341,7 @@ extra_rdoc_files:
|
|
|
341
341
|
- samples/images/_cairo_access.rb
|
|
342
342
|
- samples/images/_images.rb
|
|
343
343
|
- samples/images/_more_load_images.rb
|
|
344
|
+
- samples/images/_placeholders.rb
|
|
344
345
|
- samples/intro/01_hello.rb
|
|
345
346
|
- samples/intro/02_options.rb
|
|
346
347
|
- samples/intro/03_layout.rb
|
|
@@ -377,8 +378,14 @@ extra_rdoc_files:
|
|
|
377
378
|
- samples/units/_shorthands.rb
|
|
378
379
|
- samples/units/_units.rb
|
|
379
380
|
files:
|
|
381
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
382
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
383
|
+
- ".github/ISSUE_TEMPLATE/help-wanted.md"
|
|
384
|
+
- ".github/ISSUE_TEMPLATE/release-todo.md"
|
|
385
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
380
386
|
- ".github/workflows/tests.yml"
|
|
381
387
|
- ".gitignore"
|
|
388
|
+
- ".vscode/settings.json"
|
|
382
389
|
- CHANGELOG.md
|
|
383
390
|
- CONTRIBUTING.md
|
|
384
391
|
- Dockerfile
|
|
@@ -386,7 +393,6 @@ files:
|
|
|
386
393
|
- Guardfile
|
|
387
394
|
- LICENSE.txt
|
|
388
395
|
- README.md
|
|
389
|
-
- RELEASE TODO.md
|
|
390
396
|
- Rakefile
|
|
391
397
|
- bin/squib
|
|
392
398
|
- lib/squib.rb
|
|
@@ -539,6 +545,7 @@ files:
|
|
|
539
545
|
- samples/images/_cairo_access.rb
|
|
540
546
|
- samples/images/_images.rb
|
|
541
547
|
- samples/images/_more_load_images.rb
|
|
548
|
+
- samples/images/_placeholders.rb
|
|
542
549
|
- samples/intro/01_hello.rb
|
|
543
550
|
- samples/intro/02_options.rb
|
|
544
551
|
- samples/intro/03_layout.rb
|
|
@@ -588,7 +595,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
588
595
|
requirements:
|
|
589
596
|
- - ">="
|
|
590
597
|
- !ruby/object:Gem::Version
|
|
591
|
-
version: 2.
|
|
598
|
+
version: 2.7.0
|
|
592
599
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
593
600
|
requirements:
|
|
594
601
|
- - ">="
|
|
@@ -617,6 +624,7 @@ test_files:
|
|
|
617
624
|
- samples/images/_cairo_access.rb
|
|
618
625
|
- samples/images/_images.rb
|
|
619
626
|
- samples/images/_more_load_images.rb
|
|
627
|
+
- samples/images/_placeholders.rb
|
|
620
628
|
- samples/intro/01_hello.rb
|
|
621
629
|
- samples/intro/02_options.rb
|
|
622
630
|
- samples/intro/03_layout.rb
|