shopapp 0.0.8 → 0.0.9

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dd3dfd7da742deef160d757888ce43424b32e4b0
4
- data.tar.gz: 0677e5aa0d6ab0b15cfc45511d80298d7ffd7f8d
3
+ metadata.gz: 5a6b558b605efa87a9d28d3faace648da4ded444
4
+ data.tar.gz: 5d25093f083cbac07baa4d733f1e77ee99d97911
5
5
  SHA512:
6
- metadata.gz: ae880d410392597cc771aff10ab50ff2f2e5dbffeb22384f9fe643ea4270351233f4fdd6b0d2ab3806e3a36fc1fe9b9c085f94edbd88d965c63fd31c5058cb5f
7
- data.tar.gz: 6effa41036e51cbcda6805e3b530c9fd0275c82016301ece080b907c5b53fb0f9b5697d75254b99737530fd9a39de7c6ccfd5c81d75c5caad1ebf5ed80f514b4
6
+ metadata.gz: 476712af35988887b5a230a6167b97e3d30c7fb224edcb99b3d91926e59521621d6ac96ed00d8d06f7b40a7886068cadd0ad0a2b3979a5534243adfb21341c7a
7
+ data.tar.gz: ee334809a41bca6f57f972bc7be06e914ac07498d855facbcf82fffdbe0a6f19587a35ae5b91747bf1be81596faa4f086bee5c075893c9e166d9aa7e4b4b52e9
@@ -84,11 +84,13 @@ module ShopliftClient
84
84
  end
85
85
 
86
86
  def authenticate_user_or_api!
87
- redirect_unauthorized unless authenticate_company!(true)
87
+ unless authenticate_company!(true)
88
+ redirect_unauthorized
89
+ end
88
90
  end
89
91
 
90
92
  def authenticate_company!(soft = false)
91
- return if authenticate_user
93
+ return true if authenticate_user
92
94
 
93
95
  @api_key = if params['key'].present?
94
96
  params['key'].match(/[0-9a-f]+/).to_s
@@ -116,6 +118,7 @@ module ShopliftClient
116
118
 
117
119
  @authentication = JSON.parse response.body
118
120
  find_company_by_code authentication['company']
121
+ true
119
122
  end
120
123
 
121
124
  def current_user
data/shopapp.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'shopapp'
3
- s.version = '0.0.8'
3
+ s.version = '0.0.9'
4
4
  s.date = '2018-01-09'
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!\
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zeljko