Files
Jeremy Evans 2c962c78cf Add screenshots rake task
This task runs bin/regen_screenshots, which automates the generation
of screenshots used on the documentation site.

The screenshot generation code is similar to the route testing code,
but instead of using rack-test as the capybara driver, cuprite is
used.  Cuprite is a capybara driver that uses the ferrum Ruby
library to automate Chrome using the Chrome DevTools Protocol, which
is substantially more reliable than Selenium/WebDriver/ChromeDriver.

Using an actual browser (Chrome) for the screenshot generation code
requires using an actual server to handle the brower's requests. So
this starts Puma as a separate thread in the screenshot generation
process.

To avoid permanent database modification, this uses a transaction
around the screenshot generation code.  As the server runs in a
separate thread than the screenshot generation code, this uses the
Sequel temporarily_release_connection extension to share a single
connection between server and the main thread, so the main thread
can open the transaction, all server actions use the same connection
inside the transaction, and the main thread can rollback the
transaction after generating all screenshots.

For this to work correctly, it requires PR #7 in the documentation
repository be merged, to rename the screenshot png files.

The screenshots generated by this program have significant
advantages over the existing screenshots:

* Consistency: Uses "Demo" as the user, instead of different users
  depending on who generated the screenshot. It also consistently
  shows the layout (the layout was omitted in some existing
  screenshots), and shows the same options in the layout (existing
  screenshots showed Billing, Access Policy, or both).

* Accuracy: Shows current layout, and makes it easy to stay up to
  date with layout changes.  The existing screenshots have the
  following issues:

  * Show Provider in the title bar

  * Show different layout for the PostgreSQL page when no
    databases have been created.

  * Quickstart screenshot shows no existing accounts (how it will
    look for new users), unlike existing screenshot, which shows
    an existing account.

* Show Full Page: Each screenshot shows the enter page, instead of
  cropping it.  This makes the image larger, but should make it
  more pleasing to the user.
2024-11-01 12:19:25 -07:00
..
2024-11-01 12:19:25 -07:00
2023-06-15 00:55:12 +03:00
2023-08-04 10:35:00 +03:00
2024-11-01 12:19:25 -07:00
2023-08-04 10:35:00 +03:00