Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grouping gems by ENV #14

Open
ce-manalang opened this issue Feb 15, 2014 · 4 comments
Open

Grouping gems by ENV #14

ce-manalang opened this issue Feb 15, 2014 · 4 comments

Comments

@ce-manalang
Copy link

Hi guys,

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

Thanks!

@activestylus
Copy link

+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

@djanowski
Copy link
Contributor

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

@dcadenas
Copy link

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

@frodsan
Copy link

frodsan commented Jun 20, 2014

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants