Commit Graph

350 Commits

Author SHA1 Message Date
George Claghorn
ef5902a2f1
Merge pull request #32471 from janko-m/use-image_processing-gem
Use ImageProcessing gem for ActiveStorage variants
2018-04-23 16:01:16 -05:00
Bart de Water
e236454a1a Rubocop 0.54
Fix `.rubocop.yml: Lint/EndAlignment has the wrong namespace - should be Layout` warning
2018-04-21 13:18:50 -04:00
Janko Marohnić
ca12968587
Use ImageProcessing gem for ActiveStorage variants
ImageProcessing gem is a wrapper around MiniMagick and ruby-vips, and
implements an interface for common image resizing and processing. This
is the canonical image processing gem recommended in [Shrine], and
that's where it developed from. The initial implementation was extracted
from Refile, which also implements on-the-fly transformations.

Some features that ImageProcessing gem adds on top of MiniMagick:

  * resizing macros
    - #resize_to_limit
    - #resize_to_fit
    - #resize_to_fill
    - #resize_and_pad
  * automatic orientation
  * automatic thumbnail sharpening
  * avoids the complex and inefficient MiniMagick::Image class
  * will use "magick" instead of "convert" on ImageMagick 7

However, the biggest feature of the ImageProcessing gem is that it has
an alternative implementation that uses libvips. Libvips is an
alternative to ImageMagick that can process images very rapidly (we've
seen up 10x faster than ImageMagick).

What's great is that the ImageProcessing gem provides the same interface
for both implementations. The macros are named the same, and the libvips
implementation does auto orientation and thumbnail sharpening as well;
only the operations/options specific to ImageMagick/libvips differ. The
integration provided by this PR should work for both implementations.

The plan is to introduce the ImageProcessing backend in Rails 6.0 as the
default backend and deprecate the MiniMagick backend, then in Rails 6.1
remove the MiniMagick backend.
2018-04-18 17:46:25 +02:00
yuuji.yaginuma
5bca1f2167 Unlock dalli version
The issue was fixed with https://github.com/petergoldstein/dalli/pull/679,
and a new version containing that fix was released.
2018-04-11 16:52:10 +09:00
Rafael França
76c9498eb1
Merge pull request #32496 from yhirano55/fix_turbolinks_warning_in_railties
Fix turbolinks warning in railties test
2018-04-10 22:00:16 -04:00
Yoshiyuki Hirano
eebad82e7c Fix turbolinks warning in railties test
* Upgrade turbolinks from v5.0.1 to v5.1.0
* Fix warning in railties test

    lib/turbolinks/assertions.rb:17:
    warning: assigned but unused variable - visit_action
2018-04-11 10:08:38 +09:00
eileencodes
72f17d59e4 Remove upper bound on Capybara
There's no reason to block future versions of Capybara since we don't
_know_ they are going to break. How will we know if we have a
conservative option set? This change prevents us from blocking users who
want to upgrade in the future.
2018-04-10 16:40:14 -04:00
James Mead
1cc282db7d Upgrade Mocha from v1.3.0 to v1.5.0
Mocha v1.5.0 is currently the latest release.
2018-04-07 12:26:27 +01:00
Rafael Mendonça França
e6f5e75ef1
Upgrade capybara to 3.0.1 to make sure our tests are passing 2018-04-06 17:09:14 -04:00
yuuji.yaginuma
0bfdd1da28 Fix broken ServerTest with Capybara 3.0.0
It seems that it is no longer possible to specify the value held by
`Capybara.server` as sever.

Ref: ba7674086c
2018-04-06 21:01:28 +09:00
Kasper Timm Hansen
0ec23effa7
Merge pull request #32065 from sikachu/move-SourceAnnotationExtractor-under-rails-namespec
Move SourceAnnotationExtractor under Rails module
2018-04-02 16:15:52 +02:00
Yuji Yaginuma
fe37da4ebf Bump rack-test to 1.0.0 2018-03-28 07:24:49 +09:00
Prem Sichanugrist
f2ebfcb0c0 Run bundle update on bootsnap
1.2.1 fixes a bug in `Kernel.require` and resolve a test failure.

