Class: PoiseJavascript::JavascriptProviders::System
- Includes:
- PoiseLanguages::System::Mixin
- Defined in:
- lib/poise_javascript/javascript_providers/system.rb
Overview
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.provides_auto?(node, resource) ⇒ Boolean
39 40 41 42 43 44 |
# File 'lib/poise_javascript/javascript_providers/system.rb', line 39 def self.provides_auto?(node, resource) # Don't auto on platforms I know have no system package by default. Kind # of pointless since the nodejs provider will hit on these platforms # anyway so this shouldn't ever happen. super && !node.platform_family?('rhel') && !node.platform?('amazon') end |
Instance Method Details
#javascript_binary ⇒ Object
46 47 48 49 50 |
# File 'lib/poise_javascript/javascript_providers/system.rb', line 46 def javascript_binary # Debian and Ubuntu after 12.04 changed the binary name ಠ_ಠ. binary_name = node.value_for_platform(debian: {default: 'nodejs'}, ubuntu: {'12.04' => 'node', default: 'nodejs'}, default: 'node') ::File.join('', 'usr', 'bin', binary_name) end |