img2zpl 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19743e0b3ff510ad148b7ca6226dbd3aea4a301f54531350a9e025523fba353a
4
- data.tar.gz: 68b4cec5d76662f236d7b6368233449d2ecbbe002d7c78079bb9165dc21cd8a5
3
+ metadata.gz: d438648db69b9d6a1503df5cb6169c9a21740ce15c16c032387d4e8663a65e45
4
+ data.tar.gz: 0f9453b3645f0fd5f284786b22c2b75108a987c9741b8dd232c602c16760c238
5
5
  SHA512:
6
- metadata.gz: 6084f40198fb55fc1eed139163513c47a149c3582b200bb8df97dc054c10d4e191746bbcbc7f36a0921c221ea0802ef87e5832778465486eb4f59b476e3da7b3
7
- data.tar.gz: 648ccaceae2ac08b59ce2e153f568b864d15f1a407c269224b8a724689461f8821f926a4c8097e10d645fe28f875741156a83c28daa57e0ed3010788e69e070a
6
+ metadata.gz: 0372b42254b75b51cdad5a45ebf9e7018f26701c94028f0b43b63f3299b4cfd30f96861aa72ed80dd8e4f7c6e506477b7f24e29c8b06a31ff863d01b61f4d6d7
7
+ data.tar.gz: 34201fe23f15a11548f28aa9189868a9997310c7e5d21d8125d12e49dfc7faf248ab8944463c097e3a38709074087c7d181de2a361e37f608d281bec6f579442
data/README.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # img2zpl
2
+
3
+ [![gem](https://img.shields.io/gem/v/img2zpl)](https://rubygems.org/gems/img2zpl)
4
+ [![downloads](https://img.shields.io/gem/dt/img2zpl?color=brightgreen)](https://rubygems.org/gems/img2zpl)
5
+
2
6
  Ruby library to convert images to usable & printable ZPL code
3
7
 
4
8
  ### Usage
5
9
 
6
10
  ```ruby
7
11
  img = Img2Zpl::Image.open('foo.jpg')
8
- zpl = img.zpl #=> "^FO0,0^GFA, ... ^FS"
12
+ zpl = img.to_zpl #=> "^FO0,0^GFA, ... ^FS"
9
13
  ```
data/lib/img2zpl/image.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  class Img2Zpl::Image < MiniMagick::Image
2
2
 
3
- def zpl(black_threshold: 0.5)
3
+ def to_zpl(black_threshold: 0.5)
4
4
  bytes_per_row = (width % 8).positive? ? (width / 8) + 1 : (width / 8)
5
5
  byte_count = bytes_per_row * height
6
6
  data, line, previous_line, byte = '', '', '', ''
@@ -1,3 +1,3 @@
1
1
  module Img2Zpl
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -7,11 +7,11 @@ describe Img2Zpl::Image do
7
7
  it 'inherits from the MiniMagick::Image class' do
8
8
  expect(described_class.respond_to?(:open)).to be true
9
9
  expect(described_class.respond_to?(:read)).to be true
10
- expect(subject.respond_to?(:zpl)).to be true
10
+ expect(subject.respond_to?(:to_zpl)).to be true
11
11
  end
12
12
 
13
13
  it 'zpl method returns a string' do
14
- expect(subject.zpl).to be_kind_of String
14
+ expect(subject.to_zpl).to be_kind_of String
15
15
  end
16
16
 
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: img2zpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael King