qbwc 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/generators/qbwc/install/templates/config/qbwc.rb +3 -0
- data/lib/qbwc.rb +12 -2
- data/lib/qbwc/version.rb +1 -1
- metadata +2 -2
data/lib/qbwc.rb
CHANGED
@@ -40,8 +40,12 @@ module QBWC
|
|
40
40
|
|
41
41
|
# Quickbooks Type (either :qb or :qbpos)
|
42
42
|
mattr_reader :api, :parser
|
43
|
-
@@api=
|
43
|
+
@@api = :qb #::Quickbooks::API[:qb]
|
44
44
|
|
45
|
+
# Check Rails Cache for Parser before boot
|
46
|
+
mattr_accessor :warm_boot
|
47
|
+
@@warm_boot = true
|
48
|
+
|
45
49
|
class << self
|
46
50
|
|
47
51
|
def add_job(name, &block)
|
@@ -57,7 +61,13 @@ class << self
|
|
57
61
|
def api=(api)
|
58
62
|
raise 'Quickbooks type must be :qb or :qbpos' unless [:qb, :qbpos].include?(api)
|
59
63
|
@@api = api
|
60
|
-
@@
|
64
|
+
if @@warm_boot
|
65
|
+
::Rails.logger.warn "using warm boot"
|
66
|
+
@@parser = ::Rails.cache.read("qb_api_#{api}") || ::Quickbooks::API[api]
|
67
|
+
::Rails.cache.write("qb_api_#{api}", @@parser)
|
68
|
+
else
|
69
|
+
@@parser = ::Quickbooks::API[api]
|
70
|
+
end
|
61
71
|
end
|
62
72
|
|
63
73
|
# Allow configuration overrides
|
data/lib/qbwc/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qbwc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-11-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: quickbooks_api
|