notion_ruby_mapping 0.7.5 → 0.7.6

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: f757b8eab76be0d30120c595afffc53dba4cde99a872c53eae58334d6d1ecd73
4
- data.tar.gz: d342baef240aaf0cbabc1b9fe298eb99216367e72eeb9c0ed49f15bc58ffc930
3
+ metadata.gz: 878aa368ff78f2d801aa3d5f7dfe5b3a86cb1efb330579c3024b8a89438ede2c
4
+ data.tar.gz: 398edf2c427ce1aeb3371d321fa7ce7e1fc576bc182c5cfd3b8786b588aacb9a
5
5
  SHA512:
6
- metadata.gz: 4e043303f49438475ef9ef87b2e7d91af74105bf2069286986d9727622e4056c8e9ab6921b3c06c55f24a3c10ad6ecb9b103fec88ddb3f90fde482fad6fc90dd
7
- data.tar.gz: 30934684ec64206c5fcb6123dea99fdaa6fd3721ecb3ace0a1574980e2c93eb4ee4d2574f09c9eefb98a5b01fce761b2c4c09e5ab7a8b46f36d9bd3714615cee
6
+ metadata.gz: 79210c1cd2a3bf70d5c41ba019ec618e06cda1d9b9fc329f6bce45f088537806a359041a05c9dadf00a288ca65514166d997877b7334a9b8a2db5fee4392ec6e
7
+ data.tar.gz: 6cd44cc8b026937bd6dd3bd2dc4db19cca67932795355cee27ee14e4c20cc06de6554d86ed3ebe8f1e26f1da37736f319b54ed97d880b01fcb5bf21a6fc19328
@@ -76,7 +76,7 @@ module NotionRubyMapping
76
76
 
77
77
  def self.page_id(str)
78
78
  if /^http/.match str
79
- /([\da-f]{32})$/.match(str)[1]
79
+ /([\da-f]{32})(|\?.*)$/.match(str)[1]
80
80
  else
81
81
  NotionCache.instance.hex_id str
82
82
  end
@@ -11,6 +11,8 @@ module NotionRubyMapping
11
11
  # @return [String, nil] iso8601 format string
12
12
  def self.value_str(obj, start_time: false, end_time: false)
13
13
  case obj
14
+ when DateTime
15
+ obj.iso8601
14
16
  when Date
15
17
  tz = Time.now.strftime "%:z"
16
18
  ds = obj.iso8601
@@ -23,8 +25,6 @@ module NotionRubyMapping
23
25
  end
24
26
  when Time
25
27
  obj.strftime("%Y-%m-%dT%H:%M:%S%:z")
26
- when DateTime
27
- obj.iso8601
28
28
  else
29
29
  obj
30
30
  end
@@ -49,7 +49,7 @@ module NotionRubyMapping
49
49
  # @return [NotionRubyMapping::Query] generated Query object
50
50
  # @see https://www.notion.so/hkob/CheckboxProperty-ac1edbdb8e264af5ad1432b522b429fd#5f07c4ebc4744986bfc99a43827349fc
51
51
  def filter_equals(date, condition: nil, another_type: nil)
52
- if date.is_a? Date
52
+ if date.class == Date
53
53
  start_date, end_date = self.class.start_end_time date
54
54
  if condition
55
55
  filter_after(start_date, condition: condition, another_type: another_type)
@@ -67,7 +67,7 @@ module NotionRubyMapping
67
67
  # @param [String] another_type Rollup type
68
68
  # @return [NotionRubyMapping::Query] generated Query object
69
69
  def filter_does_not_equal(date, condition: nil, another_type: nil)
70
- if date.is_a? Date
70
+ if date.class == Date
71
71
  start_date, end_date = self.class.start_end_time date
72
72
  if condition
73
73
  filter_before(start_date, condition: condition, another_type: another_type)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NotionRubyMapping
4
- VERSION = "0.7.5"
4
+ VERSION = "0.7.6"
5
5
  NOTION_VERSION = "2022-06-28"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notion_ruby_mapping
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki KOBAYASHI
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-03-08 00:00:00.000000000 Z
11
+ date: 2023-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday