rodbot 0.4.0 → 0.4.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
  SHA256:
3
- metadata.gz: 874d1e4e749027338c4711ceaf6daae88eb17ca7895f947345b90a53ff1b98b6
4
- data.tar.gz: 2a0fc3868240dd4b53504c66f7d4940228ec48f5a44291865e8c69b54135559d
3
+ metadata.gz: 731572aaf37dd47b3ca8bdd234e9db1dca540f735fc6031af62a8794d45fd470
4
+ data.tar.gz: e98a94ef370bd0845749b3182df742cf1870059c75b5abd60800c9643c8e3862
5
5
  SHA512:
6
- metadata.gz: 538cc1141373f4c1a1c459b46c4141fc829e5819308be0ba817b31d4915b4d9287b23fc5ea2d32080cc75a9646de3bb28be2c0e8852eb9b604dacfbf0c0db94c
7
- data.tar.gz: 96226c91181525f7afc469b624da4ceb91bc02fb578056244b886c79513028a80e87e717db0f2d00ff256d0c2e7775400493abbdecf2f35ed41816576fac86e8
6
+ metadata.gz: c36906cb429ac14617f8e3a80c28cd83620d4ede1d8b3f307f7e8b3f97915c60e8248aa72b1791f58fd32380473976b3286736b8a09fa321311925676cbe4f83
7
+ data.tar.gz: ef71720cbd4852cc4198b43002757a73e4fcb15b11b5e64b6893477791c608b2e5cccd77a35db95fd4ab72bd1986fbf8c548e2c9ea5a65fa1f87a913e3402c6a
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 0.4.2
6
+
7
+ #### Fixes
8
+ * Pass the time zone down to Clockwork
9
+
10
+ ## 0.4.1
11
+
12
+ #### Fixes
13
+ * Fix init of memoization cache
14
+
5
15
  ## 0.4.0
6
16
 
7
17
  #### Breaking Changes
data/README.md CHANGED
@@ -211,7 +211,11 @@ The **schedule service** is a [Clockwork process](https://github.com/Rykian/cloc
211
211
 
212
212
  It's a good idea to have the **app service** do the heavy lifting while the schedule simply fires the corresponding HTTP request.
213
213
 
214
- A word on time zones since they are particularly important for schedules: Automatic discovery of the local time zone and DST status is rather unreliable. Therefore, Rodbot expects you to set the time zone in `config/rodbot.rb` using `time_zone`. See `ls /usr/share/zoneinfo` for valid values. To correctly handle DST, you should use geographical zones like `Europe/Paris` rather than technical zones like `CET`. If `time_zone` is not defined, the environment variable `TZ` is read instead. And if `TZ` isn't set neither, Rodbot falls back to `Etc/UTC`.
214
+ A word or two on time zones since they are particularly important for schedules:
215
+
216
+ Automatic discovery of the local time zone and DST status is rather unreliable. Therefore, Rodbot expects you to set the time zone in `config/rodbot.rb` using `time_zone`. See `ls /usr/share/zoneinfo` for valid values. To correctly handle DST, you should use geographical zones like `Europe/Paris` rather than technical zones like `CET`. If `time_zone` is not defined, the environment variable `TZ` is read instead. And if `TZ` isn't set neither, Rodbot falls back to `Etc/UTC`.
217
+
218
+ Also, make sure the [time zone data is available](https://tzinfo.github.io) where you deploy your bot to. The [official Alpine-based Ruby images](https://hub.docker.com/_/ruby) for instance doesn't come with it preinstalled, so you either have to `RUN apk add --no-cache tzdata` in the Dockerfile or add the [tzinfo-data gem](https://rubygems.org/gems/tzinfo-data) to the bundle for `TZ` to have any effect at all.
215
219
 
216
220
  ## CLI
217
221
 
@@ -0,0 +1 @@
1
+ d2acbdcc527c4306534fdca3853d97566c395601178f723d7fce60032df5581d1ebbfc720bae1ec219441d66c8779ac41cf345748427d497f4052a31f21b642f
@@ -0,0 +1 @@
1
+ f6c9c9fd62c5b0c22400fc958198c6d34b8d9b01242b8f7d028fe8622c8c2e8ba955fce7071e05ef0ea3a49e1559954856e21113b1a623c0efd7ed884400a4cc
@@ -71,7 +71,7 @@ module Rodbot
71
71
 
72
72
  def included(base)
73
73
  base.extend(ClassMethods)
74
- @cache = {}
74
+ @cache ||= {}
75
75
  end
76
76
 
77
77
  %i(suspend revisit).each do |switch|
@@ -16,7 +16,10 @@ module Rodbot
16
16
 
17
17
  def run
18
18
  Clockwork.instance_eval do
19
- configure { _1[:logger] = Rodbot::Log.logger('schedule') }
19
+ configure do |config|
20
+ config[:tz] = Rodbot.config[:time_zone]
21
+ config[:logger] = Rodbot::Log.logger('schedule')
22
+ end
20
23
  handler { Rodbot::Async.perform(&_1) }
21
24
  end
22
25
  Rodbot.plugins.extend_schedule
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rodbot
4
- VERSION = "0.4.0"
4
+ VERSION = "0.4.2"
5
5
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rodbot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -27,7 +27,7 @@ cert_chain:
27
27
  k/QvZU05f6HMYBrPogJgIzHC/C5N/yeE4BVEuBDn+10Zb1iu3aDk8sd0uMgukCY8
28
28
  TUmlP5A6NeGdeDJIoLgromAKs+nvI7TWzhQq9ODs51XhxgUFRCvBqUTpjTQigw==
29
29
  -----END CERTIFICATE-----
30
- date: 2023-11-12 00:00:00.000000000 Z
30
+ date: 2023-11-24 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: zeitwerk
@@ -453,6 +453,8 @@ files:
453
453
  - checksums/rodbot-0.3.3.gem.sha512
454
454
  - checksums/rodbot-0.3.4.gem.sha512
455
455
  - checksums/rodbot-0.4.0.gem.sha512
456
+ - checksums/rodbot-0.4.1.gem.sha512
457
+ - checksums/rodbot-0.4.2.gem.sha512
456
458
  - doc/rodbot.afphoto
457
459
  - doc/rodbot.avif
458
460
  - exe/rodbot
metadata.gz.sig CHANGED
Binary file