extface 0.5.5 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/extface/devices_controller.rb +1 -1
- data/app/models/extface/driver/base/print.rb +8 -1
- data/app/views/extface/devices/form.html.erb +6 -0
- data/app/views/extface/devices/show.html.erb +3 -0
- data/db/migrate/20160828052036_add_encoding_to_extface_device.rb +5 -0
- data/lib/extface/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 620cf1cae6f685a39efb3726ba1474369c1aa605
|
4
|
+
data.tar.gz: aedfc5fa2883237c560248fb3a36131e7673e5c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c40d300bc4137822f75ab451e727a98f8b191f872c6ba0b2c3f93198b9d4e1860ca54e39b90749651cf32f15a186dc141a5743cfee51d22314936dba3b45a1c
|
7
|
+
data.tar.gz: 24177763e1a4e467be1bb10577103036625d29b2034dad8bc36a164491c277a7c1ef900768784647116f6822e6fd3ee7de65287844bc0d2fe549e3bb03ea82a7
|
@@ -100,7 +100,7 @@ module Extface
|
|
100
100
|
|
101
101
|
# Only allow a trusted parameter "white list" through.
|
102
102
|
def device_params
|
103
|
-
params.require(:device).permit(:uuid, :name, :driver_class, :driver_id)
|
103
|
+
params.require(:device).permit(:uuid, :name, :driver_class, :driver_id, :encoding)
|
104
104
|
end
|
105
105
|
end
|
106
106
|
end
|
@@ -13,7 +13,14 @@ module Extface
|
|
13
13
|
FISCAL = false #cash registers, fiscal printers
|
14
14
|
REPORT = false #only transmit data that must be parsed by handler, CDR, report devices
|
15
15
|
|
16
|
-
alias_method :print, :push
|
16
|
+
#alias_method :print, :push
|
17
|
+
def print(text)
|
18
|
+
if device.encoding.present?
|
19
|
+
push text.encode(device.encoding)
|
20
|
+
else
|
21
|
+
push text
|
22
|
+
end
|
23
|
+
end
|
17
24
|
|
18
25
|
def print_test_page(times = 1)
|
19
26
|
device.session("Print Test Page") do |s|
|
@@ -17,6 +17,12 @@
|
|
17
17
|
<%= render 'object_errors', object: f.object %>
|
18
18
|
|
19
19
|
<%= form_group f, :name, :text_field %>
|
20
|
+
<div class='form-group'>
|
21
|
+
<%= f.label(:encoding, class: 'col-sm-2 control-label') %>
|
22
|
+
<div class='col-sm-6 col-md-4'>
|
23
|
+
<%= f.select :encoding, Encoding.aliases.collect{ |k,v| ["#{v} (#{k})", k]}.sort, { include_blank: true }, class: "form-control" %>
|
24
|
+
</div>
|
25
|
+
</div>
|
20
26
|
|
21
27
|
<div class="form-group">
|
22
28
|
<%= f.label :driver, class: 'col-sm-2 control-label' %>
|
data/lib/extface/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extface
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Vangelov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- db/migrate/20140303122506_change_driver_polymorphic_to_belongs_to_extface_devices.rb
|
150
150
|
- db/migrate/20140303123022_change_polymorphic_to_has_one_to_extface_serial_configs.rb
|
151
151
|
- db/migrate/20160103154233_add_started_at_to_extface_job.rb
|
152
|
+
- db/migrate/20160828052036_add_encoding_to_extface_device.rb
|
152
153
|
- lib/extface.rb
|
153
154
|
- lib/extface/engine.rb
|
154
155
|
- lib/extface/extfaceable.rb
|