Peter Zhu
d0ed8305ae
Add test for content type in direct upload to Azure
2019-08-09 14:54:09 -04:00
Gannon McGibbon
7fd006de0b
Pass optional record in blob finder methods
...
Allow record to be optionally passed to blob finders to make sharding
easier.
2019-08-07 14:38:05 -04:00
Peter Zhu
ebedf0a6c0
Update azure-storage gem to latest version
2019-08-06 16:02:42 -04:00
Rafael Mendonça França
967beb7229
Revert "MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now"
...
This reverts commit 98d0f7ebd34b858f12a12dcf37ae54fdbb5cab64.
2019-08-02 00:24:21 -04:00
Akira Matsuda
98d0f7ebd3
MethodCallAssertions is a regular player of the team ActiveSupport::TestCase now
...
It's used everywhere, clean and mature enough
2019-08-02 05:36:15 +09:00
Akira Matsuda
530f7805ed
It may be better to explicitly require 'object/try' where we call try
...
In most cases it works now without explicit require because it's accidentally required through
active_support/core_ext/date_and_time/calculations.rb where we still call `try`,
but that would stop working if we changed the Calculations implementation and remove the require call there.
2019-08-01 18:51:51 +09:00
Gannon McGibbon
388e011b08
Merge pull request #36792 from peterzhu2118/azure-content-disposition
...
Upload filename and disposition for Azure
2019-07-31 18:44:58 -04:00
Peter Zhu
24ae11daae
Upload file with filename and disposition for Azure
2019-07-31 15:44:40 -04:00
Gannon McGibbon
4b65173479
Merge pull request #36791 from peterzhu2118/s3-upload-disposition
...
Upload with filename and disposition for S3
2019-07-31 12:55:00 -04:00
Peter Zhu
e6d2e8bf9b
Upload file with filename and disposition for S3
2019-07-31 09:54:51 -04:00
Akira Matsuda
0d981a2b3d
Let the generated initializers/backtrace_silencers.rb code use Regexp#match?
2019-07-29 14:21:30 +09:00
Ershad Kunnakkadan
5fa6841028
Use a smaller TIFF file as fixture
2019-07-27 23:08:49 +05:30
Eileen M. Uchitelle
dc7b650e15
Merge pull request #36715 from peterzhu2118/azure-content-type
...
Add content_type to upload method for Azure
2019-07-24 15:13:23 -04:00
Peter Zhu
094fa9277d
Add content_type to upload in Azure
2019-07-24 14:56:20 -04:00
Rafael França
fc175375e1
Merge pull request #36642 from wagenet/fix-disk-service-host
...
Fix host for ActiveStorage DiskService
2019-07-23 10:37:47 -04:00
Gannon McGibbon
3cf65bcb8e
Make Active Storage routes optional
...
Add configuration option to turn off drawing of Active Storage routes.
2019-07-22 12:35:04 -04:00
George Claghorn
400b210354
Preserve existing attachment assignment behavior for upgraded apps
...
Assigning to a collection of attachments appends rather than replacing, as in 5.2. Existing 5.2 apps that rely on this behavior will no longer break when they're upgraded to 6.0.
For apps generated on 6.0 or newer, assigning replaces the existing attachments in the collection. #attach should be used to add new attachments to the collection without removing existing ones.
I expect that we'll deprecate the old behavior in 6.1.
Closes #36374 .
2019-07-20 06:33:11 -04:00
Ryuta Kamizono
559ffacfd9
Revert "Merge pull request #36676 from wjessop/change_activestorage_metadata_duration_to_bound"
...
This reverts commit a307c697b28e3c8b2860d2274c23e4d95dc164ae, reversing
changes made to f30f76af747858826d3618866676cd5a4979e64a.
Reason: This assertion is not failed even without this PR since both
ffprobe versions (3.2.14 and 4.1.3) return the same duration 5.166648
for `video.mp4`.
So there is no need to touch this assertion at this point.
2019-07-17 09:59:03 +09:00
Will Jessop
564fd87b99
Different versions of ffprobe can return subtly different video lengths
...
Specify a range so we can take this into account, but not get caught out by 0, nil or way too large values.
2019-07-14 14:09:01 +01:00
Ryuta Kamizono
88cbe13741
Fix activestorage CI failure due to ffprove version differece
...
Our CI environment is upgraded from stretch to buster then ffprove
version is also upgraded from 3.2.14 to 4.1.3.
https://packages.debian.org/stretch/ffmpeg
https://packages.debian.org/buster/ffmpeg
Somehow those ffprove returns different metadata for
`rotated_video.mp4`.
```
$ ffprobe -print_format json -show_streams -v error rotated_video.mp4 > ffprobe41.json
$ diff -ub ffprobe32.json ffprobe41.json
--- ffprobe32.json 2019-07-14 20:02:13.000000000 +0900
+++ ffprobe41.json 2019-07-14 19:59:08.000000000 +0900
@@ -27,8 +27,8 @@
"time_base": "1/17594",
"start_pts": 3976,
"start_time": "0.225986",
- "duration_ts": 91981,
- "duration": "5.227975",
+ "duration_ts": 88000,
+ "duration": "5.001705",
"bit_rate": "321546",
"bits_per_raw_sample": "8",
"nb_frames": "44",
@@ -78,8 +78,8 @@
"time_base": "1/44100",
"start_pts": 0,
"start_time": "0.000000",
- "duration_ts": 227865,
- "duration": "5.167007",
+ "duration_ts": 227850,
+ "duration": "5.166667",
"bit_rate": "109732",
"max_bit_rate": "109732",
"nb_frames": "223",
```
In the case on the `test "analyzing a rotated video"`, most important
part is `assert_equal 90, metadata[:angle]`, the accidental difference
of duration for ffprove version is out of scope for the test.
2019-07-14 20:06:41 +09:00
Peter Wagenet
b07ce56a38
Fix host for ActiveStorage DiskService
...
Previous behavior would only set host, which didn't work correctly
if the default_url_options contained the protocol or the port.
2019-07-09 12:54:35 -07:00
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
George Claghorn
5ce1f66d7a
Add a changelog entry for 165785e
2019-05-30 22:33:29 -04:00
George Claghorn
165785e8cf
Skip image analysis on ImageMagick error
2019-05-30 18:20:55 -04:00
Matt Tanous
f002be148e
Add :allow_nil option to delegate_missing_to; use in ActiveStorage
...
attachment
2019-05-23 12:11:39 -04:00
George Claghorn
d5a2f7ec14
Mirror direct uploads
2019-05-22 15:07:35 -04:00
George Claghorn
9c5135ce6a
S3: permit uploading files larger than 5 GB
...
Use multipart uploads for files larger than 100 MB. Dynamically calculate part size based on total object size and maximum part count.
2019-05-16 10:58:33 -04:00
George Claghorn
3d70e96097
Remove outdated cross-origin redirection tests
2019-05-15 15:57:45 -04:00
George Claghorn
5f50f4d63b
Inline anemic methods
2019-05-15 15:53:43 -04:00
George Claghorn
61b2f3d336
Halve string allocations in S3 streaming and partial downloads
...
See 19770d6.
2019-04-26 08:14:06 -04:00
Rafael Mendonça França
9834be6565
Start Rails 6.1 development
2019-04-24 15:57:14 -04:00
Ryuta Kamizono
3a4aa49256
Fix markup in CHANGELOGs [ci skip]
...
Need to new line to break line in the markdown.
2019-04-25 03:19:15 +09:00
Sharang Dashputre
71ca83786e
Update changelog for a bug-fix to read better [ci skip]
2019-04-24 18:17:39 +05:30
Guilherme Mansur
6133dad869
Don't fail ImageAnalyzer on unsupported types
...
Fix : #36065
The IamgeAnalyzer passes a image to ImageMagick without checking if the
image is supported by ImageMagick. This patch checks that image is
supported and if not logs an error and returns an empty hash instead of
raising an error. This is the same error handling we do when we
encounter a LoadError when mini_magick is not installed.
2019-04-24 07:59:12 -04:00
George Claghorn
a89e9cccb2
Merge pull request #36045 from yfxie/fix-normalize-the-hash-of-transformations
...
ActiveStorage - normalize the hash of transformations
2019-04-21 16:07:54 -04:00
Younes SERRAJ
bcf370d689
Allow ActiveStorage to generate variants of BMP images
2019-04-21 19:07:22 +02:00
Yi Feng
6be1446fc7
normalize the hash of transformations
2019-04-20 18:05:58 +08:00
Fumiaki MATSUSHIMA
61c4be4777
Output junit format test report
2019-04-04 14:34:46 +09:00
Sharang Dashputre
771973c13d
url -> URL where apt except inside actionpack/
2019-04-01 22:56:35 +05:30
George Claghorn
7c5814c6e0
Revert "Add ActiveStorage.service_configurations and ActiveStorage.service"
...
This reverts commit 002684e36e813469c3585e193f0698784c88278b.
2019-03-31 19:23:11 -04:00
George Claghorn
002684e36e
Add ActiveStorage.service_configurations and ActiveStorage.service
...
* Allow plugins to access the global service and alternative service configs before ActiveStorage::Blob loads.
* Make ActiveStorage.service_configurations the default second argument to ActiveStorage::Service.configure. Plugins that just want to use an alternative service defined in config/storage.yml needn't pass in the config themselves.
2019-03-31 07:46:18 -04:00
George Claghorn
197fe2222e
Require railties for all Active Storage dependencies
2019-03-30 10:03:41 -04:00
George Claghorn
11d66a8e4c
Specify Active Storage's dependency on Active Job
2019-03-30 10:03:19 -04:00
George Claghorn
da2c92377c
Add load hook for ActiveStorage::Attachment
2019-03-28 18:52:02 -04:00
George Claghorn
562f3a2d21
Add ActiveStorage::Service#open
2019-03-28 18:47:42 -04:00
Eugeniu Tambur
135d8a0dc1
Traducir del: inglés
...
44/5000
Checking for the existence of only one table
2019-03-19 13:16:57 +01:00
Eugeniu Tambur
417c625ab2
Fix for migration active_storage migration
...
*ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "active_storage_attachments" does not exist*
Updating to rails 6.0.0.beta3 if the command rake app:update is used a new migration file is generated:
```ruby
# db/migrate/add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb
class AddForeignKeyConstraintToActiveStorageAttachmentsForBlobId < ActiveRecord::Migration[6.0]
def up
unless foreign_key_exists?(:active_storage_attachments, column: :blob_id)
add_foreign_key :active_storage_attachments, :active_storage_blobs, column: :blob_id
end
end
end
```
**If the project does not have previously installed active storage** this mgiration causes an error:
ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "active_storage_attachments" does not exist
**Error output:**
PG::UndefinedTable: ERROR: relation "active_storage_attachments" does not exist
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/postgresql/database_statements.rb:90:in `async_exec'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/postgresql/database_statements.rb:90:in `block (2 levels) in execute'
activesupport-6.0.0.beta3/lib/active_support/dependencies/interlock.rb:48:in `block in permit_concurrent_loads'
activesupport-6.0.0.beta3/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport-6.0.0.beta3/lib/active_support/dependencies/interlock.rb:47:in `permit_concurrent_loads'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/postgresql/database_statements.rb:89:in `block in execute'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract_adapter.rb:643:in `block (2 levels) in log'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract_adapter.rb:642:in `block in log'
activesupport-6.0.0.beta3/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract_adapter.rb:633:in `log'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/postgresql/database_statements.rb:88:in `execute'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract/schema_statements.rb:977:in `add_foreign_key'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:875:in `block in method_missing'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:843:in `block in say_with_time'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:843:in `say_with_time'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:864:in `method_missing'
/db/migrate/20190315102607_add_foreign_key_constraint_to_active_storage_attachments_for_blob_id.active_storage.rb:5:in `up'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:816:in `exec_migration'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:797:in `block (2 levels) in migrate'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:796:in `block in migrate'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:795:in `migrate'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:985:in `migrate'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1293:in `block in execute_migration_in_transaction'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1344:in `block in ddl_transaction'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract/database_statements.rb:265:in `block in transaction'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract/transaction.rb:272:in `block in within_new_transaction'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract/transaction.rb:270:in `within_new_transaction'
activerecord-6.0.0.beta3/lib/active_record/connection_adapters/abstract/database_statements.rb:265:in `transaction'
activerecord-6.0.0.beta3/lib/active_record/transactions.rb:212:in `transaction'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1344:in `ddl_transaction'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1292:in `execute_migration_in_transaction'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1264:in `block in migrate_without_lock'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1263:in `each'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1263:in `migrate_without_lock'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1211:in `block in migrate'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1364:in `with_advisory_lock'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1211:in `migrate'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1044:in `up'
activerecord-6.0.0.beta3/lib/active_record/migration.rb:1019:in `migrate'
activerecord-6.0.0.beta3/lib/active_record/tasks/database_tasks.rb:191:in `migrate'
activerecord-6.0.0.beta3/lib/active_record/railties/databases.rake:78:in `block (3 levels) in <main>'
activerecord-6.0.0.beta3/lib/active_record/railties/databases.rake:76:in `each'
activerecord-6.0.0.beta3/lib/active_record/railties/databases.rake:76:in `block (2 levels) in <main>'
railties-6.0.0.beta3/lib/rails/commands/rake/rake_command.rb:23:in `block in perform'
railties-6.0.0.beta3/lib/rails/commands/rake/rake_command.rb:20:in `perform'
railties-6.0.0.beta3/lib/rails/command.rb:48:in `invoke'
railties-6.0.0.beta3/lib/rails/commands.rb:18:in `<main>'
bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require'
bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `block in require_with_bootsnap_lfi'
bootsnap-1.4.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:83:in `register'
bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:20:in `require_with_bootsnap_lfi'
bootsnap-1.4.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:29:in `require'
activesupport-6.0.0.beta3/lib/active_support/dependencies.rb:297:in `block in require'
activesupport-6.0.0.beta3/lib/active_support/dependencies.rb:263:in `load_dependency'
activesupport-6.0.0.beta3/lib/active_support/dependencies.rb:297:in `require'
bin/rails:4:in `<main>'
2019-03-15 12:54:42 +01:00
George Claghorn
43fc7b476b
GCS service: skip unnecessary bucket lookups
2019-03-14 10:56:41 -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