Removes kindlerb logic
Adds template for epub generator
Renames the kindle dir to /epub
Adds epub module to generator and replaces kindle
Fixes mimetype
Creates basic epub book
Deletes old kindle module
Adds zip package
Updates rubyzip gem name
Removes now unused gepub gem
Adds the required container file for epubs
Fixes media type
Adds new epub generation logic
Removes all buttons from output html
Refactors and generates valid epub files
Removes frontmatter logic used for kindlegen
Filters out epub files in zip
Updates link to kindle doc on sidebar
Fixes rubocop issues
Adds deprecation warning for the old kindle task
Refactors and cleans up epub module
Cleans up epub code
Cleans up private internal method code style
Removes unnecessary imagemagick check
This commit removes the bundler deprecation warning below.
Since bug_report_templates test expect to use thier own gems inside of each file, not Rails's repository `Gemfile`.
Then using `Bundler.unbundled_system` should be right way.
* Deprecation warning without this commit
```
$ bundle exec rake test
--- Running bug_report_templates/generic_gem.rb
[DEPRECATED] `Bundler.clean_system` has been deprecated in favor of `Bundler.unbundled_system`. If you instead want to run the command in the environment before bundler was originally loaded, use `Bundler.original_system` (called at /home/yahonda/src/github.com/rails/rails/guides/Rakefile:81)
```
* Steps to reproduce
```
git clone https://github.com/rails/rails
cd rails/guides
bundle install
bundle exec rake test
```
* Environment
```
$ ruby -v
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [x86_64-linux]
$ bundler -v
Bundler version 2.1.4
```
* Note
This bundler deprecation warning has been introduced since 2.2.0.rc.1 by this commit below.
https://github.com/rubygems/rubygems/commit/90741bef9e7
In previous change, we set external encoding and internal encoding
explicitly. So we can remove the code that set environment variables
`LANG, LANGUAGE, LC_ALL`.
Because Ruby does not set `Encoding.default_external` with
non-existent locale such as `en_US.UTF-8`. Original code expects that
`en_US.UTF-8` is available locale implicitly. However, it shouldn't be
assumed.
In this case, we can use `-Eutf-8:utf-8` to specify external encoding
and internal encoding.
This commit is not precisely atomic, but the changes have evolved, summary:
* The ENV-based interface has been moved upwards, the generator has now a conventional
initializer.
* RAILS_VERSION is now assumed to be a Git tag. A blank RAILS_VERSION means edge guides.
* In consequence, the EDGE env variable is gone.
* The "local" version is also gone, the current SHA1 is computed for edge guides.
* Assumes guides are generated from a repo checkout (time ago users could
generate them from gems.)
* The WARNINGS flag is gone in consequence, you cannot disable warnings.
* The `api_link` Markdown helper is fixed.
* Docs about usage have one single place: rake guides:help.
* Links in guides have been revised.
With `kindlegen` missing from the PATH, the task
keeps suggesting to `gem install kindlerb`.
This change provides a more meaningful error
message for guides:generate:kindle.