app_manager 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6727df8a0c9cc4df0425d8b62c206f3b9076bedb62d5ede29266ba9d43ef5df9
4
- data.tar.gz: ace50d6916ff9f6c14c0ab9388fb194bada931f19b613ad664a68c1d20f06089
3
+ metadata.gz: 4d929322090bfd34a68ef7e9049e2d7f5833a7f140da6ea524df5649de2d888d
4
+ data.tar.gz: 21a5fb7b13c4bdfd067e2504759be2f9cd8c2a39531afd21ebe279179c0fa516
5
5
  SHA512:
6
- metadata.gz: fd7e2afad41cedc53566ef723d5451a4435a0b15d2cb6726252819021fce43e869c50fcd27349df0987f395aa59b24e37a72335dd02f188ad3d13f5e439e8d70
7
- data.tar.gz: 926eb7293fd9e2c0bdbc2b61737cb9cd74a4e17291aed9dac2f0fd537f518b91be5ebd5b36162f71d212a5953eed1546b3f039713abda16a1c6d4387c3a4f6ae
6
+ metadata.gz: d3d52ceb7551a5ace2076f10414b1624d43b69be4024f67eef5a79e043a307ee39e62d78399220ec084f641174f496359f7c6d99c031aed5f1b489251c4422c3
7
+ data.tar.gz: 5d3f77fc3febddf0effe43ada6ae02dbc07f9cc7f3073540e1004e49a9d4593fb5c8c00439cf6ffa20ef26f82af8050c886bb3523797b25430a82f2491c92a96
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_manager (1.3.1)
4
+ app_manager (1.3.2)
5
5
  httparty
6
6
  kaminari (>= 0.16.3)
7
7
  rails (>= 5.2.0)
@@ -34,12 +34,12 @@ module AppManager
34
34
  data = response.parsed_response
35
35
  data = parse_data(response.parsed_response)
36
36
  else
37
- if response.code.to_s.start_with?('2') or response.code.to_s.start_with?('4')
37
+ if response.class.to_s == "HTTParty::Response" && (response.code.to_s.start_with?('2') or response.code.to_s.start_with?('4'))
38
38
  data = response.parsed_response
39
39
  data = parse_data(response.parsed_response)
40
40
  # data = response_from_failsafe(path,options)
41
41
  else
42
- data = response_from_failsafe(path,options)
42
+ data = response_from_failsafe(path,options)
43
43
  end
44
44
  end
45
45
  end
@@ -50,7 +50,11 @@ module AppManager
50
50
  return fetch_static_cached_response(cache_key)
51
51
  end
52
52
  response = self.class.send(http_method, path, { body: options, timeout: 10 })
53
- Rails.cache.write(cache_key, response, expires_in: AppManager.configuration.expires_in)
53
+ if response.code.to_s.start_with?('2') or response.code.to_s.start_with?('4')
54
+ Rails.cache.write(cache_key, response, expires_in: AppManager.configuration.expires_in)
55
+ else
56
+ response = response_from_failsafe(path,options)
57
+ end
54
58
  return response
55
59
  end
56
60
 
@@ -406,7 +406,6 @@ module AppManager
406
406
  return {:has_plan => true}
407
407
  end
408
408
  @remaining_days = get_local_remaining_days(params, options)
409
- puts @remaining_days.inspect
410
409
  if (@remaining_days && @remaining_days > 0)
411
410
  return {:has_plan => true}
412
411
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppManager
4
- VERSION = "1.3.1"
4
+ VERSION = "1.3.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hulkapps