Closed atomaka closed 10 years ago
We can use facter's $processorcount
fact as default value ?
processorcount
makes much more since than using nproc's value. I've updated with your suggestion. However, the value from the processorcount
fact does not pass the regular expression. Tests pass as expected (-j2 is appropriately added to the bundle line) if this regex is removed.
Still need to update comments and readme with updated default value. I'll do that and squash once the regex issue is resolved.
Fixed the issue by placing the facts in all files. This redundancy in tests should probably be removed but is another matter. I also updated the name of the attribute to jobs to match bundler wording. Passes Travis and smoke tests with vagrant box. This should be ready for review, @sbadia .
@atomaka yup! it was in the refactorization in https://github.com/sbadia/puppet-gitlab/blob/bug/102/sbadia/spec/spec_helper.rb#L13-L23 (it would be nice if we can definitely deal with that…). Anyway thank you for this PR !!
In PR #149, @sbadia points out that we can use multiple threads with bundle. This PR implements this setting as a parameter called
gitlab_bundler_threads
. This is set to a safe default of 1, but we might consider collecting the result ofnproc
on our own and using that value.