Class: DNApi::Components::RubyVersion

Inherits:
Object
  • Object
show all
Defined in:
lib/dnapi/components/ruby.rb

Direct Known Subclasses

JRuby, REE, Rubinius, Rubinius19, Ruby186, Ruby187, Ruby192, Ruby193

Constant Summary collapse

NAME =
'Ruby'.freeze
RUBYGEMS_VERSION =
'1.8.17'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.allObject



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/dnapi/components/ruby.rb', line 4

def self.all
  [ DNApi::Components::Ruby186,
    DNApi::Components::Ruby187,
    DNApi::Components::REE,
    DNApi::Components::JRuby187,
    DNApi::Components::JRuby192,
    DNApi::Components::Rubinius,
    DNApi::Components::Rubinius19,
    DNApi::Components::Ruby193,
    DNApi::Components::Ruby192 ]
end

.encoding_awareObject



16
17
18
# File 'lib/dnapi/components/ruby.rb', line 16

def self.encoding_aware
  [DNApi::Components::Ruby192, DNApi::Components::Ruby193, DNApi::Components::Rubinius, DNApi::Components::Rubinius19]
end

Instance Method Details

#mysql_adapterObject

This shit is used by old versions of cloud_cookbooks and we can’t remove it without breaking the ones that didn’t upgrade.

The latest versions of the cookbooks won’t use this anymore. To know how to specify a database adapter see DNApi::DbStack#adapter_for



45
46
47
# File 'lib/dnapi/components/ruby.rb', line 45

def mysql_adapter
  'mysql'
end

#ruby_flavorObject



31
32
33
# File 'lib/dnapi/components/ruby.rb', line 31

def ruby_flavor
  'dev-lang/ruby'
end

#ruby_moduleObject



35
36
37
# File 'lib/dnapi/components/ruby.rb', line 35

def ruby_module
  'ruby18'
end

#ruby_versionObject



27
28
29
# File 'lib/dnapi/components/ruby.rb', line 27

def ruby_version
  "#{version}_p#{patch_level}"
end

#rubygems_versionObject



23
24
25
# File 'lib/dnapi/components/ruby.rb', line 23

def rubygems_version
  self.class::RUBYGEMS_VERSION
end