Commit Graph

236 Commits

Author SHA1 Message Date
yuuji.yaginuma
cd34f00627 Install JavaScript packages before run test
Some tests are running yarn install during the test.
The directory used for isolation test is not subject to yarn workspace,
and it occurs because the required package is not installed.
In order to avoid this, I fixed all necessary packages to be installed
before run test and use symlink to `node_modules`.

This is a bit complicated, as `yarn install` needs to be run in a specific
directory before running the test.
However, running `yarn install` every time run the test is expensive
when testing locally and should be avoided.
2019-02-11 09:58:08 +09:00
Yasuo Honda
0d8740493c Use Ubuntu Xenial (16.04) at Travis CI
https://docs.travis-ci.com/user/reference/xenial/

* MySQL 5.7 and PostgreSQL 10 is available by default
https://docs.travis-ci.com/user/reference/xenial/#databases-and-services

* No matrixes necessary for "GEM=activerecord:mysql2", "GEM=activerecord:postgresql", "GEM=railties"
and "GEM=actionmailer,activemodel,activesupport,actionview,activejob,activestorage,actionmailbox,actiontext"

* Run mysql_upgrade for MariaDB

* Increase ramfs size before install for "GEM=activerecord:postgresql"

* Use FFMpeg 3.x using ppa:jonathonf/ffmpeg-3

    Ubuntu 16.04 installs FFMpeg version 2.x by default, which
    does not pass two of Active Stroage tests reported at https://github.com/rails/rails/issues/34921

* Use `rabbitmq-server` package and service

* Update bundler and rubygems to address "Could not find 'bundler' (1.17.2)" for ruby-head

    ```
    $ bundle install --jobs 3 --retry 3
    Traceback (most recent call last):
            2: from /home/travis/.rvm/rubies/ruby-head/bin/bundle:30:in `<main>'
            1: from /home/travis/.rvm/rubies/ruby-head/lib/ruby/2.7.0/rubygems.rb:302:in `activate_bin_path'
    /home/travis/.rvm/rubies/ruby-head/lib/ruby/2.7.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (1.17.2) required by your /home/travis/build/rails/rails/Gemfile.lock. (Gem::GemNotFoundException)
    To update to the latest version installed on your system, run `bundle update --bundler`.\nTo install the missing version, run `gem install bundler:1.17.2`\n
    ```

* Use oraclejdk11 (18.9 LTS) to address the following error

    ```
    $ ~/bin/install-jdk.sh --target "/home/travis/oraclejdk8" --workspace "/home/travis/.cache/install-jdk" --feature "8" --license "BCL"
    install-jdk.sh 2018-10-17
    Expected feature release number in range of 9 to 13, but got: 8
    ```

    Refer:
    https://docs.travis-ci.com/user/reference/xenial/#jvm-clojure-groovy-java-scala-support
2019-01-26 02:08:57 +00:00
George Claghorn
0decd2ddc4 Import Action Text 2019-01-04 22:22:49 -05:00
yuuji.yaginuma
2191c537ad Use latest Bundler
Don't need to specify the version because Bundler 2.0 released.
Ref: https://bundler.io/blog/2019/01/03/announcing-bundler-2.html
2019-01-03 15:40:54 +09:00
George Claghorn
f228c0b730
Test against Ruby 2.6.0 2018-12-26 11:58:48 -05:00
George Claghorn
a5b2fff64c Import Action Mailbox 2018-12-25 21:32:35 -05:00
bogdanvlviv
99fa2e80fb
Remove Ruby 2.4 from the CI matrix
Rails 6 requires Ruby 2.5+ or newer.
See https://github.com/rails/rails/pull/34754.
2018-12-21 01:03:56 +02:00
George Claghorn
13e2268061 Remove Ruby 2.4 from the test matrix
Rails 6 will require Ruby 2.5 or newer. See rails/rails#34754.
2018-12-19 19:35:40 -05:00
Kasper Timm Hansen
1b7c3222e8
Require Ruby 2.5 for Rails 6.
Generally followed the pattern for https://github.com/rails/rails/pull/32034

