On Wed, Jan 13, 2016 at 7:29 AM, sebb <[email protected]> wrote: > On 13 January 2016 at 11:53, Sam Ruby <[email protected]> wrote: >> On Wed, Jan 13, 2016 at 6:13 AM, sebb <[email protected]> wrote: >>> There does not seem to be much (if any) advantage of using a Gem to >>> hold the common Whimsy code. >>> >>> There are some disadvantages: >>> - testing changes to the library code is harder >>> - Gem has to be generated, uploaded and deployed >>> - having the Gem as well as the source code on the same system is >>> confusing as they may differ >>> >>> I think it would be much simpler to reference the library code using a >>> relative RUBYLIB definition. >>> >>> This will mean some changes in order to provide version tags, but >>> those need to be done anyway as the code currently assumes SVN is >>> being used. >> >> Gems can be locally installed, and Gemfiles can be used to locate >> them. The following change should allow you to do what you want: >> >> https://github.com/apache/whimsy/commit/7d09b579bf02a186a739ad72ce8096640388dec8 >> >> Should it work out, all that would need to be done is to add "require >> 'bundler/setup'" to the main executables. >> >> I don't know if this completely addresses the problem, but it is a >> reasonable first step in that it allows code to be migrated one >> application at a time. > > Still seems unnecessarily complicated, and there are then potentially > 3 different versions of the library code: > - lib/whimsy > - local Gem > - system Gem > > Defining RUBYLIB works for me locally, and can be done in a login script.
Did you give it a try? Assuming you have ~/.whimsy set up, and have installed the bundler gem, the following should "just work" with no RUBYLIB, no login script: $ git clone https://github.com/apache/whimsy.git $ ruby whimsy/www/roster/public_committee_info.rb In any case, the change is live and https://whimsy-test.apache.org/public/committee-info.json was updated, Daniel has indicated that MATT is operational. At this point, you should be good to go. And if you have changes you want to make to further move away from having a gem, feel free to make them. - Sam Ruby
