Class: Sparrowhawk::BundlerDefinition

Inherits:
Bundler::Definition
  • Object
show all
Defined in:
lib/sparrowhawk/bundler_definition.rb

Instance Method Summary collapse

Constructor Details

#initializeBundlerDefinition

Returns a new instance of BundlerDefinition.



6
7
8
# File 'lib/sparrowhawk/bundler_definition.rb', line 6

def initialize
  super ::Bundler::Definition.build('Gemfile', 'Gemfile.lock', nil)
end

Instance Method Details

#runtime_dependenciesObject

Filters dependencies based on what should be in the war at runtime



11
12
13
14
15
16
17
# File 'lib/sparrowhawk/bundler_definition.rb', line 11

def runtime_dependencies
  dependencies.select do |dep|
    dep.type.to_sym == :runtime and
      (dep.platforms.empty? or dep.platforms.include?(:jruby)) and
      !(dep.groups & [:default, :production]).empty?
  end
end