dep icon indicating copy to clipboard operation
dep copied to clipboard

Grouping gems by ENV

Open ce-manalang opened this issue 11 years ago • 4 comments

Hi guys,

I wonder how you guys use dep in production. Do you guys also install test specific gems in non-test environments?

Thanks!

ce-manalang avatar Feb 15 '14 10:02 ce-manalang

+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

activestylus avatar Mar 22 '14 04:03 activestylus

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].

djanowski avatar Mar 31 '14 13:03 djanowski

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

dcadenas avatar Jun 18 '14 08:06 dcadenas

Maybe you can have 2 files: .gems and .gems.test.

install:
    dep install
    dep install -f .gems.test

frodsan avatar Jun 20 '14 21:06 frodsan