Commit Graph

72 Commits

Author SHA1 Message Date
Ryuta Kamizono
cc27e9988f Unify to use 4 spaces indentation in CHANGELOGs [ci skip]
Especially, somehow `CHANGELOG.md` in actiontext and activestorage in
master branch had used 3 spaces indentation.
2019-06-05 05:53:49 +09:00
yuuji.yaginuma
d380ffe216 Remove frozen_string_literal magic comment from template file
The other template files do not add `frozen_string_literal`, so should
behave the same.

Ref: #30342, #30348.
2019-05-29 08:00:59 +09:00
James Dabbs
937f7d582e Add CHANGELOG entry 2019-05-09 13:34:21 -07:00
James Dabbs
9ce8156c93 Delegate to the correct method in ActionMailbox.mailbox_for 2019-05-05 12:09:32 -07:00
James Dabbs
80af2c5831 Rename variable to represent type
per comments from CR
2019-05-05 10:29:31 -07:00
James Dabbs
9f96d094a3 Expose mailbox_for method
Currently, the only exposed entry point into the ApplicationMailbox's configured
routing system is to call `route`, which performs a lot of work to fully
`process` inbound email. It'd be nice to have a way (e.g. in test) of checking
which mailbox an email would route to without necessarily processing it yet.
2019-05-04 10:53:08 -07:00
Rafael Mendonça França
9834be6565
Start Rails 6.1 development 2019-04-24 15:57:14 -04:00
George Claghorn
f480cfabcd
Remove the Amazon SES ingress
It's unusable and not ready to ship in Rails 6.0. We'll rewrite it for 6.1.
2019-04-14 12:15:54 -04:00
yuuji.yaginuma
1b2f1735e7 Fix loading ActionMailbox::BaseController when CSRF protection is disabled
When `default_protect_from_forgery` is false, `verify_authenticity_token`
callback does not define and `skip_forgery_protection` raise exception.

Fixes #34837.
2019-04-11 18:25:09 +09:00
Kyle Zhao
4a9f2a746e FIX: ActionMailbox test helper argument list
`receive_inbound_email_from_source` should accept an argument list
(`*args`) instead, to allow for the `source` argument in
`create_inbound_email_from_source`.

```ruby
receive_inbound_email_from_source(source, status: :processing)
```

Accepting a keyword argument list (`**kwargs`) results in an
`ArgumentError`

```text
ArgumentError: wrong number of arguments (given 1, expected 0)
```
2019-04-09 00:43:53 -04:00
Fumiaki MATSUSHIMA
61c4be4777 Output junit format test report 2019-04-04 14:34:46 +09:00
Ryuta Kamizono
b89a3e7e63 Tweaks CHANGELOGs and docs [ci skip]
* add leading `#` before `=>` since hash rocket is valid Ruby code
* add backticks
* remove trailing spaces
* and more
2019-03-31 08:38:37 +09:00
eileencodes
c932850ef2 Add secret token for action mailbox tests
We need to create a secret token in the application so that the travis
build doesn't error when trying to create a file in the tmp directory.

Fixes https://travis-ci.org/rails/rails/jobs/505908163#L6811
2019-03-13 16:35:24 -04:00
eileencodes
a2bd669ed2 v6.0.0.beta3 release
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEEvJkGf0BARV+D0L2ulxXUSC76N8FAlyJN4cACgkQulxXUSC7
 6N9ZXAf/Wx7edIct8kZzcC6irlROx4DzpNbrrH792sO1OAcnoFDE7DPkokllTEP/
 4kzC42lca/XG27MCl7E0dtVD8hIyAl89nxid6cwKFVZVTPIRVc1wjXkoiWy/cvd7
 6+9IjxhlgrzxGnw3aWZJG7H3iqz69yr55aoSDU/TbMqq5kQrqNF95vr2nc8LEUco
 SLQj0pO/tfJdHquSeX0JiXn3VSEHT+5TdLGQ3J/w0wFU6mkecH4MJMJvMwLFx/v4
 llnvF6HyfSLASWbrpdD3h6MQHpImDoee5vILXAHzPdSaEVcVa1cDFtMcPMYiu8Dw
 AGdCAaHQhZFFGoYK472+o6pur0dxEA==
 =5dET
 -----END PGP SIGNATURE-----

