smartware 0.2 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -34,7 +34,7 @@ module Smartware
|
|
34
34
|
@status[:signal_level] = @device.signal_level
|
35
35
|
@status[:model] = @device.model
|
36
36
|
@status[:version] = @device.version
|
37
|
-
@status[:error] = @device.error
|
37
|
+
@status[:error] = @device.error
|
38
38
|
@status[:balance] = @device.balance
|
39
39
|
end
|
40
40
|
end
|
@@ -16,7 +16,7 @@ module Smartware
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def test
|
19
|
-
|
19
|
+
print_markdown <<-EOS
|
20
20
|
Smartware: **#{Smartware::VERSION}**
|
21
21
|
|
22
22
|
Driver: **#{@config["driver"]}**
|
@@ -30,10 +30,14 @@ EOS
|
|
30
30
|
|
31
31
|
def print(file, max_time = 30)
|
32
32
|
File.open(file, "r") do |io|
|
33
|
-
|
33
|
+
print_markdown io.read, max_time
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
|
+
def print_markdown(text, max_time = 30)
|
38
|
+
print_text @markdown.render(text), max_time
|
39
|
+
end
|
40
|
+
|
37
41
|
def print_text(text, max_time = 30)
|
38
42
|
Smartware::Logging.logger.info "Started printing"
|
39
43
|
|
@@ -45,7 +49,7 @@ EOS
|
|
45
49
|
loop do
|
46
50
|
case @device.status
|
47
51
|
when :ready, :warning
|
48
|
-
@device.print
|
52
|
+
@device.print text
|
49
53
|
|
50
54
|
query_printer
|
51
55
|
|
@@ -68,7 +72,7 @@ EOS
|
|
68
72
|
|
69
73
|
Smartware::Logging.logger.info "Completed"
|
70
74
|
|
71
|
-
self.error.nil? || self.error
|
75
|
+
self.error.nil? || self.error >= 1000
|
72
76
|
end
|
73
77
|
|
74
78
|
private
|
data/lib/smartware/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: smartware
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-01-
|
13
|
+
date: 2013-01-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: smartkiosk-common
|