dep
dep copied to clipboard
Grouping gems by ENV
Hi guys,
I wonder how you guys use dep
in production. Do you guys also install test specific gems in non-test environments?
Thanks!
+1 - coming from Bundler I miss being able to specify groups so that I don't incur all my dev/testing env overhead in production
We have different .gems
files for different environments, but that quickly needs extra tooling.
I think I'd be +1 on something that makes this easier.
However, maybe it could be something more general than 'environments'? Maybe just tags?
ohm -v 2.0.0
cutest -v 1.2.1 #test
I'm not sure if multiple tags on the same gem is something that could be useful.
Even if it's not, I think I prefer a format that is line-by-line, rather than something with [sections]
.
Another option is using pure ruby to represent the dependencies in the .gems
file and let the user use plain ruby power in the gems list.
It could be something like this:
Lib "ohm" "2.0.0"
if test_condition
Lib "cutest" "1.2.1"
end
This would also open the possibility to let the user extend the library without changing it's code. For example to have git integration someone could just subclass Lib
and do something like this:
require "git-for-dep"
Git "ohm" "2.0.0" "https://github.com/soveran/ohm.git"
if test_condition
Lib "cutest" "1.2.1"
end
Maybe you can have 2 files: .gems
and .gems.test
.
install:
dep install
dep install -f .gems.test