smartkiosk-client 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,8 @@ class Payment < ActiveRecord::Base
6
6
 
7
7
  scope :complete, where(:processed => true)
8
8
  scope :uncollected, where(:collection_id => nil)
9
+ scope :cash, where(:payment_type => 0)
10
+ scope :cashless, where(arel_table[:payment_type].not_eq 0)
9
11
 
10
12
  serialize :fields
11
13
  serialize :limits
@@ -11,7 +11,7 @@ class Receipt < ActiveRecord::Base
11
11
  def print
12
12
  data = fields.merge(:id => id, :keyword => Terminal.config.keyword)
13
13
  result = Liquid::Template.parse(template).render data.with_indifferent_access
14
- update_attributes(:printed => true) if Smartware.printer.print_text(result)
14
+ update_attributes(:printed => true) if Smartware.printer.print_text(result, 15)
15
15
  end
16
16
 
17
17
  def document_title
@@ -120,7 +120,8 @@ class Terminal
120
120
  :ip => ip,
121
121
  :state => Terminal.state,
122
122
  :banknotes => Payment.merge_banknotes(Payment.uncollected),
123
- :cash => Payment.merge_cash(Payment.uncollected),
123
+ :cash => Payment.merge_cash(Payment.uncollected.cash),
124
+ :cashless => Payment.merge_cash(Payment.uncollected.cashless),
124
125
  :providers => {
125
126
  :updated_at => Terminal.providers_updated_at,
126
127
  :ids => Provider.select(:foreign_id).map{|x| x.foreign_id} || []
@@ -2,6 +2,6 @@ require 'sinatra/base'
2
2
 
3
3
  module Smartkiosk
4
4
  class Client < Sinatra::Base
5
- VERSION = '0.0.18'
5
+ VERSION = '0.0.19'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartkiosk-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,504 +10,349 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-02-02 00:00:00.000000000 Z
13
+ date: 2013-02-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &70239032883180 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
- - - '='
20
+ - - =
21
21
  - !ruby/object:Gem::Version
22
22
  version: 10.0.3
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - '='
29
- - !ruby/object:Gem::Version
30
- version: 10.0.3
25
+ version_requirements: *70239032883180
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: thin
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &70239032893620 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
- - - '='
31
+ - - =
37
32
  - !ruby/object:Gem::Version
38
33
  version: 1.5.0
39
34
  type: :runtime
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - '='
45
- - !ruby/object:Gem::Version
46
- version: 1.5.0
36
+ version_requirements: *70239032893620
47
37
  - !ruby/object:Gem::Dependency
48
38
  name: sinatra
49
- requirement: !ruby/object:Gem::Requirement
39
+ requirement: &70239032912540 !ruby/object:Gem::Requirement
50
40
  none: false
51
41
  requirements:
52
- - - '='
42
+ - - =
53
43
  - !ruby/object:Gem::Version
54
44
  version: 1.3.4
55
45
  type: :runtime
56
46
  prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - '='
61
- - !ruby/object:Gem::Version
62
- version: 1.3.4
47
+ version_requirements: *70239032912540
63
48
  - !ruby/object:Gem::Dependency
64
49
  name: sinatra-activerecord
65
- requirement: !ruby/object:Gem::Requirement
50
+ requirement: &70239032910860 !ruby/object:Gem::Requirement
66
51
  none: false
67
52
  requirements:
68
- - - '='
53
+ - - =
69
54
  - !ruby/object:Gem::Version
70
55
  version: 1.2.1
71
56
  type: :runtime
72
57
  prerelease: false
73
- version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - '='
77
- - !ruby/object:Gem::Version
78
- version: 1.2.1
58
+ version_requirements: *70239032910860
79
59
  - !ruby/object:Gem::Dependency
80
60
  name: sinatra-contrib
81
- requirement: !ruby/object:Gem::Requirement
61
+ requirement: &70239032367040 !ruby/object:Gem::Requirement
82
62
  none: false
83
63
  requirements:
84
- - - '='
64
+ - - =
85
65
  - !ruby/object:Gem::Version
86
66
  version: 1.3.2
87
67
  type: :runtime
88
68
  prerelease: false
89
- version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - '='
93
- - !ruby/object:Gem::Version
94
- version: 1.3.2
69
+ version_requirements: *70239032367040
95
70
  - !ruby/object:Gem::Dependency
96
71
  name: haml
97
- requirement: !ruby/object:Gem::Requirement
72
+ requirement: &70239032360300 !ruby/object:Gem::Requirement
98
73
  none: false
99
74
  requirements:
100
- - - '='
75
+ - - =
101
76
  - !ruby/object:Gem::Version
102
77
  version: 3.1.7
103
78
  type: :runtime
104
79
  prerelease: false
105
- version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
- requirements:
108
- - - '='
109
- - !ruby/object:Gem::Version
110
- version: 3.1.7
80
+ version_requirements: *70239032360300
111
81
  - !ruby/object:Gem::Dependency
112
82
  name: sass
113
- requirement: !ruby/object:Gem::Requirement
83
+ requirement: &70239032170540 !ruby/object:Gem::Requirement
114
84
  none: false
115
85
  requirements:
116
- - - '='
86
+ - - =
117
87
  - !ruby/object:Gem::Version
118
88
  version: 3.2.5
119
89
  type: :runtime
120
90
  prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - '='
125
- - !ruby/object:Gem::Version
126
- version: 3.2.5
91
+ version_requirements: *70239032170540
127
92
  - !ruby/object:Gem::Dependency
128
93
  name: sprockets
129
- requirement: !ruby/object:Gem::Requirement
94
+ requirement: &70239032166440 !ruby/object:Gem::Requirement
130
95
  none: false
131
96
  requirements:
132
- - - '='
97
+ - - =
133
98
  - !ruby/object:Gem::Version
134
99
  version: 2.8.2
135
100
  type: :runtime
136
101
  prerelease: false
137
- version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
140
- - - '='
141
- - !ruby/object:Gem::Version
142
- version: 2.8.2
102
+ version_requirements: *70239032166440
143
103
  - !ruby/object:Gem::Dependency
144
104
  name: sprockets-sass
145
- requirement: !ruby/object:Gem::Requirement
105
+ requirement: &70239032164060 !ruby/object:Gem::Requirement
146
106
  none: false
147
107
  requirements:
148
- - - '='
108
+ - - =
149
109
  - !ruby/object:Gem::Version
150
110
  version: 0.9.1
151
111
  type: :runtime
152
112
  prerelease: false
153
- version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
- requirements:
156
- - - '='
157
- - !ruby/object:Gem::Version
158
- version: 0.9.1
113
+ version_requirements: *70239032164060
159
114
  - !ruby/object:Gem::Dependency
160
115
  name: sprockets-helpers
161
- requirement: !ruby/object:Gem::Requirement
116
+ requirement: &70239032341080 !ruby/object:Gem::Requirement
162
117
  none: false
163
118
  requirements:
164
- - - '='
119
+ - - =
165
120
  - !ruby/object:Gem::Version
166
121
  version: 0.8.0
167
122
  type: :runtime
168
123
  prerelease: false
169
- version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
- requirements:
172
- - - '='
173
- - !ruby/object:Gem::Version
174
- version: 0.8.0
124
+ version_requirements: *70239032341080
175
125
  - !ruby/object:Gem::Dependency
176
126
  name: trollop
177
- requirement: !ruby/object:Gem::Requirement
127
+ requirement: &70239032338300 !ruby/object:Gem::Requirement
178
128
  none: false
179
129
  requirements:
180
- - - '='
130
+ - - =
181
131
  - !ruby/object:Gem::Version
182
132
  version: '2.0'
183
133
  type: :runtime
184
134
  prerelease: false
185
- version_requirements: !ruby/object:Gem::Requirement
186
- none: false
187
- requirements:
188
- - - '='
189
- - !ruby/object:Gem::Version
190
- version: '2.0'
135
+ version_requirements: *70239032338300
191
136
  - !ruby/object:Gem::Dependency
192
137
  name: eventmachine
193
- requirement: !ruby/object:Gem::Requirement
138
+ requirement: &70239032336060 !ruby/object:Gem::Requirement
194
139
  none: false
195
140
  requirements:
196
- - - '='
141
+ - - =
197
142
  - !ruby/object:Gem::Version
198
143
  version: 1.0.0
199
144
  type: :runtime
200
145
  prerelease: false
201
- version_requirements: !ruby/object:Gem::Requirement
202
- none: false
203
- requirements:
204
- - - '='
205
- - !ruby/object:Gem::Version
206
- version: 1.0.0
146
+ version_requirements: *70239032336060
207
147
  - !ruby/object:Gem::Dependency
208
148
  name: em-websocket
209
- requirement: !ruby/object:Gem::Requirement
149
+ requirement: &70239031854740 !ruby/object:Gem::Requirement
210
150
  none: false
211
151
  requirements:
212
- - - '='
152
+ - - =
213
153
  - !ruby/object:Gem::Version
214
154
  version: 0.4.0
215
155
  type: :runtime
216
156
  prerelease: false
217
- version_requirements: !ruby/object:Gem::Requirement
218
- none: false
219
- requirements:
220
- - - '='
221
- - !ruby/object:Gem::Version
222
- version: 0.4.0
157
+ version_requirements: *70239031854740
223
158
  - !ruby/object:Gem::Dependency
224
159
  name: activesupport
225
- requirement: !ruby/object:Gem::Requirement
160
+ requirement: &70239031852900 !ruby/object:Gem::Requirement
226
161
  none: false
227
162
  requirements:
228
- - - '='
163
+ - - =
229
164
  - !ruby/object:Gem::Version
230
165
  version: 3.2.11
231
166
  type: :runtime
232
167
  prerelease: false
233
- version_requirements: !ruby/object:Gem::Requirement
234
- none: false
235
- requirements:
236
- - - '='
237
- - !ruby/object:Gem::Version
238
- version: 3.2.11
168
+ version_requirements: *70239031852900
239
169
  - !ruby/object:Gem::Dependency
240
170
  name: smartkiosk-common
241
- requirement: !ruby/object:Gem::Requirement
171
+ requirement: &70239031851340 !ruby/object:Gem::Requirement
242
172
  none: false
243
173
  requirements:
244
- - - '='
174
+ - - =
245
175
  - !ruby/object:Gem::Version
246
176
  version: 0.0.2
247
177
  type: :runtime
248
178
  prerelease: false
249
- version_requirements: !ruby/object:Gem::Requirement
250
- none: false
251
- requirements:
252
- - - '='
253
- - !ruby/object:Gem::Version
254
- version: 0.0.2
179
+ version_requirements: *70239031851340
255
180
  - !ruby/object:Gem::Dependency
256
181
  name: sqlite3
257
- requirement: !ruby/object:Gem::Requirement
182
+ requirement: &70239031849300 !ruby/object:Gem::Requirement
258
183
  none: false
259
184
  requirements:
260
- - - '='
185
+ - - =
261
186
  - !ruby/object:Gem::Version
262
187
  version: 1.3.6
263
188
  type: :runtime
264
189
  prerelease: false
265
- version_requirements: !ruby/object:Gem::Requirement
266
- none: false
267
- requirements:
268
- - - '='
269
- - !ruby/object:Gem::Version
270
- version: 1.3.6
190
+ version_requirements: *70239031849300
271
191
  - !ruby/object:Gem::Dependency
272
192
  name: pg
273
- requirement: !ruby/object:Gem::Requirement
193
+ requirement: &70239031848220 !ruby/object:Gem::Requirement
274
194
  none: false
275
195
  requirements:
276
- - - '='
196
+ - - =
277
197
  - !ruby/object:Gem::Version
278
198
  version: 0.14.1
279
199
  type: :runtime
280
200
  prerelease: false
281
- version_requirements: !ruby/object:Gem::Requirement
282
- none: false
283
- requirements:
284
- - - '='
285
- - !ruby/object:Gem::Version
286
- version: 0.14.1
201
+ version_requirements: *70239031848220
287
202
  - !ruby/object:Gem::Dependency
288
203
  name: redis
289
- requirement: !ruby/object:Gem::Requirement
204
+ requirement: &70239032382760 !ruby/object:Gem::Requirement
290
205
  none: false
291
206
  requirements:
292
- - - '='
207
+ - - =
293
208
  - !ruby/object:Gem::Version
294
209
  version: 3.0.2
295
210
  type: :runtime
296
211
  prerelease: false
297
- version_requirements: !ruby/object:Gem::Requirement
298
- none: false
299
- requirements:
300
- - - '='
301
- - !ruby/object:Gem::Version
302
- version: 3.0.2
212
+ version_requirements: *70239032382760
303
213
  - !ruby/object:Gem::Dependency
304
214
  name: redis-objects
305
- requirement: !ruby/object:Gem::Requirement
215
+ requirement: &70239032382040 !ruby/object:Gem::Requirement
306
216
  none: false
307
217
  requirements:
308
- - - '='
218
+ - - =
309
219
  - !ruby/object:Gem::Version
310
220
  version: 0.6.1
311
221
  type: :runtime
312
222
  prerelease: false
313
- version_requirements: !ruby/object:Gem::Requirement
314
- none: false
315
- requirements:
316
- - - '='
317
- - !ruby/object:Gem::Version
318
- version: 0.6.1
223
+ version_requirements: *70239032382040
319
224
  - !ruby/object:Gem::Dependency
320
225
  name: carrierwave
321
- requirement: !ruby/object:Gem::Requirement
226
+ requirement: &70239032380720 !ruby/object:Gem::Requirement
322
227
  none: false
323
228
  requirements:
324
- - - '='
229
+ - - =
325
230
  - !ruby/object:Gem::Version
326
231
  version: 0.7.1
327
232
  type: :runtime
328
233
  prerelease: false
329
- version_requirements: !ruby/object:Gem::Requirement
330
- none: false
331
- requirements:
332
- - - '='
333
- - !ruby/object:Gem::Version
334
- version: 0.7.1
234
+ version_requirements: *70239032380720
335
235
  - !ruby/object:Gem::Dependency
336
236
  name: rest-client
337
- requirement: !ruby/object:Gem::Requirement
237
+ requirement: &70239032379160 !ruby/object:Gem::Requirement
338
238
  none: false
339
239
  requirements:
340
- - - '='
240
+ - - =
341
241
  - !ruby/object:Gem::Version
342
242
  version: 1.6.7
343
243
  type: :runtime
344
244
  prerelease: false
345
- version_requirements: !ruby/object:Gem::Requirement
346
- none: false
347
- requirements:
348
- - - '='
349
- - !ruby/object:Gem::Version
350
- version: 1.6.7
245
+ version_requirements: *70239032379160
351
246
  - !ruby/object:Gem::Dependency
352
247
  name: recursive-open-struct
353
- requirement: !ruby/object:Gem::Requirement
248
+ requirement: &70239032377960 !ruby/object:Gem::Requirement
354
249
  none: false
355
250
  requirements:
356
- - - '='
251
+ - - =
357
252
  - !ruby/object:Gem::Version
358
253
  version: 0.2.1
359
254
  type: :runtime
360
255
  prerelease: false
361
- version_requirements: !ruby/object:Gem::Requirement
362
- none: false
363
- requirements:
364
- - - '='
365
- - !ruby/object:Gem::Version
366
- version: 0.2.1
256
+ version_requirements: *70239032377960
367
257
  - !ruby/object:Gem::Dependency
368
258
  name: liquid
369
- requirement: !ruby/object:Gem::Requirement
259
+ requirement: &70239032376100 !ruby/object:Gem::Requirement
370
260
  none: false
371
261
  requirements:
372
- - - '='
262
+ - - =
373
263
  - !ruby/object:Gem::Version
374
264
  version: 2.4.1
375
265
  type: :runtime
376
266
  prerelease: false
377
- version_requirements: !ruby/object:Gem::Requirement
378
- none: false
379
- requirements:
380
- - - '='
381
- - !ruby/object:Gem::Version
382
- version: 2.4.1
267
+ version_requirements: *70239032376100
383
268
  - !ruby/object:Gem::Dependency
384
269
  name: file-tail
385
- requirement: !ruby/object:Gem::Requirement
270
+ requirement: &70239032450820 !ruby/object:Gem::Requirement
386
271
  none: false
387
272
  requirements:
388
- - - '='
273
+ - - =
389
274
  - !ruby/object:Gem::Version
390
275
  version: 1.0.12
391
276
  type: :runtime
392
277
  prerelease: false
393
- version_requirements: !ruby/object:Gem::Requirement
394
- none: false
395
- requirements:
396
- - - '='
397
- - !ruby/object:Gem::Version
398
- version: 1.0.12
278
+ version_requirements: *70239032450820
399
279
  - !ruby/object:Gem::Dependency
400
280
  name: rubyzip
401
- requirement: !ruby/object:Gem::Requirement
281
+ requirement: &70239032448000 !ruby/object:Gem::Requirement
402
282
  none: false
403
283
  requirements:
404
- - - '='
284
+ - - =
405
285
  - !ruby/object:Gem::Version
406
286
  version: 0.9.9
407
287
  type: :runtime
408
288
  prerelease: false
409
- version_requirements: !ruby/object:Gem::Requirement
410
- none: false
411
- requirements:
412
- - - '='
413
- - !ruby/object:Gem::Version
414
- version: 0.9.9
289
+ version_requirements: *70239032448000
415
290
  - !ruby/object:Gem::Dependency
416
291
  name: pry
417
- requirement: !ruby/object:Gem::Requirement
292
+ requirement: &70239032445500 !ruby/object:Gem::Requirement
418
293
  none: false
419
294
  requirements:
420
- - - '='
295
+ - - =
421
296
  - !ruby/object:Gem::Version
422
297
  version: 0.9.10
423
298
  type: :runtime
424
299
  prerelease: false
425
- version_requirements: !ruby/object:Gem::Requirement
426
- none: false
427
- requirements:
428
- - - '='
429
- - !ruby/object:Gem::Version
430
- version: 0.9.10
300
+ version_requirements: *70239032445500
431
301
  - !ruby/object:Gem::Dependency
432
302
  name: smartware
433
- requirement: !ruby/object:Gem::Requirement
303
+ requirement: &70239032409840 !ruby/object:Gem::Requirement
434
304
  none: false
435
305
  requirements:
436
- - - '='
306
+ - - =
437
307
  - !ruby/object:Gem::Version
438
308
  version: 0.4.3
439
309
  type: :runtime
440
310
  prerelease: false
441
- version_requirements: !ruby/object:Gem::Requirement
442
- none: false
443
- requirements:
444
- - - '='
445
- - !ruby/object:Gem::Version
446
- version: 0.4.3
311
+ version_requirements: *70239032409840
447
312
  - !ruby/object:Gem::Dependency
448
313
  name: smartguard
449
- requirement: !ruby/object:Gem::Requirement
314
+ requirement: &70239032406940 !ruby/object:Gem::Requirement
450
315
  none: false
451
316
  requirements:
452
- - - '='
317
+ - - =
453
318
  - !ruby/object:Gem::Version
454
319
  version: 0.4.2
455
320
  type: :runtime
456
321
  prerelease: false
457
- version_requirements: !ruby/object:Gem::Requirement
458
- none: false
459
- requirements:
460
- - - '='
461
- - !ruby/object:Gem::Version
462
- version: 0.4.2
322
+ version_requirements: *70239032406940
463
323
  - !ruby/object:Gem::Dependency
464
324
  name: sidekiq
465
- requirement: !ruby/object:Gem::Requirement
325
+ requirement: &70239032402520 !ruby/object:Gem::Requirement
466
326
  none: false
467
327
  requirements:
468
- - - '='
328
+ - - =
469
329
  - !ruby/object:Gem::Version
470
330
  version: 2.6.5
471
331
  type: :runtime
472
332
  prerelease: false
473
- version_requirements: !ruby/object:Gem::Requirement
474
- none: false
475
- requirements:
476
- - - '='
477
- - !ruby/object:Gem::Version
478
- version: 2.6.5
333
+ version_requirements: *70239032402520
479
334
  - !ruby/object:Gem::Dependency
480
335
  name: slim
481
- requirement: !ruby/object:Gem::Requirement
336
+ requirement: &70239031697660 !ruby/object:Gem::Requirement
482
337
  none: false
483
338
  requirements:
484
- - - '='
339
+ - - =
485
340
  - !ruby/object:Gem::Version
486
341
  version: 1.3.4
487
342
  type: :runtime
488
343
  prerelease: false
489
- version_requirements: !ruby/object:Gem::Requirement
490
- none: false
491
- requirements:
492
- - - '='
493
- - !ruby/object:Gem::Version
494
- version: 1.3.4
344
+ version_requirements: *70239031697660
495
345
  - !ruby/object:Gem::Dependency
496
346
  name: rufus-scheduler
497
- requirement: !ruby/object:Gem::Requirement
347
+ requirement: &70239031693780 !ruby/object:Gem::Requirement
498
348
  none: false
499
349
  requirements:
500
- - - '='
350
+ - - =
501
351
  - !ruby/object:Gem::Version
502
352
  version: 2.0.17
503
353
  type: :runtime
504
354
  prerelease: false
505
- version_requirements: !ruby/object:Gem::Requirement
506
- none: false
507
- requirements:
508
- - - '='
509
- - !ruby/object:Gem::Version
510
- version: 2.0.17
355
+ version_requirements: *70239031693780
511
356
  description: Smartkiosk client application
512
357
  email:
513
358
  - boris@roundlake.ru
@@ -607,7 +452,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
607
452
  version: '0'
608
453
  segments:
609
454
  - 0
610
- hash: -4222507669661345488
455
+ hash: 4039347222557251488
611
456
  required_rubygems_version: !ruby/object:Gem::Requirement
612
457
  none: false
613
458
  requirements:
@@ -616,10 +461,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
616
461
  version: '0'
617
462
  segments:
618
463
  - 0
619
- hash: -4222507669661345488
464
+ hash: 4039347222557251488
620
465
  requirements: []
621
466
  rubyforge_project:
622
- rubygems_version: 1.8.24
467
+ rubygems_version: 1.8.15
623
468
  signing_key:
624
469
  specification_version: 3
625
470
  summary: Smartkiosk client application