smartkiosk-client 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,8 @@ class Collection < ActiveRecord::Base
16
16
  :period_start => I18n.l(period_start),
17
17
  :period_end => I18n.l(created_at),
18
18
  :amount => amount,
19
- :banknotes => Hash[banknotes.sort].inject([]){|arr, (nom, cnt)| arr << {'nominal' => nom, 'count' => cnt, 'product' => nom.to_i*cnt.to_i} }
19
+ :banknotes => Hash[banknotes.sort].inject([]){|arr, (nom, cnt)| arr << {'nominal' => nom, 'count' => cnt, 'product' => nom.to_i*cnt.to_i} },
20
+ :nominals => banknotes
20
21
  }
21
22
  end
22
23
 
@@ -1,5 +1,3 @@
1
- require 'liquid'
2
-
3
1
  class Receipt < ActiveRecord::Base
4
2
  belongs_to :document, :polymorphic => true
5
3
  serialize :fields
data/config/boot.rb CHANGED
@@ -6,6 +6,7 @@ require 'sprockets'
6
6
  require 'sprockets/sass'
7
7
  require 'sprockets/helpers'
8
8
  require 'timezone_local'
9
+ require 'liquid'
9
10
 
10
11
  require 'sinatra/base'
11
12
  require 'sinatra/activerecord'
@@ -88,6 +89,7 @@ module Smartkiosk
88
89
  def self.load_app!
89
90
  load 'lib/smartkiosk/client/logging'
90
91
  load 'lib/patches/sidekiq'
92
+ load 'lib/liquid/default_filter'
91
93
 
92
94
  require_relative "../app/workers/orders/durable_order_execution"
93
95
 
@@ -0,0 +1,7 @@
1
+ module Liquid::DefaultFilter
2
+ def default(input, default)
3
+ input.blank? ? default : input
4
+ end
5
+ end
6
+
7
+ Liquid::Template.register_filter(Liquid::DefaultFilter)
@@ -2,6 +2,6 @@ require 'sinatra/base'
2
2
 
3
3
  module Smartkiosk
4
4
  class Client < Sinatra::Base
5
- VERSION = '0.1.13'
5
+ VERSION = '0.1.14'
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.1.13
4
+ version: 0.1.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -596,6 +596,7 @@ files:
596
596
  - db/migrate/20130110025256_create_banners.rb
597
597
  - db/migrate/20130216114539_create_session_records.rb
598
598
  - init.rb
599
+ - lib/liquid/default_filter.rb
599
600
  - lib/patches/sidekiq.rb
600
601
  - lib/pinger.rb
601
602
  - lib/smartkiosk/client.rb
@@ -626,7 +627,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
626
627
  version: '0'
627
628
  segments:
628
629
  - 0
629
- hash: 1640459019695357225
630
+ hash: -856372630699196586
630
631
  required_rubygems_version: !ruby/object:Gem::Requirement
631
632
  none: false
632
633
  requirements:
@@ -635,7 +636,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
635
636
  version: '0'
636
637
  segments:
637
638
  - 0
638
- hash: 1640459019695357225
639
+ hash: -856372630699196586
639
640
  requirements: []
640
641
  rubyforge_project:
641
642
  rubygems_version: 1.8.23