ecoportal-api 0.7.2 → 0.7.3

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
  SHA256:
3
- metadata.gz: e1976e2e6000be3719f3cd7d9d0524ecdd4d005691f4c214e9ad77bbe9b33d09
4
- data.tar.gz: 577313f39edd82846a9050ae8acbadf9f3b79ca2f1ebbedec9ee598973ff1fed
3
+ metadata.gz: f2afaf2e4ef28b96b6e1c7bac6e4d97b7c53299a127aed1e22e990a4ca4ac9e3
4
+ data.tar.gz: 5883d799e43fa71151674b91a2c7557fd968f2552895a86fe656b86e16617460
5
5
  SHA512:
6
- metadata.gz: 6706dcf4968d94c9e1daedff8e2325699b4da5403d758c79474a7dff618e9dd36d31d566003be66bb685fc633e0100a2c08a80ba5edd9c4d8433b2e5c56ac00f
7
- data.tar.gz: 20004f26d098f579cc5b7269bb06eb8bf41284506b291882ff81ff7794db2612162df8f010e24a41240a82d30f6b48a48ae8e54c60375c3d5f79228f95ef76b8
6
+ metadata.gz: 33ffe71c4bb72543ab2289d5a945aed1264f955adeae5432a8f6580d5311590f258448a64d49b8ed2e1f73fdabf1482d936fc290d0e92152ba6830b36905b961
7
+ data.tar.gz: 2038ebf5714308446d54ab0b56a70612b6f8ab02b96f28ca8f860e21f1223dc9e2879e53bb05fe25592c7482b3b6d24877c07ed08d872e5086a32fe6ae231464
@@ -1,7 +1,22 @@
1
1
  # Change Log
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## [0.7.2] - 2020-10-30
4
+ ## [0.7.3] - 2020-11-30
5
+
6
+ ### Added
7
+
8
+ ### Fixed
9
+ - `Ecoportal::API::V1::Person#email=`: was not showing the incorrect value in the error message
10
+ - added `compact` to remove `null` values on:
11
+ - `Ecoportal::API::V1::Person#filter_tags=`
12
+ - `Ecoportal::API::Internal::Account#policy_group_ids=`
13
+ - `Ecoportal::API::Internal::Account#login_provider_ids=`
14
+ - `Ecoportal::API::Internal::Account#starred_ids=`
15
+
16
+ ### Changed
17
+
18
+
19
+ ## [0.7.2] - 2020-10-19
5
20
 
6
21
  ### Added
7
22
  - `Ecoportal::API::V1::Person#email=`:
@@ -24,6 +24,7 @@ module Ecoportal
24
24
  ini_ids = (original_doc && original_doc["policy_group_ids"]) || []
25
25
  # preserve original order to avoid false updates
26
26
  doc["policy_group_ids"] = (ini_ids & value) + (value - ini_ids)
27
+ doc["policy_group_ids"].compact!
27
28
  end
28
29
 
29
30
  # @return [Array<String>] the policy group ids of this user.
@@ -31,11 +32,27 @@ module Ecoportal
31
32
  doc["policy_group_ids"] ||= []
32
33
  end
33
34
 
35
+ # Sets the `login_provider_ids`
36
+ def login_provider_ids=(value)
37
+ unless value.is_a?(Array)
38
+ raise "login_provider_ids= needs to be passed an Array, got #{value.class}"
39
+ end
40
+ doc["login_provider_ids"] = value.compact!
41
+ end
42
+
34
43
  # @return [Array<String>] the login provider ids of this user.
35
44
  def login_provider_ids
36
45
  doc["login_provider_ids"] ||= []
37
46
  end
38
47
 
48
+ # Sets the `starred_ids`
49
+ def starred_ids=(value)
50
+ unless value.is_a?(Array)
51
+ raise "starred_ids= needs to be passed an Array, got #{value.class}"
52
+ end
53
+ doc["starred_ids"] = value.compact!
54
+ end
55
+
39
56
  # @return [Array<String>] the starred page ids of this user.
40
57
  def starred_ids
41
58
  doc["starred_ids"] ||= []
@@ -43,10 +43,10 @@ module Ecoportal
43
43
  end
44
44
 
45
45
  # Sets the email of a person.
46
- # @param email [String, nil] the email of this person.
46
+ # @param value [String, nil] the email of this person.
47
47
  def email=(value)
48
48
  unless !value || value.match(VALID_EMAIL_REGEX)
49
- raise "Invalid email #{email.inspect}"
49
+ raise "Invalid email #{value.inspect}"
50
50
  end
51
51
  doc["email"] = value&.downcase
52
52
  end
@@ -69,6 +69,7 @@ module Ecoportal
69
69
  ini_tags = (original_doc && original_doc["filter_tags"]) || []
70
70
  # preserve original order to avoid false updates
71
71
  doc["filter_tags"] = (ini_tags & end_tags) + (end_tags - ini_tags)
72
+ doc["filter_tags"].compact!
72
73
  end
73
74
 
74
75
  # @return [Array<String>] the filter tags of this person.
@@ -1,5 +1,5 @@
1
1
  module Ecoportal
2
2
  module API
3
- VERSION = "0.7.2"
3
+ VERSION = "0.7.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecoportal-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tapio Saarinen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler