CDRH / api

Codenamed "Apium": An API to access all public Center for Digital Research in the Humanities resources
https://cdrhdev1.unl.edu/api_frontend
MIT License
3 stars 1 forks source link

api_bridge gem inclusion in orchid #45

Closed jduss4 closed 7 years ago

jduss4 commented 7 years ago

It appears that it is not possible to put a local or github gem dependency in a gemspec file. Ideally, orchid would be the one dictating which version of api_bridge is used because a) it is dependent upon its presence, and b) their versions will be tied together practically.

Since the gemspec can't handle it, we have a couple options that I can think of.

  1. Orchid generator inserts / updates the correct version of api_bridge in the host app's Gemfile
  2. Orchid uses a Gemfile with that single gem in it, which should grab the gem outside of the gemspec. This means that our gem's self-description won't indicate that it needs api_bridge, but I believe that practically it should work? I have not tried it out.
  3. Keep manually requiring api_bridge in the host app's Gemfile

I think I prefer 1 or 2, but 3 is what I have currently been doing just for development.

jduss4 commented 7 years ago

http://guides.rubyonrails.org/generators.html#gem

techgique commented 7 years ago

Look into possibility of a rake task that both runs the generator and bundle update

jduss4 commented 7 years ago

I think this should now be handling this. I put in placeholder api_bridge 0.0.1 for now though that release does not exist, but otherwise it seems to be working! It also now removes existing api_bridge gem lines before putting in the new one.

https://github.com/CDRH/orchid/pull/3