swagger-docs icon indicating copy to clipboard operation
swagger-docs copied to clipboard

Do not depend on "rails" gem, depend on parts of Rails that swagger-docs uses

Open adamniedzielski opened this issue 8 years ago • 1 comments

Description

swagger-docs specifies a dependency on rails gem - https://github.com/richhollis/swagger-docs/blob/372e05ce944860ea35ca3496564492ae1e502100/swagger-docs.gemspec#L29

rails is just an "umbrella gem" that depends on all the components of Ruby on Rails framework - https://github.com/rails/rails/blob/86ca5b254109e64edeb6e142e656b8a8c247cac8/rails.gemspec - ActiveSupport, ActionPack, ActiveRecord, ...

I want to avoid installing actioncable gem in my Rails application. When swagger-docs specifies rails gem as a dependency then actioncable becomes my transitive dependency automatically and there is no way to avoid installing it.

Proposal

Depend only on these parts of Rails that swagger-docs actually uses, for example:

spec.add_runtime_dependency "activerecord", ">= 3"
spec.add_runtime_dependency "activesupport", ">= 3"

I'm happy to make a PR if you accept the change.

adamniedzielski avatar Oct 17 '17 21:10 adamniedzielski

Hi Adam

Open to PR on this - makes sense.

Rich

richhollis avatar Oct 18 '17 07:10 richhollis