teamlab 0.3.10 → 0.3.11

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
  SHA1:
3
- metadata.gz: 9a01bc28543d8f8e08e61147df014d372cf60709
4
- data.tar.gz: 7ebd85ec8bbda23d4b5d13a03eab111aebf7da7d
3
+ metadata.gz: dbaae9f0680fa59b81057a03508006c7455dacf4
4
+ data.tar.gz: 97468c61aca0787f773510bd6929ef24bcde50ca
5
5
  SHA512:
6
- metadata.gz: 1e11b164e85d6b994aaea06566feacf343a97422fbdea6ff2a2539457374a4784cd1be94bb63eda2d6bcf8f613d7d16658a4a0940f39c5ac63e0984a52448e8b
7
- data.tar.gz: 1163bb749496a6452f31aab98a4cbf1910d3b2d168794e0855245aa3b5b8c36d54de814a5955b8da78dc23840606f855377f18a1eb4a8c93794eb6b264d29863
6
+ metadata.gz: edf5c54363824fa828c07cb6d5f8344c6c2d723585504d64e187b89cae458b61949b28b0057da5e2819f81e30ba27a3aff0f0b4b7ad6d30d17001f84ad33aa54
7
+ data.tar.gz: 4984fbc956be74796e6ca48845d5241fb3456fa845ccc4f706106f0d1382a65b0064bd35e5ec16cee6678b8029948299b8813f3bc9e815b8bb107f60d3e09505
data/Changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change log
2
2
 
3
+ ## 0.3.11
4
+ * Fix a lot of tests. But not all
5
+ * Add get_sso_settings, get_ldap_settings, get_white_label_sizes methods in Settings
6
+
3
7
  ## 0.3.10
4
8
  * Add any error >= 400 handling
5
9
 
@@ -10,6 +10,14 @@ module Teamlab
10
10
  @request.get
11
11
  end
12
12
 
13
+ def get_sso_settings
14
+ @request.get(%w(SSO))
15
+ end
16
+
17
+ def get_ldap_settings
18
+ @request.get(%w(LDAP))
19
+ end
20
+
13
21
  def get_logo
14
22
  @request.get(%w(logo))
15
23
  end
@@ -30,6 +38,10 @@ module Teamlab
30
38
  @request.get(%w(iprestrictions))
31
39
  end
32
40
 
41
+ def get_white_label_sizes
42
+ @request.get(%w(whitelabel sizes))
43
+ end
44
+
33
45
  def get_admin_security(product_id, user_id)
34
46
  @request.get(%w(security administrator), productid: product_id, userid: user_id)
35
47
  end
@@ -5,12 +5,18 @@ module Teamlab
5
5
  attr_reader :body, :error, :code, :success
6
6
 
7
7
  def initialize(http_response)
8
- @code = http_response.code
9
- @success = @code < 400
10
- fail "Error #{@code}" if @code >= 400
11
- fail TimeoutError, 'Portal is warming up' if http_response.parsed_response.include?('portal is being warmed')
12
- @body = http_response.respond_to?(:parsed_response) && http_response.parsed_response.key?('result') ? http_response.parsed_response['result'] : http_response.to_hash
13
- @error = @body['error']['message'] if @body.key?('error') && @body['error'].key?('message')
8
+ if http_response.is_a?(String)
9
+ @body = {:'response' => http_response.to_s}
10
+ @success = true
11
+ @code = 201
12
+ else
13
+ @code = http_response.code
14
+ @success = @code < 400
15
+ fail "Error #{@code}" if @code >= 400
16
+ fail TimeoutError, 'Portal is warming up' if http_response.parsed_response.include?('portal is being warmed')
17
+ @body = http_response.respond_to?(:parsed_response) && http_response.parsed_response.key?('result') ? http_response.parsed_response['result'] : http_response.to_hash
18
+ @error = @body['error']['message'] if @body.key?('error') && @body['error'].key?('message')
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -1,3 +1,3 @@
1
1
  module Teamlab
2
- VERSION = '0.3.10'
2
+ VERSION = '0.3.11'
3
3
  end