extface 0.4.2a → 0.4.2
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/jobs_controller.rb +0 -7
- data/app/models/extface/device.rb +2 -1
- data/app/models/extface/driver.rb +7 -7
- data/lib/extface/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06fc5a9c83af9cb726c1a38dc4a632e0375a9578
|
4
|
+
data.tar.gz: da0439fc7a7f44e8f68239a7b459dfebc2dff649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fe9d0589f060d96affd95141e93064cd0932ea69f2298fe2a215d2d1d6a65a1ccd22b2e03506a112181b4c799247d9a01091fe7150228addd4637c136d11329
|
7
|
+
data.tar.gz: 2c1ee7ee842429c5c089ac8ccdb8859a8e27227be541851ceeee07c80841c20b83ef90b660814439b8b3a2baf44e9837969e67682c196f20d0b3f1afa666460e
|
@@ -3,13 +3,6 @@ require_dependency "extface/application_controller"
|
|
3
3
|
module Extface
|
4
4
|
class JobsController < ApplicationController
|
5
5
|
include ActionController::Live
|
6
|
-
|
7
|
-
skip_before_filter :include_extra_module
|
8
|
-
before_action :allow_cross_origin
|
9
|
-
|
10
|
-
def allow_cross_origin
|
11
|
-
headers['Access-Control-Allow-Origin'] = '*'
|
12
|
-
end
|
13
6
|
|
14
7
|
def show
|
15
8
|
response.headers['Content-Type'] = 'text/event-stream'
|
@@ -57,13 +57,14 @@ module Extface
|
|
57
57
|
|
58
58
|
#initial billing module fiscalization support
|
59
59
|
def fiscalize(billing_account, detailed = false)
|
60
|
+
|
60
61
|
driver.sale_and_pay_items_session(
|
61
62
|
[].tap() do |payments|
|
62
63
|
billing_account.payments.each do |payment|
|
63
64
|
payments << Extface::Driver::Base::Fiscal::SaleItem.new(price: payment.value.to_f, text1: payment.description)
|
64
65
|
end
|
65
66
|
end
|
66
|
-
) if billing_account.
|
67
|
+
) if billing_account.instance_of?(Billing::Bill) && billing_account.valid?
|
67
68
|
|
68
69
|
end
|
69
70
|
end
|
@@ -47,14 +47,14 @@ module Extface
|
|
47
47
|
def push(buffer)
|
48
48
|
if @job
|
49
49
|
#retry if current device job is not @job (waiting on queue)
|
50
|
-
wait_on_queue =
|
51
|
-
if current_device_job = device.jobs(true).active.try(:first)
|
52
|
-
if current_device_job != @job
|
53
|
-
wait_on_queue = 20 #FIXME!
|
54
|
-
p "#### current_job is not first_on_queue"
|
55
|
-
end
|
56
|
-
end
|
50
|
+
wait_on_queue = 20 #stop me writing endless things
|
57
51
|
begin
|
52
|
+
if current_device_job = device.jobs(true).active.try(:first)
|
53
|
+
if current_device_job != @job
|
54
|
+
#wait_on_queue = 20 #FIXME!
|
55
|
+
p "#### current_job is not first_on_queue"
|
56
|
+
end
|
57
|
+
end
|
58
58
|
Timeout.timeout(Extface.device_timeout) do
|
59
59
|
Extface.redis_block do |r|
|
60
60
|
r.subscribe(@job.id) do |on| #blocking until delivered
|
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Vangelov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -258,9 +258,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
258
258
|
version: '0'
|
259
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
260
|
requirements:
|
261
|
-
- - "
|
261
|
+
- - ">="
|
262
262
|
- !ruby/object:Gem::Version
|
263
|
-
version:
|
263
|
+
version: '0'
|
264
264
|
requirements: []
|
265
265
|
rubyforge_project:
|
266
266
|
rubygems_version: 2.2.2
|