zebra_printer 0.8.0 → 0.9.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/VERSION +1 -1
- data/features/step_definitions/output_steps.rb +3 -3
- data/lib/zebra_printer_document.rb +10 -2
- data/spec/lib/zebra_printer_document_spec.rb +11 -0
- data/zebra_printer.gemspec +4 -4
- 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: f069dfa232b0ee396669d1022f71627ff6ab06b4
|
4
|
+
data.tar.gz: 78616b8451af68bfc5dbb5647cf6de9190e90234
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0dfd687d7685d33197d87024ca7a33ade29efbc3bf73dcfca633d627702e704935dae0632de7adc336ab8fc1db641704bef127d9516746231814c333c263b2db
|
7
|
+
data.tar.gz: 71180d851cc84fb0820b4424f2dc5209de3837bd04e1f6c757ded2dc1ea561804771a560f5a556b12f0f1e06e5f50cad065fed6063404a66668d38eb6aef0ff0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.9.0
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Then(/^the output should include "(.*)"$/) do |arg1|
|
2
|
-
@document = @dsl_document
|
3
|
-
@document.should include(arg1)
|
2
|
+
@document = @dsl_document unless @document
|
3
|
+
@document.to_s.should include(arg1)
|
4
4
|
end
|
5
5
|
|
6
6
|
Then(/^the output should be like "(.*?)"$/) do |arg1|
|
7
|
-
@document = @dsl_document
|
7
|
+
@document = @dsl_document unless @document
|
8
8
|
@document.should match(Regexp.new(arg1))
|
9
9
|
end
|
@@ -29,6 +29,14 @@ class ZebraPrinterDocument
|
|
29
29
|
@data
|
30
30
|
end
|
31
31
|
|
32
|
+
def to_s
|
33
|
+
document
|
34
|
+
end
|
35
|
+
|
36
|
+
def to_str
|
37
|
+
document
|
38
|
+
end
|
39
|
+
|
32
40
|
def method_missing(method,*args,&block)
|
33
41
|
if language_processor.respond_to? method
|
34
42
|
if block_given?
|
@@ -41,7 +49,7 @@ class ZebraPrinterDocument
|
|
41
49
|
end
|
42
50
|
end
|
43
51
|
|
44
|
-
def
|
45
|
-
language_processor.respond_to?(method) || super(method)
|
52
|
+
def respond_to_missing?(method,include_all)
|
53
|
+
language_processor.respond_to?(method) || super(method,include_all)
|
46
54
|
end
|
47
55
|
end
|
@@ -48,4 +48,15 @@ describe ZebraPrinterDocument do
|
|
48
48
|
expect(subject).to respond_to :data
|
49
49
|
end
|
50
50
|
end
|
51
|
+
|
52
|
+
context "string coercion" do
|
53
|
+
before :each do
|
54
|
+
subject.language :zpl2
|
55
|
+
subject.text 'hello world'
|
56
|
+
end
|
57
|
+
|
58
|
+
it "can be a string" do
|
59
|
+
expect(subject.to_str).to include("^FDhello world^FS")
|
60
|
+
end
|
61
|
+
end
|
51
62
|
end
|
data/zebra_printer.gemspec
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# Generated by juwelier
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Juwelier::Tasks in
|
3
|
+
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: zebra_printer 0.
|
5
|
+
# stub: zebra_printer 0.9.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "zebra_printer".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.9.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Paul Mitchell".freeze]
|
14
|
-
s.date = "2018-06-
|
14
|
+
s.date = "2018-06-13"
|
15
15
|
s.description = "This DSL is for zebra printers and support languages ZPLII and EPLII".freeze
|
16
16
|
s.email = "paul.d.mitchell@ed.ac.uk".freeze
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zebra_printer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Mitchell
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|