Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from huginn:master #30

Merged
merged 5 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,25 @@ IMPORT_DEFAULT_SCENARIO_FOR_ALL_USERS=true
# SMTP_AUTHENTICATION to login and the SMTP_PORT to 465.
#
# If you use a local SMTP server without authentication such as Postfix,
# SMTP_USER_NAME must be set to none or else you will receive
# errors that AUTH not enabled.
# set SMTP_AUTHENTICATON to `none`.

# Uncomment if you want to use `/usr/sbin/sendmail` to send email instead of SMTP.
# This option is ignored unless RAILS_ENV=production, and setting it to `sendmail` causes the settings in the rest of this section (except EMAIL_FROM_ADDRESS) to be ignored.
# SMTP_DELIVERY_METHOD=sendmail

SMTP_DOMAIN=your-domain-here.com
[email protected]
SMTP_PASSWORD=somepassword
SMTP_SERVER=smtp.gmail.com
SMTP_PORT=587
SMTP_AUTHENTICATION=plain
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_SSL=false

SMTP_AUTHENTICATION=plain
# [email protected]
# SMTP_PASSWORD=somepassword

# or without authentication:
# SMTP_AUTHENTICATION=none

# Set to true to send real emails via SMTP when running in the development Rails environment.
# Set to false to have emails intercepted in development and displayed at http://localhost:3000/letter_opener
SEND_EMAIL_IN_DEVELOPMENT=false
Expand Down
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

| DateOfChange | Changes |
|----------------|--------------------------------------------------------------------------------------------------------------|
| May 01, 2024 | Web requesting agents can handle invalid characters by replacing them with U+FFFD. [#3336](https://github.com/huginn/huginn/pull/3336) |
| May 01, 2024 | Allow setting ActionMailer read and open timeouts. [#3361](https://github.com/huginn/huginn/pull/3361) |
| May 01, 2024 | Add support for `ttl` and `monospace` to PushoverAgent. [#3389](https://github.com/huginn/huginn/pull/3389) |
| Apr 30, 2024 | Use unicorn (instead of webrick) in production. [#3387](https://github.com/huginn/huginn/pull/3387) |
| Nov 19, 2023 | Use Pirate Weather with the WeatherAgent. [#3317](https://github.com/huginn/huginn/pull/3317) |
| Jul 17, 2023 | Add a new option to DelayAgent: `emit_interval`. [#3301](https://github.com/huginn/huginn/pull/3301) |
| Jul 16, 2023 | New Liquid filter: `fromjson`. [#3298](https://github.com/huginn/huginn/pull/3298) |
| Jul 10, 2023 | DelayAgent can sort buffered events with user-given sort keys when emitting them. [#3294](https://github.com/huginn/huginn/pull/3294) |
| Jul 04, 2023 | Agent show page shows controller agents. [#3290](https://github.com/huginn/huginn/pull/3290) |
| Jul 02, 2023 | PostAgent can parse a JSON body when the `parse_body` is set to true. [#3287](https://github.com/huginn/huginn/pull/3287) |
| Jun 27, 2023 | TriggerAgent allows an empty string value in a rule. [#3284](https://github.com/huginn/huginn/pull/3284) |
| Jun 27, 2023 | New Liquid features: the `hex_encode` and `hex_decode` filters and `uuidv4` tag. [#3285](https://github.com/huginn/huginn/pull/3285) |
| Jun 23, 2023 | JavaScriptAgent can access storage provided by KeyValueStoreAgent via `this.kvs`. [#3280](https://github.com/huginn/huginn/pull/3280) |
| Jun 18, 2023 | Add Re-emit and Delete buttons to the event show page. [#3276](https://github.com/huginn/huginn/pull/3276) |
| Jun 07, 2023 | Upgrade various gems that have been out-of-date for a long time. [#3216](https://github.com/huginn/huginn/pull/3216) |
| May 09, 2023 | Upgrade Ruby to 3.2 after 2.7 reached its end of life. Migrate from CoffeeScript to JavaScript. [#3216](https://github.com/huginn/huginn/pull/3216) |
Expand Down
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ gem 'net-ftp'
gem 'net-ftp-list' # FtpsiteAgent
gem 'rturk', '~> 2.12.1' # HumanTaskAgent
gem 'slack-notifier', '~> 1.5.1' # SlackAgent
gem 'twilio-ruby', '~> 5.77.0' # TwilioAgent
gem 'twilio-ruby', '~> 7.2.2' # TwilioAgent
gem 'xmpp4r', '~> 0.5.6' # JabberAgent

# Weibo Agents
Expand Down Expand Up @@ -90,7 +90,7 @@ end
gem 'ace-rails-ap'
gem 'bootsnap', require: false
gem 'bootstrap-kaminari-views', '~> 0.0.5'
gem 'bundler', '>= 2.5.10'
gem 'bundler', '>= 2.5.14'
gem 'coffee-rails', '~> 5'
gem 'daemons', '~> 1.4.1'
gem 'delayed_job'
Expand Down Expand Up @@ -118,9 +118,9 @@ gem 'loofah', '~> 2.22'
gem 'mail', '>= 2.8.1'
gem 'mini_magick', ">= 4.12.0"
gem 'multi_xml'
gem "nokogiri", ">= 1.16.5"
gem "nokogiri", ">= 1.16.6"
gem 'omniauth'
gem 'rails', '~> 6.1.7', '>= 6.1.7.7'
gem 'rails', '~> 6.1.7', '>= 6.1.7.8'
gem 'rails-html-sanitizer', '~> 1.6'
gem 'rufus-scheduler', '~> 3.9', '>= 3.9.1', require: false
gem 'sass-rails', '>= 6.0'
Expand Down
136 changes: 68 additions & 68 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,60 +101,60 @@ GEM
remote: https://rubygems.org/
specs:
ace-rails-ap (4.5)
actioncable (6.1.7.7)
actionpack (= 6.1.7.7)
activesupport (= 6.1.7.7)
actioncable (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.1.7.7)
actionpack (= 6.1.7.7)
activejob (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
actionmailbox (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
mail (>= 2.7.1)
actionmailer (6.1.7.7)
actionpack (= 6.1.7.7)
actionview (= 6.1.7.7)
activejob (= 6.1.7.7)
activesupport (= 6.1.7.7)
actionmailer (6.1.7.8)
actionpack (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activesupport (= 6.1.7.8)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.1.7.7)
actionview (= 6.1.7.7)
activesupport (= 6.1.7.7)
actionpack (6.1.7.8)
actionview (= 6.1.7.8)
activesupport (= 6.1.7.8)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.1.7.7)
actionpack (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
actiontext (6.1.7.8)
actionpack (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
nokogiri (>= 1.8.5)
actionview (6.1.7.7)
activesupport (= 6.1.7.7)
actionview (6.1.7.8)
activesupport (= 6.1.7.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.7.7)
activesupport (= 6.1.7.7)
activejob (6.1.7.8)
activesupport (= 6.1.7.8)
globalid (>= 0.3.6)
activemodel (6.1.7.7)
activesupport (= 6.1.7.7)
activerecord (6.1.7.7)
activemodel (= 6.1.7.7)
activesupport (= 6.1.7.7)
activestorage (6.1.7.7)
actionpack (= 6.1.7.7)
activejob (= 6.1.7.7)
activerecord (= 6.1.7.7)
activesupport (= 6.1.7.7)
activemodel (6.1.7.8)
activesupport (= 6.1.7.8)
activerecord (6.1.7.8)
activemodel (= 6.1.7.8)
activesupport (= 6.1.7.8)
activestorage (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activesupport (= 6.1.7.8)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.7.7)
activesupport (6.1.7.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -445,7 +445,7 @@ GEM
json (2.7.2)
jsonpath (1.1.5)
multi_json
jwt (2.8.1)
jwt (2.8.2)
base64
kaminari (1.2.2)
activesupport (>= 4.1.0)
Expand Down Expand Up @@ -507,15 +507,15 @@ GEM
rake
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.6)
mini_portile2 (2.8.7)
mini_racer (0.6.3)
libv8-node (~> 16.10.0.0)
minitest (5.22.3)
mqtt (0.6.0)
msgpack (1.7.2)
multi_json (1.15.0)
multi_xml (0.6.0)
multipart-post (2.4.0)
multipart-post (2.4.1)
mysql2 (0.5.6)
naught (1.1.0)
nenv (0.3.0)
Expand All @@ -537,16 +537,16 @@ GEM
net-ssh (7.1.0)
netrc (0.11.0)
nio4r (2.7.1)
nokogiri (1.16.5)
nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.5-aarch64-linux)
nokogiri (1.16.6-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.5-arm64-darwin)
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-darwin)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
Expand Down Expand Up @@ -606,7 +606,7 @@ GEM
puma (6.4.2)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.7.3)
racc (1.8.0)
rack (2.2.9)
rack-livereload (0.5.1)
rack
Expand All @@ -615,20 +615,20 @@ GEM
rack (~> 2.2, >= 2.2.4)
rack-test (2.1.0)
rack (>= 1.3)
rails (6.1.7.7)
actioncable (= 6.1.7.7)
actionmailbox (= 6.1.7.7)
actionmailer (= 6.1.7.7)
actionpack (= 6.1.7.7)
actiontext (= 6.1.7.7)
actionview (= 6.1.7.7)
activejob (= 6.1.7.7)
activemodel (= 6.1.7.7)
activerecord (= 6.1.7.7)
activestorage (= 6.1.7.7)
activesupport (= 6.1.7.7)
rails (6.1.7.8)
actioncable (= 6.1.7.8)
actionmailbox (= 6.1.7.8)
actionmailer (= 6.1.7.8)
actionpack (= 6.1.7.8)
actiontext (= 6.1.7.8)
actionview (= 6.1.7.8)
activejob (= 6.1.7.8)
activemodel (= 6.1.7.8)
activerecord (= 6.1.7.8)
activestorage (= 6.1.7.8)
activesupport (= 6.1.7.8)
bundler (>= 1.15.0)
railties (= 6.1.7.7)
railties (= 6.1.7.8)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -641,9 +641,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.7.7)
actionpack (= 6.1.7.7)
activesupport (= 6.1.7.7)
railties (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand Down Expand Up @@ -801,7 +801,7 @@ GEM
trailblazer-option (0.1.2)
treetop (1.6.12)
polyglot (~> 0.3)
twilio-ruby (5.77.0)
twilio-ruby (7.2.2)
faraday (>= 0.9, < 3.0)
jwt (>= 1.5, < 3.0)
nokogiri (>= 1.6, < 2.0)
Expand Down Expand Up @@ -858,7 +858,7 @@ DEPENDENCIES
binding_of_caller
bootsnap
bootstrap-kaminari-views (~> 0.0.5)
bundler (>= 2.5.10)
bundler (>= 2.5.14)
capistrano
capistrano-bundler
capistrano-rails
Expand Down Expand Up @@ -912,7 +912,7 @@ DEPENDENCIES
mysql2 (~> 0.5, >= 0.5.6)
net-ftp
net-ftp-list
nokogiri (>= 1.16.5)
nokogiri (>= 1.16.6)
omniauth
omniauth-dropbox-oauth2!
omniauth-evernote
Expand All @@ -923,7 +923,7 @@ DEPENDENCIES
pirate_weather_forecast_ruby
puma
rack-livereload
rails (~> 6.1.7, >= 6.1.7.7)
rails (~> 6.1.7, >= 6.1.7.8)
rails-controller-testing
rails-html-sanitizer (~> 1.6)
rb-kqueue (>= 0.2.8)
Expand Down Expand Up @@ -952,7 +952,7 @@ DEPENDENCIES
sprockets
terser
tumblr_client (~> 0.8.6)!
twilio-ruby (~> 5.77.0)
twilio-ruby (~> 7.2.2)
twitter!
twitter-stream!
typhoeus (~> 1.4.1)
Expand All @@ -971,4 +971,4 @@ RUBY VERSION
ruby 3.2.4p170

BUNDLED WITH
2.5.10
2.5.14
37 changes: 22 additions & 15 deletions config/initializers/action_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
ActionMailer::Base.smtp_settings = {
address: ENV['SMTP_SERVER'] || "smtp.gmail.com",
port: ENV['SMTP_PORT'] || 587,
domain: ENV['SMTP_DOMAIN'],
authentication: ENV['SMTP_AUTHENTICATION'] == 'none' ? nil : ENV['SMTP_AUTHENTICATION'] || "plain",
enable_starttls_auto: ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true',
ssl: ENV['SMTP_SSL'] == 'true',
user_name: ENV['SMTP_USER_NAME'] == 'none' ? nil : ENV['SMTP_USER_NAME'].presence,
password: ENV['SMTP_USER_NAME'] == 'none' ? nil : ENV['SMTP_PASSWORD'].presence,
openssl_verify_mode: ENV['SMTP_OPENSSL_VERIFY_MODE'].presence,
ca_path: ENV['SMTP_OPENSSL_CA_PATH'].presence,
ca_file: ENV['SMTP_OPENSSL_CA_FILE'].presence,
read_timeout: ENV['SMTP_READ_TIMEOUT']&.to_i,
open_timeout: ENV['SMTP_OPEN_TIMEOUT']&.to_i,
}
ActionMailer::Base.smtp_settings = {}.tap { |config|
config[:address] = ENV['SMTP_SERVER'] || 'smtp.gmail.com'
config[:port] = ENV['SMTP_PORT']&.to_i || 587
config[:domain] = ENV['SMTP_DOMAIN']

authentication = ENV['SMTP_AUTHENTICATION'].presence || 'plain'
user_name = ENV['SMTP_USER_NAME'].presence || 'none'

if authentication != 'none' && user_name != 'none'
config[:authentication] = authentication
config[:user_name] = user_name
config[:password] = ENV['SMTP_PASSWORD'].presence
end

config[:enable_starttls_auto] = ENV['SMTP_ENABLE_STARTTLS_AUTO'] == 'true'
config[:ssl] = ENV['SMTP_SSL'] == 'true'
config[:openssl_verify_mode] = ENV['SMTP_OPENSSL_VERIFY_MODE'].presence
config[:ca_path] = ENV['SMTP_OPENSSL_CA_PATH'].presence
config[:ca_file] = ENV['SMTP_OPENSSL_CA_FILE'].presence
config[:read_timeout] = ENV['SMTP_READ_TIMEOUT']&.to_i
config[:open_timeout] = ENV['SMTP_OPEN_TIMEOUT']&.to_i
}
Loading