shopapp 0.2.18 → 0.2.19
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 +16 -0
- 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: 16ff0a6744cedeb53a1229529d362dbf66f5836cacdc66ffc8d7294ccd48f0fe
|
4
|
+
data.tar.gz: 810cd8b4f26f904607d8cc1921f7dd6de5f05543699c49cdf59b64b2ef43b2cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c84b4fd1da0f510e52e0f09e2313c14ab2b5b68d101093c23b2aa15217b97331a0d6db256c34419296742f44aa16b736380f4a283bb52f8d96270b5ec2fe44c
|
7
|
+
data.tar.gz: 9264ce63dafad6db9611e6cc1078b4299b0cc8e68f3874485c593bb6c6feb250ae39a934651a03f8a106fcf480a667618133fd5c2f5af05d52aecffc489f31f6
|
@@ -37,6 +37,22 @@ module ShopliftClient
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
+
def company_info
|
41
|
+
return @company_info if @company_info.present?
|
42
|
+
|
43
|
+
@company_info = JSON.parse srv.get('/api/users/company_info').body
|
44
|
+
["clients", "suppliers"].each do |partner_type|
|
45
|
+
@company_info[partner_type].each do |partner|
|
46
|
+
partner[:company] = Company.find_or_create_by! code: partner['code']
|
47
|
+
partner[:company].name = partner['name']
|
48
|
+
partner[:company].info ||= {}
|
49
|
+
partner[:company].info[:company_info] = partner['info']
|
50
|
+
partner[:company].save!
|
51
|
+
end
|
52
|
+
end
|
53
|
+
@company_info
|
54
|
+
end
|
55
|
+
|
40
56
|
def hide_search_for_this_action
|
41
57
|
@do_hide_search_for_this_action = true
|
42
58
|
end
|
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-01-
|
3
|
+
s.version = '0.2.19'
|
4
|
+
s.date = '2019-01-17'
|
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.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zeljko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|