Merge tag 'v6.0.0.beta3'

v6.0.0.beta3 release
2019-03-13 13:11:10 -04:00
eileencodes
7c87fd5635 Prep release
* Update RAILS_VERSION
* Bundle
* rake update_versions
* rake changelog:header
2019-03-11 11:58:15 -04:00
Ryuta Kamizono
b7fa01bb2f
Merge pull request #35529 from abhaynikam/35492-follow-up-to-updates-links-to-https
Updated links from http to https in guides, docs, etc
2019-03-09 20:49:27 +09:00
Abhay Nikam
476abd403b Updated links from http to https in guides, docs, etc 2019-03-09 16:43:47 +05:30
Sharang Dashputre
bf87dae202 Upgrade webpack-dev-server version in test apps 2019-03-09 03:35:22 +05:30
Sharang Dashputre
8eaffa1945 Use the latest stable release of webpacker 2019-03-09 00:14:17 +05:30
Rafael Mendonça França
5e6e505083
Preparing for 6.0.0.beta2 release 2019-02-25 17:45:04 -05:00
George Claghorn
ef602f8892 Fix preparing the configured Action Mailbox ingress in production
When reloading is disabled, after_initialize hooks run after to_prepare hooks have already run for the last time. Since to_prepare hooks always run after application initializers, we don't need need to use an after_initialize hook.
2019-02-18 11:50:50 -05:00
Ryuta Kamizono
da5843436b SQLite3: Implement add_foreign_key and remove_foreign_key
I implemented Foreign key create in `create_table` for SQLite3 at
#24743. This follows #24743 to implement `add_foreign_key` and
`remove_foreign_key`.
Unfortunately SQLite3 has one limitation that
`PRAGMA foreign_key_list(table-name)` doesn't have constraint name.
So we couldn't implement find/remove foreign key by name for now.

Fixes #35207.
Closes #31343.
2019-02-11 14:15:16 +09:00
Pratik
d0037daa37 Allow skipping incineration of processed emails 2019-02-06 19:28:49 -05:00
Ryuta Kamizono
1745e905a3 Allow changing text and blob size without giving the limit option
In MySQL, the text column size is 65,535 bytes by default (1 GiB in
PostgreSQL). It is sometimes too short when people want to use a text
column, so they sometimes change the text size to mediumtext (16 MiB) or
longtext (4 GiB) by giving the `limit` option.

Unlike MySQL, PostgreSQL doesn't allow the `limit` option for a text
column (raises ERROR: type modifier is not allowed for type "text").
So `limit: 4294967295` (longtext) couldn't be used in Action Text.

I've allowed changing text and blob size without giving the `limit`
option, it prevents that migration failure on PostgreSQL.
2019-01-29 06:49:32 +09:00
Ryuta Kamizono
b8baa15adb Revert "Apply t.timestamps changes in Action Text and Action Mailbox"
This reverts commit 30f666f87ab873258b797b39f29cf852f7621bea.
2019-01-29 06:37:42 +09:00
Ryuta Kamizono
30f666f87a Apply t.timestamps changes in Action Text and Action Mailbox
Follow up #34956.
2019-01-29 04:59:36 +09:00
Ryuta Kamizono
57015cdfa2 Make t.timestamps with precision by default 2019-01-26 22:49:14 +09:00
alkesh26
97909ddcf2 Changed webserver to web server. 2019-01-22 21:11:03 +05:30
alkesh26
b8e0333845 enclosing body tag in conductor layout. 2019-01-20 00:58:06 +05:30
George Claghorn
aac4d7f6ff Check all provided attributes of the message 2019-01-19 11:49:50 -05:00
Yuichi Takeuchi
88453093d5 Fix that adding attachments lose a body 2019-01-19 23:28:41 +09:00
Rafael Mendonça França
5a0230c67f
Preparing for 6.0.0.beta1 release 2019-01-18 15:42:12 -05:00
Ryuta Kamizono
db077e8090 Allow using Action Mailbox on MySQL 5.5
Active Record still support MySQL 5.5 which doesn't support datetime
with precision.