* Removes needless CI configs for 2.4
* Targets 2.5 in rubocop
* Updates existing CHANGELOG entries for fewer merge conflicts
* Removes Hash#slice extension as that's inlined on Ruby 2.5.
* Removes the need for send on define_method in MethodCallAssertions.
2018-12-19 21:47:50 +01:00
George Claghorn
b91c615662 Hook up Travis CI 2018-12-16 00:14:14 -05:00
Tatsuya Ikeda
e6f4201b59 CI against Ruby 2.4.5 and 2.5.3 (#45)
Bump CI to latest minor versions of Ruby 2.4 and 2.5
2018-12-12 20:57:42 -08:00
shoy75
f6a779c157 Update tested versions of Ruby on CI 2018-12-13 10:50:55 +09:00
Harue Lico
f4a7144138 kr/beanstalkd permanently moved to beanstalkd/beanstalkd
https://github.com/kr/beanstalkd has moved to
https://github.com/beanstalkd/beanstalkd as permanently.
2018-12-13 00:32:12 +09:00
Colby Swandale
d871885c21 update bundler to 2.0.0.pre.2 2018-12-05 19:51:32 +11:00
rmacklin
aa1ba9cb24 Remove circular dependency warnings in ActionCable javascript and publish source modules with fine-grained exports (#34370)
* Replace several ActionCable.* references with finer-grained imports

This reduces the number of circular dependencies among the module
imports from 4:

```
(!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/index.js
(!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection_monitor.js -> app/javascript/action_cable/index.js
(!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/consumer.js -> app/javascript/action_cable/index.js
(!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/subscriptions.js -> app/javascript/action_cable/index.js
```

to 2:

```
(!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/index.js
(!) Circular dependency: app/javascript/action_cable/index.js -> app/javascript/action_cable/connection.js -> app/javascript/action_cable/connection_monitor.js -> app/javascript/action_cable/index.js
```

* Remove tests that only test javascript object property assignment

These tests really only assert that you can assign a property to
the ActionCable global object. That's true for pretty much any object
in javascript (it would only be false if the object has been frozen, or
has explicitly set some properties to be nonconfigurable).

* Refactor ActionCable to provide individual named exports

By providing individual named exports rather than a default export which
is an object with all of those properties, we enable applications to
only import the functions they need: any unused functions will be
removed via tree shaking.

Additionally, this restructuring removes the remaining circular
dependencies by extracting the separate adapters and logger modules, so
there are now no warnings when compiling the ActionCable bundle.

Note: This produces two small breaking API changes:

- The `ActionCable.WebSocket` getter and setter would be moved to
  `ActionCable.adapters.WebSocket`. If a user is currently configuring
  this, when upgrading they'd need to either add a delegated
  getter/setter themselves, or change it like this:
   ```diff
   -    ActionCable.WebSocket = MyWebSocket
   +    ActionCable.adapters.WebSocket = MyWebSocket
    ```
   Applications which don't change the WebSocket adapter would not need
   any changes for this when upgrading.

- Similarly, the `ActionCable.logger` getter and setter would be moved
  to `ActionCable.adapters.logger`. If a user is currently configuring
  this, when upgrading they'd need to either add a delegated
  getter/setter themselves, or change it like this:
   ```diff
   -    ActionCable.logger = myLogger
   +    ActionCable.adapters.logger = myLogger
    ```
   Applications which don't change the logger would not need any changes
   for this when upgrading.

These two aspects of the public API have to change because there's no
way to export a property setter for `WebSocket` (or `logger`) such that
this:
```js
import ActionCable from "actioncable"

ActionCable.WebSocket = MyWebSocket
```
would actually update `adapters.WebSocket`. (We can only offer that if
we have two separate source files like if `index.js` uses
`import * as ActionCable from "./action_cable" and then exports a
wrapper which has delegated getters and setters for those properties.)

This API change is very minor - it should be easy for applications to
add the `adapters.` prefix in their assignments or to patch in delegated
setters. And especially because most applications in the wild are not
ever changing the default value of `ActionCable.WebSocket` or
`ActionCable.logger` (because the default values are perfect), this API
breakage is worth the tree-shaking benefits we gain.

* Include source code in published actioncable npm package

This allows actioncable users to ship smaller javascript bundles to
visitors using modern browsers, as demonstrated in this repository:
https://github.com/rmacklin/actioncable-es2015-build-example

In that example, the bundle shrinks by 2.8K (25.2%) when you simply
change the actioncable import to point to the untranspiled src.

If you go a step further, like this:
```
diff --git a/app/scripts/main.js b/app/scripts/main.js
index 17bc031..1a2b2e0 100644
--- a/app/scripts/main.js
+++ b/app/scripts/main.js
@@ -1,6 +1,6 @@
-import ActionCable from 'actioncable';
+import * as ActionCable from 'actioncable';

 let cable = ActionCable.createConsumer('wss://cable.example.com');

 cable.subscriptions.create('AppearanceChannel', {
```

then the bundle shrinks by 3.6K (31.7%)!

In addition to allowing smaller bundles for those who ship untranspiled
code to modern browsers, including the source code in the published
package can be useful in other ways:

1. Users can import individual modules rather than the whole library
2. As a result of (1), users can also monkey patch parts of actioncable
   by importing the relevant module, modifying the exported object, and
   then importing the rest of actioncable (which would then use the
   patched object).

Note: This is the same enhancement that we made to activestorage in
c0368ad090b79c19300a4aa133bb188b2d9ab611

* Remove unused commonjs & resolve plugins from ActionCable rollup config

These were added when we copied the rollup config from ActiveStorage,
but ActionCable does not have any commonjs dependencies (it doesn't have
any external dependencies at all), so these plugins are unnecessary here

* Change ActionCable.startDebugging() -> ActionCable.logger.enabled=true

and ActionCable.stopDebugging() -> ActionCable.logger.enabled=false

This API is simpler and more clearly describes what it does

* Change Travis configuration to run yarn install at the root for ActionCable builds

This is necessary now that the repository is using Yarn Workspaces
2018-12-01 16:25:02 -05:00
rmacklin
85b0803653 Convert ActionCable tests from CoffeeScript to ES2015 and replace Blade with Karma and Rollup (#34440)
* Rename .coffee files in ActionCable test suite in prep for decaffeination

* Decaffeinate ActionCable tests

* Replace Blade with Karma and Rollup to run ActionCable JS tests

- Add karma and qunit devDependencies

- Add test script to ActionCable package

- Use rollup to bundle ActionCable tests

- Use karma as the ActionCable JS test runner

* Replace vendored mock-socket with package devDependency in ActionCable

* Move ActionCable yarn install to TravisCI before_install config

* Clean up decaffeinated ActionCable tests to use consistent formatting
2018-11-26 17:16:02 -05:00
Yasuo Honda
6fb128d144 Bump the minimum version of PostgreSQL to 9.3
https://www.postgresql.org/support/versioning/

- 9.1 EOLed on September 2016.
- 9.2 EOLed on September 2017.

9.3 is also not supported since Nov 8, 2018.  https://www.postgresql.org/about/news/1905/
I think it may be a little bit early to drop PostgreSQL 9.3 yet.

* Deprecated `supports_ranges?` since no other databases support range data type

* Add `supports_materialized_views?` to abstract adapter
Materialized views itself is supported by other databases, other connection adapters may support them

* Remove `with_manual_interventions`
It was only necessary for PostgreSQL 9.1 or earlier

* Drop CI against PostgreSQL 9.2
2018-11-25 13:13:08 +00:00
yuuji.yaginuma
9757c84efe Replace port number 5433 to 5432 which tests expect
Also, replace the authentication setting. This is necessary for using
`psql` with PostgreSQL 10.
Ref: https://github.com/travis-ci/travis-ci/issues/9624#issuecomment-389537036
2018-10-19 12:38:15 +09:00
Gannon McGibbon
d888bec6da Include test gems in CI 2018-10-11 10:43:30 -04:00
Javan Makhmali
4edad3718a Match Rails Ruby version requirements 2018-10-08 16:40:35 -04:00
Javan Makhmali
55a303da5e travis.yml → .travis.yml
🤦‍♂️
2018-10-08 16:34:49 -04:00
Ryuta Kamizono
2334fe8ffa Remove duplicated before_install entries in .travis.yml
It has incorrectly been re-added at #33079.

Related #33861.
2018-10-01 14:45:27 +09:00
David Heinemeier Hansson
4838c1716a
Make Webpacker the default JavaScript compiler for Rails 6 (#33079)
* Use Webpacker by default on new apps

* Stop including coffee-rails by default

* Drop using a js_compressor by default

* Drop extra test for coffeescript inclusion by default

* Stick with skip_javascript to signify skipping webpack

* Don't install a JS runtime by default any more

* app/javascript will be the new default directory for JS

* Make it clear that this is just for configuring the default Webpack framework setup now

* Start using the Webpack tag in the default layout

* Irrelevant test

* jQuery is long gone

* Stop having asset pipeline compile default application.js

* Add rails-ujs by default to the Webpack setup

* Add Active Storage JavaScript to application.js pack by default

* Consistent quoting

* Add Turbolinks to default pack

* Add Action Cable to default pack

Need some work on how to set the global consumer that channels will
work with. @javan?

* Require all channels by default and use a separate consumer stub

* Channel generator now targets Webpack style

* Update task docs to match new generator style

* Use uniform import style

* Drop the JS assets generator

It was barely helpful as it was. It’s no longer helpful in a Webpacked
world. Sayonara!

* Add app/javascript to the stats directories

* Simpler import style

Which match the other imports.

* Address test failures from dropping JS compilation (and compression)

* webpacker-default: Modify `AssetsGeneratorTest`

Before:

```
$ bin/test test/generators/assets_generator_test.rb
Run options: --seed 46201

F

Failure:
AssetsGeneratorTest#test_assets [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:12]:
Expected file "app/assets/javascripts/posts.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/assets_generator_test.rb:10

.

Finished in 0.031343s, 63.8101 runs/s, 95.7152 assertions/s.
2 runs, 3 assertions, 1 failures, 0 errors, 0 skips
```

After:

```
$ bin/test test/generators/assets_generator_test.rb
Run options: --seed 43571

..

Finished in 0.030370s, 65.8545 runs/s, 65.8545 assertions/s.
2 runs, 2 assertions, 0 failures, 0 errors, 0 skips
```

* webpacker-default: Modify `ChannelGeneratorTest`

Before:

```
$ bin/test test/generators/channel_generator_test.rb
Run options: --seed 8986

.F

Failure:
ChannelGeneratorTest#test_channel_with_multiple_actions_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:43]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:34

.F

Failure:
ChannelGeneratorTest#test_channel_is_created [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:29]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:22

E

Error:
ChannelGeneratorTest#test_cable_js_is_created_if_not_present_already:
Errno::ENOENT: No such file or directory @ apply2files - /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/fixtures/tmp/app/assets/javascripts/cable.js

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:60

F

Failure:
ChannelGeneratorTest#test_channel_suffix_is_not_duplicated [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:87]:
Expected file "app/assets/javascripts/channels/chat.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:80

F

Failure:
ChannelGeneratorTest#test_channel_on_revoke [/Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:77]:
Expected file "app/assets/javascripts/cable.js" to exist, but does not

bin/test /Users/ttanimichi/ghq/github.com/ttanimichi/rails/railties/test/generators/channel_generator_test.rb:68

Finished in 0.064384s, 108.7227 runs/s, 481.4861 assertions/s.
7 runs, 31 assertions, 4 failures, 1 errors, 0 skips
```

After:

```
$ bin/test test/generators/channel_generator_test.rb
Run options: --seed 44857

.......

Finished in 0.060243s, 116.1961 runs/s, 697.1764 assertions/s.
7 runs, 42 assertions, 0 failures, 0 errors, 0 skips
```

* Fix shared generator tests.

* webpacker-default: Modify `ControllerGeneratorTest`

The JS assets generator was dropped. ref. 46215b1794

* Revert "Simpler import style". It's currently failing with an error of "TypeError: undefined is not an object (evaluating '__WEBPACK_IMPORTED_MODULE_2_activestorage___default.a.start')". Waiting for @javan to have a look.

This reverts commit 5d3ebb71059f635d3756cbda4ab9752027e09256.

* require webpacker in test app

* Add webpacker without making the build hang/timeout. (#33640)

* use yarn workspaces to allow for installing unreleased packages and only generate js/bootsnap when required

* no longer need to have webpacker in env templates as webpacker moved this config to yml file

* Fix rubocop violation

* Got the test passing for the running scaffold

* update expected lines of code

* update middleware tests to account for webpacker

* disable js in plugins be default to get the tests passing (#34009)

* clear codeclimate report issues

* Anything newer than currently released is good

* Use Webpacker development version during development of Rails

* Edge should get development webpacker as well

* Add changelog entry for Webpacker change
2018-09-30 22:31:21 -07:00
Yasuo Honda
342e29bbbf CI against PostgreSQL 10
- Replace port number 5433 to 5432 (default value) which Active Record unit tests expect
- Restart PostgreSQL 10 service after changing port number
- PostgreSQL 10 is a addon for the current Travis CI. Installing
PostgreSQL 10 would cause longer CI to getting additional apt packages
Refer https://docs.travis-ci.com/user/database-setup/#PostgreSQL

- Use `sudo: required` for railties CI expecting PostgreSQL is up and running
2018-09-18 12:27:24 +00:00
yuuji.yaginuma
82556cd452 Enable sudo only in the required build
Currently, PostgreSQL + Ruby 2.5.1 build has failed.

https://travis-ci.org/rails/rails/jobs/427502723#L2940-L2942
https://travis-ci.org/rails/rails/jobs/427496382#L2921-L2923
https://travis-ci.org/rails/rails/jobs/427470858#L2921-L2923

This is because PostgreSQL server abnormally terminates when ramfs
becomes full.
Ref: https://travis-ci.org/rails/rails/jobs/427960998#L7614

This occurs since d54d0c95750e2693da495b75ac5fa0280253972d.
In d54d0c95750e2693da495b75ac5fa0280253972d, `sudo` is used in preprocessing
for setting MySQL.

In Travis, even if specified `sudo: false`, when using `sudo` in build,
sudo-enabled infrastructure is used.
https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system

As container-based infrastructure was changed to sudo-enabled infrastructure,
the disk settings etc were also changed, it seems that this phenomenon occurred.

This can also be handled by extending ramfs(https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213).
However, using sudo-enabled in all builds affects the execution time of
build, so I think that it is good to use sudo-enabled only in the necessary builds.
2018-09-14 07:16:19 +09:00
Yasuo Honda
d54d0c9575 Use utf8mb4 character set by default for MySQL database (#33608)
* Use utf8mb4 character set by default

`utf8mb4` character set supports supplementary characters including emoji.
`utf8` character set with 3-Byte encoding is not enough to support them.

There was a downside of 4-Byte length character set with MySQL 5.5 and 5.6:

"ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes"
for Rails string data type which is mapped to varchar(255) type.

MySQL 5.7 supports 3072 byte key prefix length by default.

* Remove `DEFAULT COLLATE` from Active Record unit test databases

There should be no "one size fits all" collation in MySQL 5.7.
Let MySQL server choose the default collation for Active Record
unit test databases.

Users can choose their best collation for their databases
by setting `options[:collation]` based on their requirements.

* InnoDB FULLTEXT indexes support since MySQL 5.6
it does not have to use MyISAM storage engine whose maximum key length is 1000 bytes.
Using MyISAM storag engine with utf8mb4 character set would cause
"Specified key was too long; max key length is 1000 bytes"

https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html

* References

"10.9.1 The utf8mb4 Character Set (4-Byte UTF-8 Unicode Encoding)"
https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8mb4.html

"10.9.2 The utf8mb3 Character Set (3-Byte UTF-8 Unicode Encoding)"
https://dev.mysql.com/doc/refman/5.7/en/charset-unicode-utf8.html

"14.8.1.7 Limits on InnoDB Tables"
https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html
> If innodb_large_prefix is enabled (the default), the index key prefix limit is 3072 bytes
> for InnoDB tables that use DYNAMIC or COMPRESSED row format.

* CI against MySQL 5.7

Followed this instruction and changed root password to empty string.
https://docs.travis-ci.com/user/database-setup/#MySQL-57

* The recommended minimum version of MySQL is 5.7.9
to support utf8mb4 character set and `innodb_default_row_format`

MySQL 5.7.9 introduces `innodb_default_row_format` to support 3072 byte length index by default.
Users do not have to change MySQL database configuration to support Rails string type.

https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_default_row_format

https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html
> If innodb_large_prefix is enabled (the default),
> the index key prefix limit is 3072 bytes for InnoDB tables that use DYNAMIC or COMPRESSED row format.

* The recommended minimum version of MariaDB is 10.2.2
MariaDB 10.2.2 is the first version of MariaDB supporting `innodb_default_row_format`
Also MariaDB says "MySQL 5.7 is compatible with MariaDB 10.2".

- innodb_default_row_format
https://mariadb.com/kb/en/library/xtradbinnodb-server-system-variables/#innodb_default_row_format

- "MariaDB versus MySQL - Compatibility"
https://mariadb.com/kb/en/library/mariadb-vs-mysql-compatibility/
> MySQL 5.7 is compatible with MariaDB 10.2

- "Supported Character Sets and Collations"
https://mariadb.com/kb/en/library/supported-character-sets-and-collations/
2018-09-11 13:03:34 -07:00
yuuji.yaginuma
b2eb1d1c55 Revert "Avoid Node.js v10.4.0 for now"
This reverts commit 691addbffad10aa249d5fb1b0e47b46a086e5332.

Reason: v10.5.0 has been released, and it seems that the issue is fixed.
Ref: https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V10.md#10.5.0
2018-06-25 10:18:52 +09:00
yuuji.yaginuma
691addbffa Avoid Node.js v10.4.0 for now
If use Node.js v10.4.0, ujs's build will result in an error, so
temporarily fix the version to v10.3.0.

Ref: https://travis-ci.org/rails/rails/jobs/389960856
2018-06-09 14:23:34 +09:00
Yasuo Honda
4d65293622 CI against MariaDB 10.3
- MariaDB 10.3.7 is the first GA release
https://mariadb.com/kb/en/library/mariadb-1037-release-notes/

- MariaDB 10.3 translates `LENGTH()` to `OCTET_LENGTH()` function

https://mariadb.com/kb/en/library/sql_modeoracle-from-mariadb-103/
> MariaDB translates LENGTH() to OCTET_LENGTH()

- MySQL does NOT translate `LENGTH()` to `OCTET_LENGTH()`
However, it translates `OCTET_LENGTH()` to `LENGTH()`

Here are generated schema dumps of this test to show the differences
between MySQL and MariaDB:

* MySQL 8.0 (Server version: 8.0.11 MySQL Community Server - GPL)
```ruby
  create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t|
    t.string \"name\"
    t.virtual \"upper_name\", type: :string, as: \"upper(`name`)\"
    t.virtual \"name_length\", type: :integer, as: \"length(`name`)\", stored: true
    t.virtual \"name_octet_length\", type: :integer, as: \"length(`name`)\", stored: true
  end
```

* Maria DB 10.3 (Server version: 10.3.7-MariaDB-1:10.3.7+maria~bionic-log mariadb.org binary distribution)

```ruby
  create_table \"virtual_columns\", options: \"ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci\", force: :cascade do |t|
    t.string \"name\"
    t.virtual \"upper_name\", type: :string, as: \"ucase(`name`)\"
    t.virtual \"name_length\", type: :integer, as: \"octet_length(`name`)\", stored: true
    t.virtual \"name_octet_length\", type: :integer, as: \"octet_length(`name`)\", stored: true
  end
```
2018-06-01 03:47:17 +00:00
Andrew White
c2c9839a3d
Bump tested versions of Ruby on CI 2018-03-31 12:25:09 +01:00
George Claghorn
3c9edcffb6 Restore full Travis config 2018-03-12 23:18:17 -04:00
George Claghorn
fcbe17137d Fix Azure signed URL generation with newer client lib 2018-03-12 23:14:20 -04:00
George Claghorn
0443cb130c Update ASt test services config 2018-03-12 19:00:54 -04:00
Terence Lee
0b717c2045 Provide an alternative PDF previewer based on Poppler
mutool is licensed under the Affero GPL, which has strict distribution requirements.

Poppler is licensed under the more liberal GPL, making it a good alternative for those who can't use mutool.
2018-03-06 13:33:33 -05:00
Yasuo Honda
00d29e18a3 CI with jruby-head compatible with Ruby 2.4.1
Since #32034 Rails 6 requires Ruby 2.4.1 or higher.
Two CI jobs configured with the latest version of`jruby-9.1.15.0`
compatibile with Ruby 2.3.3 are getting errors:

https://travis-ci.org/rails/rails/jobs/343519339

```
Bundler could not find compatible versions for gem "ruby":
  In Gemfile:
    ruby java
    rails java was resolved to 6.0.0.alpha, which depends on
      ruby (>= 2.4.1) java
Could not find gem 'ruby (>= 2.4.1)', which is required by gem 'rails', in any
of the relevant sources:
```
2018-02-21 07:14:12 +00:00
Jeremy Daer
6b3acf1518
Travis: fix that major.minor version doesn't track latest major.minor.tiny
So `2.4` would match `2.4.1` (due to an rvm alias) rather than matching
the latest `2.4.3` release.
2018-02-18 00:19:36 -08:00
Jeremy Daer
d4eb0dc89e Rails 6 requires Ruby 2.4.1+
Skipping over 2.4.0 to sidestep the `"symbol_from_string".to_sym.dup` bug.

References #32028
2018-02-17 15:34:57 -08:00
Jeremy Daer
1e526788e6 Rails 6 requires Ruby 2.3+ 2018-02-17 10:03:37 -08:00
Rafael Mendonça França
0ea8e7db1a Remove support to Ruby 2.2
Rails 6 will only support Ruby >= 2.3.
2018-02-16 18:52:10 -05:00
yuuji.yaginuma
dff749eb5d Avoid bundle clean before caching
I'm not sure cause, but due to the influence of `gem clean`, the expected
gem seems not to be installed correctly.
In order to avoid a test failure due to this, I fixed that `gem clean` not be executed.
Ref: https://github.com/travis-ci/travis-ci/issues/2518#issuecomment-121168856

This is a workaround. If Travis fixes something, please revert this.
2018-02-02 09:16:51 +09:00
Josef Šimánek
0f6b7b5156
Update to latest rubies (2.2.9, 2.3.8 and 2.4.3) on Travis CI. 2018-02-01 11:03:59 +01:00
yuuji.yaginuma
7aa10a17d4 CI against ruby 2.5.0 2017-12-27 10:42:46 +09:00
SHIBATA Hiroshi
6fd0a658ee
To use rubygems-2.7.4 on Travis CI 2017-12-25 19:12:20 +09:00
SHIBATA Hiroshi
31ff6166af
Relax bundler version on Travis CI 2017-12-22 22:21:57 +09:00
SHIBATA Hiroshi
b2d2a1da62
Temporary disabled using rubygems 2.7.
RubyGems 2.7 promote bundler-1.16 to default gems.
  It conflicts Travis environment and user installed bundler.
2017-12-22 18:30:03 +09:00
Yasuo Honda
9111fc9f30 Revert "only install ffmpeg and mupdf on activestorage builds"
This reverts commit 6ec0ed67d9afcc666ad0424b10e9903f63e60714.
2017-12-12 15:31:15 +00:00
bogdanvlviv
b47eeadb36
CI against JRuby 9.1.15.0
JRuby 9.1.15.0 has been released:
http://jruby.org/2017/12/07/jruby-9-1-15-0.html
2017-12-08 23:27:18 +02:00
Joe Francis
6ec0ed67d9 only install ffmpeg and mupdf on activestorage builds
These are needed when GEM=ast, thanks @georgeclaghorn
2017-12-05 13:25:28 -06:00
Koichi ITO
d0c3062939 CI against JRuby 9.1.14.0
JRuby 9.1.14.0 has been released and this version is available on Travis CI.
http://jruby.org/2017/11/08/jruby-9-1-14-0
2017-11-15 01:10:26 +09:00
yuuji.yaginuma
8e964556e7 Make sidekiq and resque integration tests work in CI
Since 8f2490b, the integration test of sidekiq and resque is not working
in CI.
https://travis-ci.org/rails/rails/jobs/301276197#L2055
https://travis-ci.org/rails/rails/jobs/301276197#L2061

Because 8f2490b removed password from `redis-server`.
So must also remove passwords from these tests.
2017-11-13 21:02:40 +09:00