lifen 0.1.1 → 0.1.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
  SHA1:
3
- metadata.gz: c2057441130b005a11d9540a39f6b564af35a8ba
4
- data.tar.gz: be94e987a02a1079732584d729402075945864cb
3
+ metadata.gz: ba4d1b0ea57398015827506a79e441336c72a705
4
+ data.tar.gz: 6858f9f8db8c0cf7ce82f44c0ba6dc3a2fc033db
5
5
  SHA512:
6
- metadata.gz: 17a66b9fa876808118445b10fdd7a923794f6d7b8934c80d40659e4c76e261cacb76d6eb674484adf916d066fff855b3bc11cfe5d48c27ef6019924401c1d9d4
7
- data.tar.gz: 3fff5a262466a8c1dcc7c52ce88cf56d76f5beae3cc7199bb674ca5708890b6672d8989cebb073049945fe3479697da30a5f62be0ab150100523e1818027a37f
6
+ metadata.gz: 4744f9f13c722ff3214b77c3aee419657f133d9a7b36ce5d4ef61a008196bf7f87c7f5a4a5d2a33061e1e405dd15a4b8ad3f5ab31ac9976bb8b8fdcd346da637
7
+ data.tar.gz: 42b49bc128b1e62922febbc01f0001800fbf6d1219322ebb38df645fe2d5d814bc508233a5a15163861b59e68d80ac9e6d66849eef5f0722df79e4e745b48f5e
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lifen (0.1.0)
4
+ lifen (0.1.2)
5
5
  faraday (~> 0.9)
6
6
  virtus (~> 1.0)
7
7
 
@@ -12,8 +12,9 @@ module Lifen
12
12
  req.body = JSON.generate(params)
13
13
  end
14
14
 
15
- raise Error if response.status == 500
16
- raise Error if response.status == 400
15
+ raise Error, "Error 500, Internal server error" if response.status == 500
16
+ raise Error, "Error 400" if response.status == 400
17
+ raise Error, "Error 404, Page not found" if response.status == 404
17
18
  raise InvalidSecretTokenError if response.status == 401
18
19
  raise UserAlreadyExistingError if response.status == 403
19
20
 
@@ -26,7 +26,7 @@ module Lifen
26
26
 
27
27
  json = client.post("central/api/chats/#{uuid}/attach_users?rel=activeUsers", params)
28
28
 
29
- json["activeUsers"].each do |element|
29
+ Array(json["activeUsers"]).each do |element|
30
30
  self.active_users << Lifen::User.new(element)
31
31
  end
32
32
 
@@ -1,3 +1,3 @@
1
1
  module Lifen
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Etienne Depaulis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-29 00:00:00.000000000 Z
11
+ date: 2016-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler