sbadia / puppet-gitlab

Puppet module for manage GitLab installation
http://forge.puppetlabs.com/sbadia/gitlab
GNU General Public License v3.0
131 stars 76 forks source link

Allow adjustment of number of bundler threads #150

Closed atomaka closed 10 years ago

atomaka commented 10 years ago

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 of nproc on our own and using that value.

sbadia commented 10 years ago

We can use facter's $processorcount fact as default value ?

atomaka commented 10 years ago

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.

atomaka commented 10 years ago

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 .

sbadia commented 10 years ago

@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 !!