* Add support for Rails 6.0 to `ViewContext::BuildStrategy`
In Rails 6.0 the API for `ActionView::Base.new` is changing.
`ActionView::Base.new` now take arguments [1], otherwise you
will see the following deprecation warning:
```
DEPRECATION WARNING: ActionView::Base instances should be constructed with a lookup context, assignments, and a controller.
```
[1] e17fe52e0e
`ViewContext::BuildStrategy::Fast` does not have lookup context, so use `empty`
method instead of `new` to build instance.
* Bump a Rails version of dummy application
Also bump a sqlite version because Rails 6.0 requires upper sqlite
1.4.0.
* Add `ApplicationController` to dummy application
Because Action Text expects `ApplicationController` exists.
Ref: https://github.com/rails/rails/issues/35749#issuecomment-525083643
* Test against Rails 6.0 that only supported Ruby versions
* Add note on Active Job integration for #663
* Implement GlobalID by delegating to object and add documentation.
* Update readme and add missing require statement.
* Actually include the module.
* Create post instead of assuming it exists.
* Add test for #to_global_id.
* Fix failing specs re Rails 5.1
Because there is no hard constraint on Rails version, tests run against
the newest version available. Rails 5.1 removes `to_h` from unpermitted
parameters class. Using `empty?` is sufficient replacement.
* Fix Dummy app `posts#mail` action rendering
Rails 5.1 does not accept `:text` key for `render`.
* Add configure functionality to allow customizing the default.
* Add configuration module and tests.
* Add documentation to the README.md
* Skip tests that only fail when whole suite is ran.
* Fix the double leaking by re-writing the test that caused the issue.
* Clean up railtie - Exract out method, Remove unnecessary compatibility.
* Add new functionality to the dummy app to increase test coverage.
Automatic delegation of methods is now achieved with `delegate_all`,
which includes the new AutomaticDelegation module.
Manual delegation is achieved using the standard Active Support
`delegate` method, which is enhanced so that `to: :source` is the
default.
The problem with using Cucumber is that it runs the dummy app in the
test environment. Because the view context behaviour is dependent on
environment, we need to test it running on an actual server.
My decorator was silly. When UTC's today is different
than today's today, the decorator would be wrong. Now
we make sure to convert both to utc before making
the comparison
This test tests the following Draper features:
1) finders
2) decorates
3) using a decorated method
It also is the first test that verifies that the whole Cucumber setup
actually works properly.
I've embedded a little Rails app so that we can write cuke tests and
make sure that stuff doesn't break. Woo!
This was generated by making a rails engine, then copying just the
app over.
Thanks @nashby for fixing my stupid bug with sqlite3; it had to be
added as a development dependency. ❤️