dot_grid 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/dot_grid/cli.rb +1 -1
- data/lib/dot_grid/document.rb +2 -2
- data/lib/dot_grid/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d20dc3dcfaf751ae3bac1db9370a7b096441068
|
4
|
+
data.tar.gz: 61c84e76ed26fb9fff8a327e9c0fd9260bed6713
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c04ce6ff5138b6cfc8857798c1ba2cb8462c55852c2bef6a86da3fa4b78769940a6c93dc541e76d036e7ae248ec9d8b8cc5fc20c51bdcef9a80078df38093d1b
|
7
|
+
data.tar.gz: b600b4427e8285b10e9104a960d79a45767474769273b3414f127aecbf4cd96032f240b584a36fabcb82f16ee8bda0dd335b8c41877891983618a8582550e56e
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ A simple ruby file for generating dot grid graph paper.
|
|
14
14
|
## CLI
|
15
15
|
|
16
16
|
### A basic dot grid page can be generated like this ...
|
17
|
-
dot_grid -f dot_grid.pdf --page-types
|
17
|
+
dot_grid -f dot_grid.pdf --page-types dot_grid --spacing 5 --grid-color CFBAEC --dot-weight 0.5 -m 0.0
|
18
18
|
|
19
19
|
### A basic planning page can be generated like this ...
|
20
20
|
dot_grid -f planner_w5_c2dfff.pdf --page-types planner --grid-color CFBAEC --dot-weight 0.5 -m 0.0 --planner-color-1 dddddd --planner-color-2 C2DFFF
|
@@ -23,7 +23,7 @@ A simple ruby file for generating dot grid graph paper.
|
|
23
23
|
dot_grid -f grid_c2dfff.pdf --page-types grid --spacing 5 --grid-color CFBAEC --margin 0.0
|
24
24
|
|
25
25
|
### A horizontal rule page
|
26
|
-
dot_grid -f horizontal_rule_c2dfff.pdf --page-types
|
26
|
+
dot_grid -f horizontal_rule_c2dfff.pdf --page-types horizontal_rule --spacing 5 --grid-color CFBAEC --margin 0.0
|
27
27
|
|
28
28
|
### A checkerboard page
|
29
29
|
dot_grid -f checkerboard_c2dfff.pdf --page-types checkerboard --spacing 5 --grid-color CFBAEC --margin 0.0
|
data/lib/dot_grid/cli.rb
CHANGED
@@ -8,7 +8,7 @@ module DotGrid
|
|
8
8
|
version "dot_grid #{DotGrid::VERSION}"
|
9
9
|
opt :file_name, "File Name", :type => :string, :default => "dotgrid.pdf"
|
10
10
|
opt :orientation, "Orientation of pages (portrait/landscape)", type: :string, default: "portrait"
|
11
|
-
opt :page_types, "Types of pages desired: Types of pages desired: DotGrid, Planner, Grid, HorizontalRule, Checkerboard", type: :string, default: "
|
11
|
+
opt :page_types, "Types of pages desired: Types of pages desired: DotGrid, Planner, Grid, HorizontalRule, Checkerboard", type: :string, default: "planner"
|
12
12
|
opt :dot_weight, "Dot Weight", :type => :float, :default => 1.5
|
13
13
|
opt :margin, "Border", :type => :float, :default => 0.0
|
14
14
|
opt :page_size, "Page Size (LEGAL, LETTER)", :type => :string, :default => "LETTER"
|
data/lib/dot_grid/document.rb
CHANGED
@@ -16,7 +16,7 @@ module DotGrid
|
|
16
16
|
@page_size = params[:page_size] ? parse_page_size(params[:page_size]) : "LETTER"
|
17
17
|
@orientation = params[:orientation] ? params[:orientation].downcase.to_sym : :portrait
|
18
18
|
@margin = params[:margin] || 0.0
|
19
|
-
@page_types = params[:page_types] ? params[:page_types].split(",") : ["planner"]
|
19
|
+
@page_types = params[:page_types] ? params[:page_types].downcase.split(",").map { |w| w.strip } : ["planner"]
|
20
20
|
|
21
21
|
@pdf = Prawn::Document.new(margin: margin, page_size: page_size, skip_page_creation: true, page_layout: orientation)
|
22
22
|
@pages = create_pages(params.merge({pdf: pdf}))
|
@@ -29,7 +29,7 @@ module DotGrid
|
|
29
29
|
|
30
30
|
def create_pages(params)
|
31
31
|
page_types.map do |p|
|
32
|
-
DotGrid::Page::Factory.build(p
|
32
|
+
DotGrid::Page::Factory.build(p, params.clone)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
data/lib/dot_grid/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dot_grid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott LaBounty
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|