]>
git.netwichtig.ch Git - user/henk/code/ruby/rbot.git/log
Hendrik Jäger [Sun, 24 Sep 2023 19:44:17 +0000 (21:44 +0200)]
fix: TCPSocked.gethostbyname is deprecated
Hendrik Jäger [Sun, 24 Sep 2023 20:09:39 +0000 (22:09 +0200)]
fix: update deprecated git option
Hendrik Jäger [Thu, 21 Jul 2022 20:55:25 +0000 (22:55 +0200)]
fix: URI.escape is not needed anymore
Giuseppe Bilotta [Wed, 9 Jun 2021 09:27:57 +0000 (11:27 +0200)]
rbot-remote: allow override of function
Giuseppe Bilotta [Wed, 9 Jun 2021 07:33:43 +0000 (09:33 +0200)]
fix: webservice dispatch syntax check
Early bailout if the command field is not specified in the POST request.
(Not doing this actually leads to an exception in the subsequent debug
because command is an Array and it can't be added to a String,
but ayway the early catch is cleaner error handling.)
Also add a TODO about a potential improvement for permission error handling.
Giuseppe Bilotta [Wed, 9 Jun 2021 07:32:10 +0000 (09:32 +0200)]
fix: webservice message user type
When the user logs in, m.source is already a botuser.
Giuseppe Bilotta [Wed, 9 Jun 2021 06:06:17 +0000 (08:06 +0200)]
Partial revert: reintroduce rbot-remote
It now interfaces with the webservice 'dispatch' feature
instead of the previous remotectl plugin, but the external API
remains the same, for compatibility with existing users.
Giuseppe Bilotta [Mon, 7 Jun 2021 15:31:21 +0000 (17:31 +0200)]
webhook: define number for watch/star actions too
When a star is added/removed, we get notified with a message
that has no number, title or link. The pseudo-sentence is also
very bare (X started/created/deleted, without an object).
Show the number of watchers and/or stars (as appropriate) to produce
a more meaningful phrase.
Giuseppe Bilotta [Fri, 4 Jun 2021 14:46:59 +0000 (16:46 +0200)]
bot: reorder fork sequence
We do the actual fork as the last step, after redirecting the
standard I/O streams. This also ensures that no log messages
are shown on console _after_ forking.
Giuseppe Bilotta [Fri, 4 Jun 2021 14:44:03 +0000 (16:44 +0200)]
logger: don't actually close the console logger
We nil the internal variable, but we should not close the logger itself,
since this leads to STDERR being closed and the interpreter reopening it
for its own needs, or something like that, which ultimately leads to
the interpreter's warning appearing in console (probably due to ruby
itself reopening stderr to be able to output the messages).
If we simply nil the variable, the interpreter is content with sending
us the messages per our shenanigangs, and everything works just as
expected.
Giuseppe Bilotta [Wed, 2 Jun 2021 19:31:20 +0000 (21:31 +0200)]
fix: write override behavior
IO.write() takes an arbitrary number of argumens, that are converted to string
and joined on write. We should behave the same way.
Moreover, the returned value is the number of bytes, and this is bytesize
in modern Ruby.
Giuseppe Bilotta [Wed, 2 Jun 2021 19:25:58 +0000 (21:25 +0200)]
fix: restore logging of session start/end
Giuseppe Bilotta [Wed, 2 Jun 2021 18:57:21 +0000 (20:57 +0200)]
logger: fix STDERR recursion
Overriding (as we should do) the standard error write method when
daemonizing introduces a recursion in the logger, due to the
persistent presence of the console logger.
The solution is obviously to stop logging on console
after daemonization.
Giuseppe Bilotta [Wed, 2 Jun 2021 17:47:53 +0000 (19:47 +0200)]
fix: stderr vs stdout write override
In
96d13521d the STDOUT/STDERR write overrides were replaced
by overrides to $stdout, but the second should have been to $stderr
(obviously).
Giuseppe Bilotta [Mon, 31 May 2021 11:43:20 +0000 (13:43 +0200)]
chucknorris: fix loading
There was an extra read.
Giuseppe Bilotta [Mon, 31 May 2021 10:49:40 +0000 (12:49 +0200)]
webhook: include target ref for pull/merge requests
Also add a TODO about a possible event-based output filter.
Giuseppe Bilotta [Mon, 31 May 2021 10:40:37 +0000 (12:40 +0200)]
webhook: typo preventing unwatch
Giuseppe Bilotta [Mon, 31 May 2021 06:57:21 +0000 (08:57 +0200)]
webhook: gitlab support
Giuseppe Bilotta [Sun, 30 May 2021 21:44:52 +0000 (23:44 +0200)]
new plugin: webhook
This plugin provides webhook support for GitHub and similar services,
through the webservice feature. Hosting services and output formats
can be customized through filters as usual.
Giuseppe Bilotta [Sun, 30 May 2021 19:32:02 +0000 (21:32 +0200)]
plugin(rss): fix config description
Giuseppe Bilotta [Sat, 29 May 2021 16:47:29 +0000 (18:47 +0200)]
fix: restart logger thread after fork
Logging was broken when daemonizing, due to the logger thread being dead
after the fork. This can be solved by restarting the thread, if necessary
when setting the log file (which we conveniently do right after the fork).
Giuseppe Bilotta [Sat, 29 May 2021 15:20:50 +0000 (17:20 +0200)]
fix: preserve loglevels across options and files
Giuseppe Bilotta [Thu, 20 Feb 2014 20:50:27 +0000 (21:50 +0100)]
Catch another non-standard error
Giuseppe Bilotta [Thu, 20 Feb 2014 20:49:00 +0000 (21:49 +0100)]
Properly quote salut-italian
Giuseppe Bilotta [Thu, 20 Feb 2014 20:06:10 +0000 (21:06 +0100)]
chucknorris: read gzip stream before passing it to YAML.load
Prevents errors about external_encoding not being defined for the gzip
stream in ruby 1.9+
Giuseppe Bilotta [Thu, 20 Feb 2014 20:02:35 +0000 (21:02 +0100)]
quiz: hint presentation fix for ruby 1.9+
Matthias Hecker [Wed, 26 May 2021 17:58:29 +0000 (19:58 +0200)]
Merge pull request #61 from ruby-rbot/dependabot/bundler/nokogiri-1.11.4
build(deps): bump nokogiri from 1.11.1 to 1.11.4
dependabot[bot] [Wed, 19 May 2021 16:04:50 +0000 (16:04 +0000)]
build(deps): bump nokogiri from 1.11.1 to 1.11.4
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.1 to 1.11.4.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.1...v1.11.4)
Signed-off-by: dependabot[bot] <support@github.com>
Matthias Hecker [Thu, 22 Apr 2021 19:01:28 +0000 (21:01 +0200)]
Merge pull request #59 from ruby-rbot/dependabot/bundler/mechanize-2.7.7
build(deps): bump mechanize from 2.7.6 to 2.7.7
Matthias Hecker [Thu, 22 Apr 2021 19:01:13 +0000 (21:01 +0200)]
Merge pull request #60 from ruby-rbot/dependabot/bundler/oauth-0.5.5
build(deps-dev): bump oauth from 0.5.4 to 0.5.5
dependabot[bot] [Thu, 22 Apr 2021 16:51:11 +0000 (16:51 +0000)]
build(deps-dev): bump oauth from 0.5.4 to 0.5.5
Bumps [oauth](https://github.com/oauth-xx/oauth-ruby) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/oauth-xx/oauth-ruby/releases)
- [Changelog](https://github.com/oauth-xx/oauth-ruby/blob/master/HISTORY)
- [Commits](https://github.com/oauth-xx/oauth-ruby/compare/v0.5.4...v0.5.5)
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Tue, 2 Feb 2021 23:13:38 +0000 (23:13 +0000)]
build(deps): bump mechanize from 2.7.6 to 2.7.7
Bumps [mechanize](https://github.com/sparklemotion/mechanize) from 2.7.6 to 2.7.7.
- [Release notes](https://github.com/sparklemotion/mechanize/releases)
- [Changelog](https://github.com/sparklemotion/mechanize/blob/master/CHANGELOG.rdoc)
- [Commits](https://github.com/sparklemotion/mechanize/compare/v2.7.6...v2.7.7)
Signed-off-by: dependabot[bot] <support@github.com>
Matthias Hecker [Thu, 9 Jul 2020 09:28:53 +0000 (11:28 +0200)]
Merge pull request #52 from ruby-rbot/dependabot/bundler/rack-2.2.3
build(deps): bump rack from 2.2.2 to 2.2.3
dependabot[bot] [Wed, 24 Jun 2020 18:06:05 +0000 (18:06 +0000)]
build(deps): bump rack from 2.2.2 to 2.2.3
Bumps [rack](https://github.com/rack/rack) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/v2.2.2...2.2.3)
Signed-off-by: dependabot[bot] <support@github.com>
Matthias Hecker [Sat, 25 Apr 2020 18:52:25 +0000 (20:52 +0200)]
plugin(imdb): fix title regex, closes #44
Matthias Hecker [Fri, 24 Apr 2020 20:56:04 +0000 (22:56 +0200)]
refactor: remove global bot instance, closes #42
Matthias Hecker [Fri, 24 Apr 2020 20:44:42 +0000 (22:44 +0200)]
plugin(keywords): remove export to file, see #42
Matthias Hecker [Thu, 23 Apr 2020 21:06:01 +0000 (23:06 +0200)]
plugin(factoids): use registry for storage see #42
Matthias Hecker [Wed, 22 Apr 2020 12:40:12 +0000 (14:40 +0200)]
ensures the path reported by gems does exists
Matthias Hecker [Mon, 20 Apr 2020 17:47:11 +0000 (19:47 +0200)]
plugin(quotes): use registry for storage see #42
Matthias Hecker [Mon, 20 Apr 2020 17:25:52 +0000 (19:25 +0200)]
plugin(alias): use registry for storage see #42
Matthias Hecker [Fri, 17 Apr 2020 21:13:32 +0000 (23:13 +0200)]
plugin(lart): fix not save before load
Matthias Hecker [Fri, 17 Apr 2020 21:11:35 +0000 (23:11 +0200)]
plugin(salut): use registry for storage see #42
Matthias Hecker [Thu, 16 Apr 2020 21:59:08 +0000 (23:59 +0200)]
plugin(lart): refactor to use registry to persist
see #42
Matthias Hecker [Thu, 16 Apr 2020 21:48:42 +0000 (23:48 +0200)]
core: sets plugin_path to loaded plugins
While loading a plugin in the manager using #load_botmodule_file this
will remember the directory of the file that is being loaded in
@next_plugin_path. In the plugin/BotModule initialization we set the
path in plugin_path of the plugin.
This was the only solution I could find to get this information in the
plugin. It is useful because this allows the plugin to know in which
directory it is located, it can then easily access data files stored
alongside the plugin.
Some built-in plugins (see #42) use the data/rbot/templates to copy
data files on bot load (see #repopulate_botclass_directory) into the
profile directory (~/.rbot/).
Matthias Hecker [Wed, 15 Apr 2020 18:26:54 +0000 (20:26 +0200)]
refactor: wordlist shouldn't use bot singleton #35
also related to #41 and #6
Matthias Hecker [Wed, 15 Apr 2020 17:56:48 +0000 (19:56 +0200)]
refactor: remove unused userdata module
I never saw a plugin use this feature besides wof, IRC user objects should not hold
persistent data like this, I rather have the IRC interface clean. The
general idea is a good though, especially easier per-channel, per-user
data persistence.
Matthias Hecker [Wed, 15 Apr 2020 17:55:32 +0000 (19:55 +0200)]
plugin(wheelfortune): remove botdata dependency
Matthias Hecker [Tue, 14 Apr 2020 18:11:06 +0000 (20:11 +0200)]
plugin(translator): removed google translate
yandex still works surprisingly enough
Matthias Hecker [Tue, 14 Apr 2020 17:50:36 +0000 (19:50 +0200)]
fix nick renaming during connection
Matthias Hecker [Tue, 14 Apr 2020 17:42:37 +0000 (19:42 +0200)]
refactor: httputil no longer core module see #38
This is intended to make testing/mocking of the http client easier.
Matthias Hecker [Tue, 14 Apr 2020 17:12:43 +0000 (19:12 +0200)]
httputil: remove obsolete version_1_2 declaration
Matthias Hecker [Tue, 14 Apr 2020 17:10:30 +0000 (19:10 +0200)]
remove obsolete require of net/https
Matthias Hecker [Tue, 14 Apr 2020 11:57:46 +0000 (13:57 +0200)]
readme: added build status image
Matthias Hecker [Mon, 13 Apr 2020 18:55:55 +0000 (20:55 +0200)]
plugin(oxford): fix empty service result see #37
Matthias Hecker [Mon, 13 Apr 2020 18:48:40 +0000 (20:48 +0200)]
plugin(points): forgot one special case, see #34
Tokens that include itself ++/-- are now ignored as well.
Matthias Hecker [Mon, 13 Apr 2020 18:40:11 +0000 (20:40 +0200)]
plugin(points): new message parser, see #34
Matthias Hecker [Mon, 13 Apr 2020 18:39:48 +0000 (20:39 +0200)]
message: add #thanks method, similar to okay
Matthias Hecker [Mon, 13 Apr 2020 18:07:02 +0000 (20:07 +0200)]
plugin(oxford): fix result handling, closes #37
Matthias Hecker [Sat, 11 Apr 2020 23:39:08 +0000 (01:39 +0200)]
plugin(points): disregard self after stripping color codes
Matthias Hecker [Sat, 11 Apr 2020 19:25:03 +0000 (21:25 +0200)]
plugin(points): strip/ignore some terms closes #34
- strip color/bold codes in terms
- ignore terms with ++/-- in them
Matthias Hecker [Fri, 10 Apr 2020 19:24:33 +0000 (21:24 +0200)]
plugin(hangman): fixes word generator closes #9
This now uses wordgenerator.net
Matthias Hecker [Thu, 9 Apr 2020 20:23:27 +0000 (22:23 +0200)]
plugin(oxford): moved to lexico.com, closes #13
Matthias Hecker [Wed, 8 Apr 2020 20:16:43 +0000 (22:16 +0200)]
fix: in-memory registry persist correctly
Matthias Hecker [Tue, 7 Apr 2020 17:57:49 +0000 (19:57 +0200)]
plugin(note): test cases added, closes #24
Matthias Hecker [Mon, 6 Apr 2020 19:08:55 +0000 (21:08 +0200)]
plugin(points): +/- must come after, closes #34
This modifies the karma/points plugin to ignore increment/
decrement suffixes. `--SOMETHING` is more trouble than its worth,
people will write --NAME as a signature, or paste a command
line argument, e.g. `ls --sort time` which causes issues.
I also added tests for the points plugin, the plan is
to make the plugin testing easier more "rubionic"
Matthias Hecker [Mon, 6 Apr 2020 18:20:32 +0000 (20:20 +0200)]
tests: mocked bot and messages added, added points tests
Matthias Hecker [Mon, 6 Apr 2020 18:19:50 +0000 (20:19 +0200)]
registry: add in-memory implementation for tests
Matthias Hecker [Mon, 6 Apr 2020 18:19:15 +0000 (20:19 +0200)]
fix: gettext updated each_textdomain > each_text_domains
Matthias Hecker [Fri, 3 Apr 2020 11:51:57 +0000 (13:51 +0200)]
plugin(search): fix wolfram and gdef, removed some
this removes gcount and gtime from the search plugin,
google no longer provides this information easily
Matthias Hecker [Thu, 2 Apr 2020 07:19:40 +0000 (09:19 +0200)]
plugin(search): fix search and gcalc, closes #28, #29
Matthias Hecker [Wed, 1 Apr 2020 13:48:02 +0000 (15:48 +0200)]
plugin(rot13): test assert added
Matthias Hecker [Tue, 31 Mar 2020 12:33:48 +0000 (14:33 +0200)]
test: rot13 simplified
Matthias Hecker [Tue, 31 Mar 2020 12:30:08 +0000 (14:30 +0200)]
refactor: logger moved away from ircbot (exp.)
This moves the logger management thread/queue to a seperate singleton.
It removes the explicit stopping/restarting of the logging thread since
the thread should behave like a daemon thread anyway.
Still needs to be tested to work in daemonize.
Matthias Hecker [Tue, 31 Mar 2020 12:28:55 +0000 (14:28 +0200)]
added simple dockerfile
Matthias Hecker [Tue, 31 Mar 2020 12:27:30 +0000 (14:27 +0200)]
test: fix shadowed test method
Matthias Hecker [Tue, 31 Mar 2020 12:25:58 +0000 (14:25 +0200)]
test: add gettext/unittest to gemfile
Matthias Hecker [Mon, 30 Mar 2020 21:55:28 +0000 (23:55 +0200)]
test: change db adapter to dbm
Matthias Hecker [Mon, 30 Mar 2020 21:46:19 +0000 (23:46 +0200)]
test: first plugin test added for rot13
Matthias Hecker [Sun, 29 Mar 2020 11:01:22 +0000 (13:01 +0200)]
test: optional registry adapter tests
Matthias Hecker [Sun, 29 Mar 2020 10:54:07 +0000 (12:54 +0200)]
ci: fix rake invocation in script
Matthias Hecker [Sun, 29 Mar 2020 10:47:45 +0000 (12:47 +0200)]
fix: plugins delegate disregarding all options given
Matthias Hecker [Sun, 29 Mar 2020 10:46:43 +0000 (12:46 +0200)]
test: small changes and fixes to existing tests
Matthias Hecker [Sun, 29 Mar 2020 10:45:59 +0000 (12:45 +0200)]
ci: add rake test command to script
Matthias Hecker [Sat, 28 Mar 2020 03:04:42 +0000 (04:04 +0100)]
added rake and updated Gemfile and Gemfile.lock
Matthias Hecker [Sat, 28 Mar 2020 02:55:57 +0000 (03:55 +0100)]
plugin(imdb): changed base url
Matthias Hecker [Sat, 28 Mar 2020 02:48:50 +0000 (03:48 +0100)]
ci: fix travis ci config
Matthias Hecker [Sat, 28 Mar 2020 02:44:08 +0000 (03:44 +0100)]
always log to stdout with debug flag
This makes it so the -d debug flag on the rbot
command line will always log to STDOUT, previously
it would just force the log level.
Matthias Hecker [Sat, 28 Mar 2020 02:10:10 +0000 (03:10 +0100)]
ci: add system dependencies to travis ci
Matthias Hecker [Sat, 28 Mar 2020 02:04:19 +0000 (03:04 +0100)]
plugin(script): remove deprecated $SAFE
closes #32
Matthias Hecker [Fri, 27 Mar 2020 21:32:01 +0000 (22:32 +0100)]
experiment with travis-ci setup
Matthias Hecker [Fri, 27 Mar 2020 21:31:25 +0000 (22:31 +0100)]
gem: support for newest ruby versions
Matthias Hecker [Fri, 27 Mar 2020 21:29:47 +0000 (22:29 +0100)]
deps: update dependencies
Matthias Hecker [Fri, 27 Mar 2020 20:00:16 +0000 (21:00 +0100)]
Merge pull request #30 from ruby-rbot/dependabot/bundler/nokogiri-1.10.9
Bump nokogiri from 1.6.1 to 1.10.9
Matthias Hecker [Fri, 27 Mar 2020 20:00:09 +0000 (21:00 +0100)]
Merge pull request #31 from ruby-rbot/dependabot/bundler/rack-1.6.13
Bump rack from 1.5.2 to 1.6.13
dependabot[bot] [Fri, 27 Mar 2020 19:58:49 +0000 (19:58 +0000)]
Bump rack from 1.5.2 to 1.6.13
Bumps [rack](https://github.com/rack/rack) from 1.5.2 to 1.6.13.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/1.5.2...1.6.13)
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Fri, 27 Mar 2020 19:58:47 +0000 (19:58 +0000)]
Bump nokogiri from 1.6.1 to 1.10.9
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.6.1 to 1.10.9.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.6.1...v1.10.9)
Signed-off-by: dependabot[bot] <support@github.com>
Matthias Hecker [Fri, 27 Mar 2020 19:58:41 +0000 (20:58 +0100)]
Merge pull request #2 from mroch/patch-1
Update markov.rb
Matthias Hecker [Fri, 27 Mar 2020 19:58:27 +0000 (20:58 +0100)]
Merge pull request #4 from ahpook/rename_karma
Rename and improve karma plugin
Matthias Hecker [Fri, 27 Mar 2020 19:58:16 +0000 (20:58 +0100)]
Merge pull request #27 from ohadlevy/gemspec-fixes
this enables to build again from gemspec