notion_to_html 1.1.2 → 1.1.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: 6d677bc1dd405e5269dae90551674d8a4d98a00e187d080e622905280dabab9a
4
- data.tar.gz: 3475c62e5767b6b60904f98de493123730b16871d7c90a00e7deb7c4c41f0e6b
3
+ metadata.gz: 2bb5384177410067721ce9fda929edadb1999137f41b7f31824b87eddd91fc6c
4
+ data.tar.gz: d52f39a1f258255077e6c6a33516429886ec18dcee0dfbc01b64c50f402232c4
5
5
  SHA512:
6
- metadata.gz: 85e1e23e843777136a81de17d2dff9ca4d64a352b17654245e880e6fc42a884ccee12d4f178b7608d0a054478fa0e6c6705aaaa4251f128ec12a6b42e621d33c
7
- data.tar.gz: 9bd18ae170fcf7864c1096ca87eeacf95f2fd158c1172774756b5fc45c0f7980ec78a82e01f40be16637af0e8d96d6fc11328774d8bf07270c7c618a845b1391
6
+ metadata.gz: ec68e95cc07829842e3b8d4c7a99df80b05da4ce60cab3f7ed31ac3c03cdd08af914d588d020e33ceab4af1777bba08e572ccb4c776af05a359507b2449c463a
7
+ data.tar.gz: f0b4e39a13fae034448df686d262acd7d6ebbc96d85a6d50effb64af2a3ae9457525dd674a841160cc1d1bb76f6a063d2bb10dca7cac4013e67a855dbd7200fe
@@ -24,9 +24,19 @@ module NotionToHtml
24
24
  }
25
25
  }
26
26
  ]
27
+ or_query = []
27
28
 
28
- if slug
29
+ if tag
29
30
  query.push({
31
+ property: 'tags',
32
+ multi_select: {
33
+ contains: tag
34
+ }
35
+ })
36
+ end
37
+
38
+ if slug
39
+ or_query.push({
30
40
  property: 'slug',
31
41
  rich_text: {
32
42
  equals: slug
@@ -35,7 +45,7 @@ module NotionToHtml
35
45
  end
36
46
 
37
47
  if name
38
- query.push({
48
+ or_query.push({
39
49
  property: 'name',
40
50
  title: {
41
51
  contains: name
@@ -44,7 +54,7 @@ module NotionToHtml
44
54
  end
45
55
 
46
56
  if description
47
- query.push({
57
+ or_query.push({
48
58
  property: 'description',
49
59
  rich_text: {
50
60
  contains: description
@@ -52,15 +62,7 @@ module NotionToHtml
52
62
  })
53
63
  end
54
64
 
55
- if tag
56
- query.push({
57
- property: 'tags',
58
- multi_select: {
59
- contains: tag
60
- }
61
- })
62
- end
63
-
65
+ query.push('or': or_query) unless or_query.blank?
64
66
  query
65
67
  end
66
68
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module NotionToHtml
4
4
  # The current version of the NotionToHtml gem.
5
- VERSION = '1.1.2'
5
+ VERSION = '1.1.3'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion_to_html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillermo Aguirre