简体   繁体   中英

gem spec: where do you specify dependencies that's useful in both runtime and development environments

If I understand correctly,

spec.add_runtime_dependency "something"

is for runtime dependencies.

spec.add_development_dependency "something"

is for development dependencies.

What about dependencies that's useful in both runtime and development environments, where do they go?

Runtime dependencies are what your gem needs to work (such as rails needing activesupport, or faker called by you own class).

Development dependencies are useful for when someone wants to make modifications to your gem (such as rspec)

There is not another option. Can you provide a use case example?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM