| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | | |
Includes a script to ease an app's upgrade.
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Update secrets to use modern crypto
|
| | | |
| | | |
| | | |
| | | | |
Fixes #28135.
|
|\ \ \ \
| |_|/ /
|/| | | |
Use `blank?` instead of `empty?`
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In order to avoid `NoMethodError` when it is nil.
Follow up to 82f7dc6178f86e5e2dd82f9e528475a6acee6cd8
|
|\ \ \ \
| |/ / /
|/| | | |
Update `DateTime#change` to support usec and nsec
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adding support for these options now allows us to update the
`DateTime#end_of` methods to match the equivalent `Time#end_of`
methods, e.g:
datetime = DateTime.now.end_of_day
datetime.nsec == 999999999 # => true
Fixes #21424.
|
|\ \ \ \
| | | | |
| | | | | |
`valid_type?` should accept only supported types
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
`valid_type?` is used in schema dumper to determine if a type is
supported. So if `valid_type?(:foobar)` is true, it means that schema
dumper is allowed to create `t.foobar`. But it doesn't work. I think
that `valid_type?` should accept only supported types.
https://github.com/rails/rails/blob/v5.1.0.beta1/activerecord/lib/active_record/schema_dumper.rb#L135-L142
```ruby
columns.each do |column|
raise StandardError, "Unknown type '#{column.sql_type}' for column '#{column.name}'" unless @connection.valid_type?(column.type)
next if column.name == pk
type, colspec = @connection.column_spec(column)
tbl.print " t.#{type} #{column.name.inspect}"
tbl.print ", #{format_colspec(colspec)}" if colspec.present?
tbl.puts
end
```
|
| | | | |
| | | | |
| | | | |
| | | | | |
Just dispatch to the command help itself for more info.
|
| | | | |
| | | | |
| | | | |
| | | | | |
Prefer Thor's say method to Kernel's plain puts.
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In case there's no $EDITOR assigned users would see a cryptic:
```
% EDITOR= bin/rails secrets:edit
Waiting for secrets file to be saved. Abort with Ctrl-C.
sh: /var/folders/wd/xnncwqp96rj0v1y2nms64mq80000gn/T/secrets.yml.enc: Permission denied
New secrets encrypted and saved.
```
That error is misleading, so give a hint in this easily detectable case.
Fixes #28143.
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
y-yagi/use_appropriate_type_for_test_framework_option
Use appropriate type for `test_framework` option
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This fixes the following warning.
```
Expected string default value for '--test-framework'; got false (boolean)
```
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use DEFAULT_CIPHER constant in MessageEncryptor
|
|/ / / / / |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Support for using `SELECT` column or expression aliases in the `HAVING`
clause isn't part of the SQL standard so it's better to whitelist the
test for adapters where we know it works and skip it on others.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
`HOST` must be all capital letters
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
Ref: https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server/server_command.rb#L194
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Use `inspect` in `type_cast_for_schema` for date/time and decimal values
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Currently dumping defaults on schema is inconsistent.
Before:
```ruby
create_table "defaults", force: :cascade do |t|
t.string "string_with_default", default: "Hello!"
t.date "date_with_default", default: '2014-06-05'
t.datetime "datetime_with_default", default: '2014-06-05 07:17:04'
t.time "time_with_default", default: '2000-01-01 07:17:04'
t.decimal "decimal_with_default", default: 1234567890
end
```
After:
```ruby
create_table "defaults", force: :cascade do |t|
t.string "string_with_default", default: "Hello!"
t.date "date_with_default", default: "2014-06-05"
t.datetime "datetime_with_default", default: "2014-06-05 07:17:04"
t.time "time_with_default", default: "2000-01-01 07:17:04"
t.decimal "decimal_with_default", default: "1234567890"
end
```
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Allow skipping of turbolinks for test dummy application for plugin/engine
|
| | |_|/ / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | | |
When `rails new plugin` is invoked, turbolinks should be skipped in the dummy
test application generated by the plugin generator.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Make required by default test for belongs_to association clearer
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since #18937 `belongs_to` associations receive a setting to determine if
it should be or not treated as `required` by default.
While the tests were still passing, it was not evident that the
"default" behaviour for `required` could change in fuction of a setting,
that is set by default for fresh Rails5 apps, but not for upgraded
apps.
This commit try to relate them to make it clear what is the behaviour
expected when the setting is set as `true` or not set.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
kamipo/create_join_table_respects_reference_key_type
`create_join_table` should respect `references` column type
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Follow up of #26266.
The default type of `primary_key` and `references` were changed to
`bigint` since #26266. But `create_join_table` column type is still
`integer`. It should respect `references` column type.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
Do not evaluate :if arguments when :on is not satisfied for transaction callbacks
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I incorrectly changed behavior of `dup`. Reading the original issue I
thought that `dup` should retain the original contents of the record
and it's associations but it is in fact supposed to be a copy as if a
record had been reinitialized.
This reverts commit ca8c21df0fdbf1f03ba2f7fb16b39c3282dc1be0.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Use `tables` instead of `data_sources - views`
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | | |
`tables` returns only tables now.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Take failed screenshot before reset driver
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Now reset the driver before take failed screenshot since #28144.
However, I think that failed screenshot should be take with the driver
actually used in the test.
So, fixed to take screenshot before reset driver.
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
baerjam/improve-testing-your-mailers-documentation
Improve documentation for Testing Your Mailers [ci skip]
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The current Basic Test Case example has the following assertion
```
assert_equal read_fixture('invite').join, email.body.to_s
```
email.body.to_s returns an empty string if both HTML and text templates
exist for a given mailer. This commit adds a note to section 11.2.2
explaining this and also suggests using email.text_part.body.to_s
and email.html_part.body.to_s as alternatives.
|
|\ \ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | | |
Fix http -> https [ci skip]
|
| | |_|/ / / / / /
| |/| | | | | | | |
|
| |/ / / / / / /
|/| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
In Rails 3.2 dupping a `CollectionProxy` would dup it's `load_target` as
well. That functionality has been broken since the release of Rails 4.0.
I hit this in an application upgrade and wondered why duplicating a
CollectionProxy and assigning it to a variable stopped working.
When calling `dup` on a `CollectionProxy` only the owner (ex.
topic) was getting duplicated and the `load_target` would remain in tact
with it's original object ID. Dupping the `load_target` is useful for performing
a logging operation after records have been destroyed in a method.
For example:
```
def transfer_operation
saved_replies = topic.replies
topic.replies.clear
saved_replies.each do |reply|
user.update_replies_count!
end
end
```
This change adds a `initialize_dup` method that performs a `deep_dup` on
the `@associatiation` so that the `load_target` is dupped as well.
Fixes #17117
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Oracle database also does not allow aliases in the having clause
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
Follow up #28183
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
y-yagi/user_released_webpacker_in_new_applications
Use released webpacker in new applications
|
| |/ / / / / /
| | | | | | |
| | | | | | |
| | | | | | | |
Because webpacker 1.0 already released.
|
|\ \ \ \ \ \ \
| |/ / / / / /
|/| | | | | | |
Remove `encode_special_chars` option from `strip_tags`
|
|/ / / / / / |
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
y-yagi/set_correct_host_except_development_environment
Set correct host except development environment
|