Skip to content

Commit

Permalink
build gems without docs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
jsierles2 authored and crafterm committed Nov 27, 2008
1 parent 1c6c13b commit 42ede0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/sprinkle/installers/gem.rb
Expand Up @@ -53,6 +53,7 @@ def install_commands #:nodoc:
cmd << " --version '#{version}'" if version
cmd << " --source #{source}" if source
cmd << " --install-dir #{repository}" if option?(:repository)
cmd << " --no-rdoc --no-ri" unless option?(:build_docs)
cmd
end

Expand Down
8 changes: 4 additions & 4 deletions spec/sprinkle/installers/gem_spec.rb
Expand Up @@ -49,22 +49,22 @@ def create_gem(gem, version = nil, options = {}, &block)
end

it 'should invoke the gem installer for the specified package' do
@installer.send(:install_commands).should == "gem install #{@gem}"
@installer.send(:install_commands).should == "gem install #{@gem} --no-rdoc --no-ri"
end

it 'should automatically insert pre/post commands for the specified package' do
@installer.send(:install_sequence).should == [ 'op1', "gem install #{@gem}", 'op2' ]
@installer.send(:install_sequence).should == [ 'op1', "gem install #{@gem} --no-rdoc --no-ri", 'op2']
end

end

describe 'with a specific version' do

before do
@installer = create_gem @gem, @version
@installer = create_gem @gem, @version, :build_docs => true
end

it 'should install a specific version if defined' do
it 'should install a specific version if defined, and with docs' do
@installer.send(:install_commands).should == "gem install #{@gem} --version '#{@version}'"
end

Expand Down

0 comments on commit 42ede0e

Please sign in to comment.