See https://github.com/Shopify/bootsnap/pull/143
2018-03-23 01:09:24 +00:00
Ryuta Kamizono
958c5ad9e9 Fix test_config_another_database failure
Somehow `test_config_another_database` didn't fail on CI, but it will
fail locally.

https://travis-ci.org/rails/rails/jobs/356212950#L2474-L2482

```
% bundle exec ruby -w -Itest test/generators/app_generator_test.rb -n test_config_another_database
Run options: -n test_config_another_database --seed 7260

# Running:

F

Failure:
AppGeneratorTest#test_config_another_database [test/generators/app_generator_test.rb:417]:
Expected /^\s*gem\s+["']mysql2["'], '~> 0.4.4'$*/ to match "source 'https://rubygems.org'\ngit_source(:github) { |repo| \"https://github.com/\#{repo}.git\" }\n\nruby '2.5.0'\n\n# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'\ngem 'rails', '~> 6.0.0.alpha'\n# Use mysql as the database for Active Record\ngem 'mysql2', '>= 0.4.4', '< 0.6.0'\n# Use Puma as the app server\ngem 'puma', '~> 3.11'\n# Use SCSS for stylesheets\ngem 'sass-rails', '~> 5.0'\n# Use Uglifier as compressor for JavaScript assets\ngem 'uglifier', '>= 1.3.0'\n# See https://github.com/rails/execjs#readme for more supported runtimes\n# gem 'mini_racer', platforms: :ruby\n\n# Use CoffeeScript for .coffee assets and views\ngem 'coffee-rails', '~> 4.2'\n# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks\ngem 'turbolinks', '~> 5'\n# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder\ngem 'jbuilder', '~> 2.5'\n# Use Redis adapter to run Action Cable in production\n# gem 'redis', '~> 4.0'\n# Use ActiveModel has_secure_password\n# gem 'bcrypt', '~> 3.1.7'\n\n# Use ActiveStorage variant\n# gem 'mini_magick', '~> 4.8'\n\n# Use Capistrano for deployment\n# gem 'capistrano-rails', group: :development\n\n# Reduces boot times through caching; required in config/boot.rb\ngem 'bootsnap', '>= 1.1.0', require: false\n\ngroup :development, :test do\n  # Call 'byebug' anywhere in the code to stop execution and get a debugger console\n  gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]\nend\n\ngroup :development do\n  # Access an interactive console on exception pages or by calling 'console' anywhere in the code.\n  gem 'web-console', '>= 3.3.0'\n  gem 'listen', '>= 3.0.5', '< 3.2'\n  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring\n  gem 'spring'\n  gem 'spring-watcher-listen', '~> 2.0.0'\nend\n\ngroup :test do\n  # Adds support for Capybara system testing and selenium driver\n  gem 'capybara', '>= 2.15', '< 4.0'\n  gem 'selenium-webdriver'\n  # Easy installation and use of chromedriver to run system tests with Chrome\n  gem 'chromedriver-helper'\nend\n\n# Windows does not include zoneinfo files, so bundle the tzinfo-data gem\ngem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]\n".

bin/rails test test/generators/app_generator_test.rb:411

Finished in 0.174681s, 5.7247 runs/s, 34.3483 assertions/s.
1 runs, 6 assertions, 1 failures, 0 errors, 0 skips
```
2018-03-22 03:20:04 +09:00
Andrew White
627ef06331 Update loofah to mitigate CVE-2018-8048
See flavorjones/loofah#144
2018-03-21 16:48:47 +00:00
Rafael Mendonça França
fab6ded8f2
Allow any version of dalli less them 2.7.7 2018-03-20 11:58:14 -04:00
yuuji.yaginuma
63ec63ca8c Avoid dalli 2.7.7 for now
It's causing a test to fail.
Ref: https://travis-ci.org/rails/rails/jobs/353758855#L1433-L1501
2018-03-15 21:03:06 +09:00
Gaurav Sharma
875073a89d update psych gem to 3.2 stable release 2018-03-10 01:44:36 +05:30
Yuji Yaginuma
a3b7aa66bc Update Gemfile.lock to reflect Capybara 3.x
Follow up of #32151
2018-03-06 11:57:49 +09:00
George Claghorn
ccac681122 Generate root-relative paths in Active Storage disk service URL methods
Fixes #32129.
2018-03-05 11:54:43 -05:00
utilum
298ecee479 Update rubocop to the latest version
Includes [Switch Layout/SpaceBeforeBlockBraces's empty braces default](https://github.com/bbatsov/rubocop/pull/5263) from [0.52.1](https://github.com/bbatsov/rubocop/blob/master/CHANGELOG.md#0521-2017-12-27).

Before: 131 offenses detected.

After: no offenses detected
2018-02-23 01:08:27 +01:00
Andrew White
6c6a30a7c3 Update to sinatra 2.0.1
Although not a direct dependency, it's pulled in by Resque for
Active Job integration tests so we need to update because the
rack-protection gem has a security vulnerability[1].

[1]: https://nvd.nist.gov/vuln/detail/CVE-2018-7212
2018-02-21 13:04:36 +00:00
utilum
ea06d2d5b4 Bump mysql2 version
Skip 0.4.8 and 0.4.9, which had
[Compilation failures against MariaDB Connector/C 3.0.2](https://github.com/brianmario/mysql2/releases/tag/0.4.10).
2018-02-15 19:12:58 +01:00
Rafael Mendonça França
2e87ea6d70 Don't force people to upgrade i18n gem 2018-02-14 11:55:36 -05:00
Rafael Mendonça França
79aa6158b8 Update Gemfile.lock 2018-02-14 01:47:37 -05:00
yuuji.yaginuma
c5d431e469 Bump minitest-server
In order to use `minitest_bisect` with Minitest 5.11.x, it needs to be
updated.
Ref: https://github.com/seattlerb/minitest-server/issues/2
2018-02-07 21:47:48 +09:00
Matthew Draper
7a1fa2c584
Merge pull request #31914 from utilum/bump_em-socksify
Update em-socksify to the latest version
2018-02-07 11:25:06 +10:30
utilum
64be732b1a Update em-socksify to the latest version
Avoid warning: parentheses after method name is interpreted as an argument list, not a decomposed argument
2018-02-06 23:08:13 +01:00
Robin Dupret
38d2b473c2 Refer to a stable release of SDoc 2018-02-06 19:49:15 +01:00
Rafael Mendonça França
1c383df324 Start Rails 6.0 development!!!
🎉🎉🎉
2018-01-30 18:51:17 -05:00
Daniel Colson
defa880f91 Relax minitest version
We locked Minitest to 5.11.1 in #31799
because 5.11.2 included a breaking change.
The change was fixed in 5.11.3, so we no
longer need to lock in the version.
2018-01-26 20:36:59 -05:00
Yasuo Honda
1da8c32d16 Lock Minitest 5.11.1
To workaround `undefined method `error?' for` reported
at https://travis-ci.org/rails/rails/jobs/333456146
2018-01-26 02:47:35 +00:00
yuuji.yaginuma
9270e69c58 Update Gemfile.lock to reflect websocket-driver 0.7.0
Follow up to e1473e0cbfbd97eeea2bc6eefd73bec0d4863359
2018-01-19 07:50:50 +09:00
Gabriel Sobrinho
4ac143d193 Support for connection pooling on mem cache store 2018-01-18 15:05:16 -05:00
George Claghorn
c2ba530c43
Extract content types from blob data 2018-01-15 13:06:17 -05:00
Rafael Mendonça França
c09ebcf4a9 Use my fork instead of an thrid-party fork
This will avoid the branch being deleted by mistake making all builds to
fail.
2018-01-11 14:37:27 -05:00
Rafael Mendonça França
181836d894 Merge pull request #31671 from larskanis/pg-1.0
PostgreSQL: Allow pg-1.0 gem to be used with ActiveRecord
2018-01-11 14:31:37 -05:00
Lars Kanis
13eff51b1b PostgreSQL: Update Gemfile to pg-1.0.0
Queue_classic currently limits pg to "< 0.20".
It is therefore not used for rails CI tests. There has been
a bull request for a while (by a co-worker of mine), which
fixes the incompatibilities and extends dependencies to pg-1.x.

This patch add this pull request to the Gemfile as an interim
solution, until it is merged.
2018-01-10 21:55:43 +01:00
yuuji.yaginuma
a0fc2bee47 Bump Minitest to 5.11.1 2018-01-03 08:24:32 +09:00
yuuji.yaginuma
13afd2cfdc Avoid Minitest 5.11.0 for now
Seems some tests not work with Minitest 5.11.0.

* https://travis-ci.org/rails/rails/jobs/323997512#L1053
* https://travis-ci.org/rails/rails/jobs/323997486#L1055

Ref: https://github.com/seattlerb/minitest/issues/729
2018-01-02 17:34:09 +09:00
yuuji.yaginuma
df514728ee Use released delayed_job instead of master version
Ref: https://github.com/collectiveidea/delayed_job/blob/master/CHANGELOG.md#414---2017-12-29
2017-12-30 06:57:28 +09:00
yuuji.yaginuma
eb98aeb296 Use delayed_job master
For pass Active Job integration tests with Ruby 2.5.
Ref: https://github.com/collectiveidea/delayed_job/pull/996
2017-12-23 22:18:29 +09:00
Guillermo Iguaran
7d75599c87 Update nokogiri version on Gemfile 2017-12-14 13:06:53 -05:00
yuuji.yaginuma
65e994c063 Use released resque-scheduler instead of master version
The v4.3.1 has already released that includes Redis 4.0 support.
https://github.com/resque/resque-scheduler/blob/master/CHANGELOG.md#431---2017-11-20
2017-12-14 08:40:42 +09:00
yuuji.yaginuma
9d65ac30fd Use credentials instead of keyfile in GCS sevice
The `keyfile` was renamed to `credentials` in `google-cloud-storage` 1.8.0.
https://github.com/GoogleCloudPlatform/google-cloud-ruby/blob/master/google-cloud-storage/CHANGELOG.md#180--2017-11-14

Although `keyfile` can still be used, but it looks like deprecate.
ddf7b2a856/google-cloud-storage/lib/google/cloud/storage.rb (L589...L590)

Therefore, I think that should use `credentials` in newly generated
applications.

Ref: https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/1802
2017-11-29 13:17:04 +09:00
Rafael Mendonça França
2837d0f334
Preparing for 5.2.0.beta2 release 2017-11-28 14:41:02 -05:00
Rafael Mendonça França
cceeeb6e57
Preparing for 5.2.0.beta1 release 2017-11-27 14:50:03 -05:00
Guo Xiang Tan
a163f9328b Update rack-test to 0.8. 2017-11-21 11:54:09 +08:00
yuuji.yaginuma
adf7fb86d0 Remove unused em-hiredis
`em-hiredis` is unused since 48766e32d31651606b9f68a16015ad05c3b0de2c
2017-11-21 12:27:29 +09:00
Ryuta Kamizono
bc27697748 Fix test_session_store_with_expire_after failure with rack-test 0.7.1
https://travis-ci.org/rails/rails/jobs/304428814#L1977
2017-11-20 05:49:51 +09:00