rock_rms 5.9.1 → 5.9.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: 0436f189196aa04af2bcb9febb4aa528c99a4742c25a2373168292633ab58d59
4
- data.tar.gz: 671a389f0d9afb2f2f59ef824b3b414ac774b394cafba86cea03deae654dc144
3
+ metadata.gz: 3f32473b27446f60af760e2f113670a7a92bf7126bb27f77aea8eba4d0d71ff3
4
+ data.tar.gz: 7ab84e4e37918f83c6aceddb3a744a7b0af8093425bd7a10073a8d2eb50b42a4
5
5
  SHA512:
6
- metadata.gz: 2d5c2423cb1ec837cd4e913d2fa3b52f7f6322d1f1deb12619c4ab7c5a5b6a0ed3b7927529fbbb59dc3ab76e9cd77c3293c13de80e90b0b58457f6822667f222
7
- data.tar.gz: 9311324416a816d019dd4ca278a758465d94e5345d8029842f79785c7d23e70318bef7e7d2a910d6abd10838d2956f2ceb6cde7ccc645f7872998b20740fc036
6
+ metadata.gz: 89cf493e25aa3bf163db43abb8f18c0319c8f1d41c7beedc78afd2b65689163358c75d604966b5eb02a02f73afe2bec115c15079e11f13b6ffa813252182332f
7
+ data.tar.gz: 0c80f3bcfaa5cfb38a87f40e4039494b865fb672e221af7448d7138e441cde9d7ecfcf679f4fc5a9c32efc5609d936db0b2d979491d737b27d817b02bf83ff06
@@ -75,8 +75,20 @@ module RockRMS
75
75
  private
76
76
 
77
77
  def auth
78
+ begin
79
+ auth_request('Auth/Login')
80
+ rescue Faraday::Error::ParsingError => e
81
+ if e.message.include?('Document Moved')
82
+ auth_request('auth/login')
83
+ else
84
+ raise e
85
+ end
86
+ end
87
+ end
88
+
89
+ def auth_request(path)
78
90
  connection.post(
79
- 'Auth/Login',
91
+ path,
80
92
  'Username' => username,
81
93
  'Password' => password,
82
94
  'Persisted' => true
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '5.9.1'.freeze
2
+ VERSION = '5.9.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock_rms
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.9.1
4
+ version: 5.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-17 00:00:00.000000000 Z
11
+ date: 2021-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday