dry-rb / dry-logic

Predicate logic with rule composition
https://dry-rb.org/gems/dry-logic/
MIT License
179 stars 66 forks source link

Add bin folder #32

Closed GustavoCaso closed 6 years ago

GustavoCaso commented 7 years ago

Fixes #30

Add bin folder with console script to load everything you to start playing with the library 🎉

GustavoCaso commented 6 years ago

@solnic can we merge this one?

artofhuman commented 6 years ago

@GustavoCaso I think we should change executables folder to exe in gemscpec. https://github.com/dry-rb/dry-logic/blob/9d1ae6bc63e6c0a1bbd5159b3f9708f9eea5f7a3/dry-logic.gemspec#L13

as well as in dry-monads for example https://github.com/dry-rb/dry-monads/blob/master/dry-monads.gemspec#L25-L26

GustavoCaso commented 6 years ago

@artofhuman but the bindir is bin by default. In dry-monads is set to exe but the no exe folder in the project. Is that correct? Looks like we should change it in dry-monads as well.

Also why you think is better to name the folder exe just for curiosity.

artofhuman commented 6 years ago

Hm, i mean we should change spec.executables to spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } or remove this spec, because as bundle say

If you use the --binstubs flag in [bundle install(1)][bundle-install], Bundler will automatically create a directory (which defaults to app_root/bin) containing all of the executables available from gems in the bundle.

timriley commented 6 years ago

@artofhuman is right, if we add this bin/ dir with some utility scripts, we either want to remove spec.executables = ... from the gemspec or tell it to look in exe/ instead of bin/.

Given that dry-logic is unlikely to ever ship its own executable, I think we could just remove it.

GustavoCaso commented 6 years ago

Thank you so much for the explanation @timriley and @artofhuman