Sha256: 611bd50722a40453c61bfac5a575b4e4b9187513d6bdad86e0840b491309e18b

Contents?: true

Size: 648 Bytes

Versions: 4

Compression:

Stored size: 648 Bytes

Contents

module Cream
  module GeneratorHelper
    module Gemfile 
      def add_gem_version name, version
        if !has_gem? name
          debug! "Adding gem: #{name}, #{version}"
          gem name, :version => version
        else
          debug! "gem: #{name}, #{version} already in Gemfile"
        end        
      end

      def add_gem name, version = nil
        if version
          add_gem_version name, version 
          return 
        end

        if !has_gem? name
          debug! "Adding gem: #{name}"
          gem name
        else
          debug! "gem: #{name} already in Gemfile"          
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cream-0.9.2 lib/generators/cream/helpers/gemfile_helper.rb
cream-0.9.1 lib/generators/cream/helpers/gemfile_helper.rb
cream-0.9.0 lib/generators/cream/helpers/gemfile_helper.rb
cream-0.8.9.3 lib/generators/cream/helpers/gemfile_helper.rb