shopapp 0.2.31 → 0.2.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/shoplift_client.rb +6 -5
- data/shopapp.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66455468ac8b97082eedbe9f50c450cb9e3019d229b7e1e9da232481b0cfc87b
|
4
|
+
data.tar.gz: 35552b660f91d892c1fa3ad0d23de3888fe8d8b001badc8e49a33a6aea72174f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 71d1c957bfe67238831d3676c7f1311b30e64a893762dacc32666fffbed752471765b1d7929737069196e953b333cdc6a6a77b922aec7d7670a7537c0ec30fa2
|
7
|
+
data.tar.gz: cae7485e706e24e70035bc7dfea31f4d59f3e0ab6d3c3dea046d9330f8e71610fcf9048c62e81aa759cfcd0a7ef780810a3e2596c3b99862c953150fca6587ae
|
@@ -38,12 +38,13 @@ module ShopliftClient
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
def company_info
|
42
|
-
|
41
|
+
def company_info(company_id = nil)
|
42
|
+
@company_info ||= {}
|
43
|
+
return @company_info[company_id] if @company_info[company_id].present?
|
43
44
|
|
44
|
-
@company_info = JSON.parse srv.get('/api/users/company_info').body
|
45
|
+
@company_info[company_id] = JSON.parse srv.get(['/api/users/company_info', company_id].compact.join '/').body
|
45
46
|
["clients", "suppliers"].each do |partner_type|
|
46
|
-
@company_info[partner_type].each do |partner|
|
47
|
+
@company_info[company_id][partner_type].each do |partner|
|
47
48
|
partner[:company] = Company.find_or_create_by! code: partner['code']
|
48
49
|
partner[:company].name = partner['name']
|
49
50
|
partner[:company].info ||= {}
|
@@ -51,7 +52,7 @@ module ShopliftClient
|
|
51
52
|
partner[:company].save!
|
52
53
|
end
|
53
54
|
end
|
54
|
-
@company_info
|
55
|
+
@company_info[company_id]
|
55
56
|
end
|
56
57
|
|
57
58
|
def hide_search_for_this_action
|
data/shopapp.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'shopapp'
|
3
|
-
s.version = '0.2.
|
4
|
-
s.date = '2019-03-
|
3
|
+
s.version = '0.2.32'
|
4
|
+
s.date = '2019-03-24'
|
5
5
|
s.summary = 'Do a shoplift.'
|
6
6
|
s.description = 'Ha! Art thou Bedlam? Dost thou thirst base Trojan, to have me fold up Parca\'s fatal web? Hence!\
|
7
7
|
I am qualmish at the smell of leek.'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeljko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|