9e34df0003/activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb (L99-L101)

So we should check `supports_datetime_with_precision?` on the
connection.
2019-01-18 07:04:08 +09:00
Pratik Naik
57cb8d7924 Use create_and_extract_message_id! to create an inbound email.
This makes sure the created email has checksum and message id columns set.
2019-01-17 14:19:37 -06:00
Pratik Naik
a823b7d56f Specify a name for [ message_id, message_checksum ] index to ensure the name does not exceed the limit.
Also, update test schema to reflect the recent changes.
2019-01-17 14:14:45 -06:00
Pratik Naik
5cd733a334 Ensure Action Mailbox processes an email only once when received multiple times
This also adds a new column, message_checksum, to the action_mailbox_inbound_emails table
for storing SHA1 digest of the email source. Additionally, it makes generating the missing
message id deterministic and adds a unique index on message_checksum and message_id to
detect duplicate emails.
2019-01-17 11:13:40 -06:00
colorbox
620ba4c12a Fix document formatting on ActionMailbox [ci skip]
Use `+` instead of backquote.
2019-01-17 01:10:21 +09:00
ikepon
6c156d4f6e Add 'null: false' to Action Mailbox table
created_at and updated_at columns in Action Mailbox table aren't intended nullable.
2019-01-16 15:40:15 +09:00
George Claghorn
512b5316dd
Add Exim and Qmail support to Action Mailbox 2019-01-12 21:38:26 -05:00
George Claghorn
9edc84cdfa Add Postmark to the ingress lists [ci skip] 2019-01-10 11:04:54 -05:00
George Claghorn
7aaf9b8076 Tweak Postmark ingress docs [ci skip] 2019-01-09 22:23:51 -05:00
George Claghorn
3c10edcfaf
Merge pull request #34908 from robzolkos/fix-actionmailbox-json
Bring in all of aws-sdk-sns if using Amazon ingress
2019-01-09 19:20:57 -05:00
Tomek Maszkowski
b77d2d9a03 Added Postmark ingress support 2019-01-09 18:00:27 -05:00
Rob Zolkos
fb5c07525f Bring in all of aws-sdk-sns if using Amazon ingress
Requiring _just_ the `Aws::SNS::MessageVerifier` does not work as it
references other classes in the AWS SDK that are not in this one class.

Bringing in the entire SNS SDK verifies the authenticity correctly.
2019-01-09 17:16:08 -05:00
Kevin Solorio
ce90ded4ca add new frameworks to tasks/release.rb
The Frameworks collection was missing actiontext and actionmailbox,
this would mean they are skipped when running any tasks that
iterated through this collection

changes include

Breaking up frameworks declaration into multiple lines and put
them in order. This should make adding to the list easier and
if you need to scan it, they will be in order you would expect

Add `package` task to both actiontext and actionmailbox
2019-01-08 10:36:33 -08:00
Lachlan Sylvester
0419bc3504 add attachments to the new inbound mail 2019-01-07 10:56:41 +11:00
bogdanvlviv
67a9a86b1d
Test actiontext on Rails 6.0
- config.load_defaults 6.0 in the dummy app and
  fix the test since by default rails 6.0 configured
  does not generate "utf8" hidden input, see #32125
- Use `ActiveRecord::Migration[6.0]` in the dummy app
  since actiontext will be since Rails 6.0
- Fix `CreateActiveStorageTables` migration in the dummy app.
  Add `t.foreign_key :active_storage_blobs, column: :blob_id`
  It was added in 2ae3a29508e.
- `rails/actiontext$ yarn install`
2019-01-05 15:24:27 +02:00
George Claghorn
d9630c4815 s/Active Mailbox/Action Mailbox/ [ci skip] 2019-01-01 16:43:07 -05:00
George Claghorn
5bb8f3ae67 Fix links in ingress docs [ci skip] 2019-01-01 08:16:38 -05:00
George Claghorn
9adc2aa303 Exclude ActionMailbox::Base#perform_processing and #finished_processing? from API docs 2019-01-01 07:34:20 -05:00