fractaledmind / litestream-ruby

MIT License
71 stars 6 forks source link

Make engine available in published gem pkg #31

Closed rossta closed 2 months ago

rossta commented 2 months ago

When I upgrade to litestream 10.x, I expect to be able to mount the Litestream web ui in my Rails app when mounted in the routes file:

Rails.application.routes.draw do
  mount Litestream::Engine, at: "/litestream"
end

Instead, when I visit /litestream, I get ActionController::RoutingError (No route matches [GET] "/litestream"):

For this route to resolve in a host Rails application, the gem would need to provide config/routes.rb and controller(s) in app/controllers. Listing the files in my local installation of litestream-ruby, I see:

$ ls /path/to/.gem/ruby/3.3.0/gems/litestream-0.10.3-arm64-darwin 
LICENSE              README.md            exe
LICENSE-DEPENDENCIES Rakefile             lib

The app and config directories are missing.

The fix should be to add the missing directories to the gemspec so they can be included in the packaged gem.

fractaledmind commented 2 months ago

Great catch! This code was originally in a different gem and I decided to consolidate, but clearly missed this. Thanks!