Class: Webbynode::Gemfile

Inherits:
Object show all
Defined in:
lib/webbynode/gemfile.rb

Instance Method Summary collapse

Instance Method Details

#dependencies(args = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/webbynode/gemfile.rb', line 9

def dependencies(args={})
  excluded_groups = (args[:without] || []).map { |g| g.to_sym }
  
  dependencies = Bundler.definition.dependencies
  dependencies.reject! do |d| 
    d.groups.any? { |g| excluded_groups.include? g }
  end
  
  dependencies.map &:name
end

#present?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/webbynode/gemfile.rb', line 5

def present?
  io.file_exists?("Gemfile")
end