Class: Sparrowhawk::BundlerDefinition
- Inherits:
-
Bundler::Definition
- Object
- Bundler::Definition
- Sparrowhawk::BundlerDefinition
- Defined in:
- lib/sparrowhawk/bundler_definition.rb
Instance Method Summary collapse
-
#initialize ⇒ BundlerDefinition
constructor
A new instance of BundlerDefinition.
-
#runtime_dependencies ⇒ Object
Filters dependencies based on what should be in the war at runtime.
Constructor Details
#initialize ⇒ BundlerDefinition
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_dependencies ⇒ Object
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 |