journal-cli 1.0.25 → 1.0.27

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
  SHA256:
3
- metadata.gz: 6e9a187c0f58c60df7d7c7a6cf7f4faabe29e5c2040f4f48f3d2628e56822e03
4
- data.tar.gz: 37d3d6fc4833471f46b80ccbe5c26a549c0e8697a19bb791666b6a5101372737
3
+ metadata.gz: f0e13de67e2b05c78b16ff3e4c98e151c5de7b3be51079749599c804d7ea984e
4
+ data.tar.gz: e4112cccece8944e08e0b83dcdf598c0469282062622d15d0e98063a5ff85ee9
5
5
  SHA512:
6
- metadata.gz: 62a78f5c21b9159e661a89c2e5e1bc244b4dbd8553cea02ccb1c904e969ddf6211dfaf8e8cda327b92f070ffc09ae97f7c40cf2b09e7e5a761bb3497c61091f8
7
- data.tar.gz: 1fd3695119b3c5a18cb137ae85296036acca5673124507cecd25b3f2abb8e4e7c9de07d59ab1a15fc8719a688f1147b5ef628bc6862ebb0f3142699705602358
6
+ metadata.gz: 95667e40648e73f25146b6c321142ba1abba26cd9aeefc4b6209e8c86e1452e0b2dc27e066a0ef3af88ed8f46a9c4961a26de71428b3638193e233aecdda479c
7
+ data.tar.gz: 20bf7846052db8f466be5d45dde9e165d8c04a23cef87b53d304b68ce8dc7da621ac97644bda6c6944c8a99b0cec0471c8e6f4a78b4761d151c4942838d80192
data/CHANGELOG.md CHANGED
@@ -1,3 +1,19 @@
1
+ ### 1.0.27
2
+
3
+ 2023-09-23 08:03
4
+
5
+ #### FIXED
6
+
7
+ - Time comparisons for past entries failing when using a past date for entry
8
+
9
+ ### 1.0.26
10
+
11
+ 2023-09-20 19:18
12
+
13
+ #### FIXED
14
+
15
+ - Nil entry error on conditional questions
16
+
1
17
  ### 1.0.25
2
18
 
3
19
  2023-09-20 09:40
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- journal-cli (1.0.25)
4
+ journal-cli (1.0.27)
5
5
  chronic (~> 0.10, >= 0.10.2)
6
6
  tty-reader (~> 0.9, >= 0.9.0)
7
7
  tty-which (~> 0.5, >= 0.5.0)
@@ -133,7 +133,7 @@ module Journal
133
133
  end
134
134
 
135
135
  def print_answer(prompt, type, key, data)
136
- return if data.nil? || !data.key?(key)
136
+ return if data.nil? || !data.key?(key) || data[key].nil?
137
137
 
138
138
  case type
139
139
  when /^(weather|forecast)/
@@ -10,17 +10,20 @@ class ::String
10
10
  now = Journal.date
11
11
  m = condition.match(time_rx)
12
12
  time = Chronic.parse(m['time'])
13
+ now.localtime
14
+ time.localtime
15
+ time_of_day = Time.parse("#{now.strftime('%Y-%m-%d')} #{time.strftime('%H:%M')}")
13
16
  Journal.notify("{br}Invalid time string in question (#{m['time']})", exit_code: 4) unless time
14
17
 
15
18
  case m['comp']
16
19
  when /^<=$/
17
- now <= time
20
+ now <= time_of_day
18
21
  when /^(<|bef)/i
19
- now < time
22
+ now < time_of_day
20
23
  when /^>=/
21
- now >= time
24
+ now >= time_of_day
22
25
  when /^(>|aft)/i
23
- now > time
26
+ now > time_of_day
24
27
  end
25
28
  # TODO: Other condition types
26
29
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Journal
4
- VERSION = '1.0.25'
4
+ VERSION = '1.0.27'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: journal-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.25
4
+ version: 1.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brett Terpstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-20 00:00:00.000000000 Z
11
+ date: 2023-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-which