zebra_printer 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88506f2ad5dd58623bf478d6fa4ccd62663e971a
4
- data.tar.gz: 6586972601d3469f9253a9c344c87279f33ead83
3
+ metadata.gz: f069dfa232b0ee396669d1022f71627ff6ab06b4
4
+ data.tar.gz: 78616b8451af68bfc5dbb5647cf6de9190e90234
5
5
  SHA512:
6
- metadata.gz: 4c77df4afffb1ed107d2c1c10cfc5559d0150ebcff80a0a4f9a3aa5c3f161011559e386758e28bc6628fba085cb2c81f62ebb2607bc6a888192b0d1310fac973
7
- data.tar.gz: c818eeca82ddd1ba87242c30c9cca72314e15782fa53dd654b06192cef1e631f250560e50edddd1f1d465270fe85f1450eba60054ad2bd9590e438f099768fed
6
+ metadata.gz: 0dfd687d7685d33197d87024ca7a33ade29efbc3bf73dcfca633d627702e704935dae0632de7adc336ab8fc1db641704bef127d9516746231814c333c263b2db
7
+ data.tar.gz: 71180d851cc84fb0820b4424f2dc5209de3837bd04e1f6c757ded2dc1ea561804771a560f5a556b12f0f1e06e5f50cad065fed6063404a66668d38eb6aef0ff0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.9.0
@@ -1,9 +1,9 @@
1
1
  Then(/^the output should include "(.*)"$/) do |arg1|
2
- @document = @dsl_document.document unless @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.document unless @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 respond_to?(method)
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
@@ -1,17 +1,17 @@
1
1
  # Generated by juwelier
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Juwelier::Tasks in rakefile, and run 'rake gemspec'
3
+ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: zebra_printer 0.8.0 ruby lib
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.8.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-07"
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.8.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-07 00:00:00.000000000 Z
11
+ date: 2018-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec