rodbot 0.3.4 → 0.4.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +11 -0
- data/README.md +10 -1
- data/checksums/rodbot-0.4.0.gem.sha512 +1 -0
- data/checksums/rodbot-0.4.1.gem.sha512 +1 -0
- data/lib/rodbot/config.rb +1 -1
- data/lib/rodbot/generator.rb +2 -2
- data/lib/rodbot/memoize.rb +12 -9
- data/lib/rodbot/version.rb +1 -1
- data/lib/rodbot.rb +1 -0
- data/lib/templates/deploy/docker/compose.yaml.gerb +1 -1
- data/lib/templates/deploy/docker-split/compose.yaml.gerb +1 -1
- data/lib/templates/new/config/rodbot.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +15 -15
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cfce379a5c8a1fa2b8ba390b25c5a3db58406aa2442edc9bb4c5b022bfabe40a
|
|
4
|
+
data.tar.gz: 4b5ca31f1697ae81d9374b5ab9e0173ea37c391d4cd9e936c7a733b91b14439b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d8c5faff81fd9fc2f2552155fe1f29909d444c4b8321bbb8faf4b3889ab363a56991d68de88fc418b9418d3dbc587851cb0bd9134009ad0a9ee8321927ef668
|
|
7
|
+
data.tar.gz: b668cbe4c688399f2d4f8bedd355268b4c24d05bfd74dfe50643c3ec93970ebc42c0e87a882135c580587e8badda7f5b9bb0d3a6fe51b478a9e40fa73c0f2124
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
Nothing so far
|
|
4
4
|
|
|
5
|
+
## 0.4.1
|
|
6
|
+
|
|
7
|
+
#### Fixes
|
|
8
|
+
* Fix init of memoization cache
|
|
9
|
+
|
|
10
|
+
## 0.4.0
|
|
11
|
+
|
|
12
|
+
#### Breaking Changes
|
|
13
|
+
* Rename `timezone` config to `time_zone` and properly implement and document
|
|
14
|
+
time zone handling
|
|
15
|
+
|
|
5
16
|
## 0.3.4
|
|
6
17
|
|
|
7
18
|
#### Additions
|
data/README.md
CHANGED
|
@@ -60,6 +60,13 @@ bundle config set --local with matrix
|
|
|
60
60
|
bundle install
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
+
You can use more than one plugin of course. Please note that you have to list them separated with a space:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
bundle config set --local with matrix slack
|
|
67
|
+
bundle install
|
|
68
|
+
```
|
|
69
|
+
|
|
63
70
|
Please refer to the [Matrix plugin README](https://rubydoc.info/github/svoop/rodbot/file/lib/rodbot/plugins/matrix/README.matrix.md) for more on how to configure and authorise this relay service.
|
|
64
71
|
|
|
65
72
|
Time to add Git to the mix. Both `gems.locked` and `.bundle` are included in order to use the same gems and versions both for local development and deployment to production:
|
|
@@ -128,7 +135,7 @@ It loads the following Roda plugins:
|
|
|
128
135
|
* [run_append_slash](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/RunAppendSlash.html)
|
|
129
136
|
* [halt](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/Halt.html)
|
|
130
137
|
* [unescape_path](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/UnescapePath.html)
|
|
131
|
-
* [render](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/Render.html)
|
|
138
|
+
* [render](http://roda.jeremyevans.net/rdoc/classes/Roda/RodaPlugins/Render.html)
|
|
132
139
|
|
|
133
140
|
It loads the following Roda extensions provided by Rodbot:
|
|
134
141
|
|
|
@@ -204,6 +211,8 @@ The **schedule service** is a [Clockwork process](https://github.com/Rykian/cloc
|
|
|
204
211
|
|
|
205
212
|
It's a good idea to have the **app service** do the heavy lifting while the schedule simply fires the corresponding HTTP request.
|
|
206
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`.
|
|
215
|
+
|
|
207
216
|
## CLI
|
|
208
217
|
|
|
209
218
|
The `rodbot` CLI is the main tool to manage your bot. For a full list of functions:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
86c927787dfd98933bc894182d2757c8b3667863e989a2b86ea67491dcc712bb294a726e118f619bf02b721e22aff5f879bc7ce700949293e65f21c757915a20
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
d2acbdcc527c4306534fdca3853d97566c395601178f723d7fce60032df5581d1ebbfc720bae1ec219441d66c8779ac41cf345748427d497f4052a31f21b642f
|
data/lib/rodbot/config.rb
CHANGED
data/lib/rodbot/generator.rb
CHANGED
data/lib/rodbot/memoize.rb
CHANGED
|
@@ -53,12 +53,12 @@ module Rodbot
|
|
|
53
53
|
if Rodbot::Memoize.suspend? || block
|
|
54
54
|
send(unmemoized_method, *args, **kargs, &block)
|
|
55
55
|
else
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
if !Rodbot::Memoize.revisit? &&
|
|
59
|
-
|
|
56
|
+
cache = Rodbot::Memoize.cache
|
|
57
|
+
id = object_id.hash ^ method.hash ^ args.hash ^ kargs.hash
|
|
58
|
+
if !Rodbot::Memoize.revisit? && cache.has_key?(id)
|
|
59
|
+
cache[id]
|
|
60
60
|
else
|
|
61
|
-
|
|
61
|
+
cache[id] = send(unmemoized_method, *args, **kargs)
|
|
62
62
|
end
|
|
63
63
|
end
|
|
64
64
|
end
|
|
@@ -67,6 +67,13 @@ module Rodbot
|
|
|
67
67
|
end
|
|
68
68
|
|
|
69
69
|
class << self
|
|
70
|
+
attr_reader :cache
|
|
71
|
+
|
|
72
|
+
def included(base)
|
|
73
|
+
base.extend(ClassMethods)
|
|
74
|
+
@cache ||= {}
|
|
75
|
+
end
|
|
76
|
+
|
|
70
77
|
%i(suspend revisit).each do |switch|
|
|
71
78
|
ivar = "@#{switch}"
|
|
72
79
|
define_method switch do |&block|
|
|
@@ -84,10 +91,6 @@ module Rodbot
|
|
|
84
91
|
end
|
|
85
92
|
end
|
|
86
93
|
end
|
|
87
|
-
|
|
88
|
-
def included(base)
|
|
89
|
-
base.extend(ClassMethods)
|
|
90
|
-
end
|
|
91
94
|
end
|
|
92
95
|
end
|
|
93
96
|
|
data/lib/rodbot/version.rb
CHANGED
data/lib/rodbot.rb
CHANGED
|
@@ -51,6 +51,7 @@ module Rodbot
|
|
|
51
51
|
dir ENV['RODBOT_CREDENTIALS_DIR'] || Rodbot.env.root.join('config', 'credentials')
|
|
52
52
|
end
|
|
53
53
|
@config = Rodbot::Config.new(Rodbot.env.root.join('config', 'rodbot.rb'))
|
|
54
|
+
ENV['TZ'] = @config.config(:time_zone)
|
|
54
55
|
@plugins = Rodbot::Plugins.new
|
|
55
56
|
@db = (db = @config.config(:db)) && Rodbot::Db.new(db)
|
|
56
57
|
@log = Rodbot::Log.new
|
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
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sven Schwyn
|
|
@@ -10,26 +10,24 @@ bindir: exe
|
|
|
10
10
|
cert_chain:
|
|
11
11
|
- |
|
|
12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|
24
|
+
GKCRqOefi2iydqh1yIqXyTA9PGR1w5O6O+WS1FvF+sHCwh8fFjCuStg2L8V2RSeo
|
|
25
|
+
aDtfZ5s80sL8wRFxg3kek69cBuI6ozU+rf9DaXlMES4i8+zASsdv9Y4a2BsbhEdE
|
|
26
|
+
9AtuMcWn5a45TOO0S4Q8OuV0v705V38Ow15J2RDRvkFRySt+//8/Vd57XAJxPXU0
|
|
27
|
+
k/QvZU05f6HMYBrPogJgIzHC/C5N/yeE4BVEuBDn+10Zb1iu3aDk8sd0uMgukCY8
|
|
28
|
+
TUmlP5A6NeGdeDJIoLgromAKs+nvI7TWzhQq9ODs51XhxgUFRCvBqUTpjTQigw==
|
|
31
29
|
-----END CERTIFICATE-----
|
|
32
|
-
date: 2023-
|
|
30
|
+
date: 2023-11-12 00:00:00.000000000 Z
|
|
33
31
|
dependencies:
|
|
34
32
|
- !ruby/object:Gem::Dependency
|
|
35
33
|
name: zeitwerk
|
|
@@ -454,6 +452,8 @@ files:
|
|
|
454
452
|
- checksums/rodbot-0.3.2.gem.sha512
|
|
455
453
|
- checksums/rodbot-0.3.3.gem.sha512
|
|
456
454
|
- checksums/rodbot-0.3.4.gem.sha512
|
|
455
|
+
- checksums/rodbot-0.4.0.gem.sha512
|
|
456
|
+
- checksums/rodbot-0.4.1.gem.sha512
|
|
457
457
|
- doc/rodbot.afphoto
|
|
458
458
|
- doc/rodbot.avif
|
|
459
459
|
- exe/rodbot
|
|
@@ -573,7 +573,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
573
573
|
- !ruby/object:Gem::Version
|
|
574
574
|
version: '0'
|
|
575
575
|
requirements: []
|
|
576
|
-
rubygems_version: 3.4.
|
|
576
|
+
rubygems_version: 3.4.22
|
|
577
577
|
signing_key:
|
|
578
578
|
specification_version: 4
|
|
579
579
|
summary: Minimalistic framework to build chat bots on top of a Roda backend
|
metadata.gz.sig
CHANGED
|
Binary file
|