Puppet Class: badstation::apps::rubymine

Defined in:
manifests/apps/rubymine.pp

Overview

Extract and provide JetBrain’s RubyMine as an app in /opt:

Parameters:

  • product_ver (Any) (defaults to: "7.0.2")
  • product_name (Any) (defaults to: "RubyMine")
  • extension (Any) (defaults to: ".tar.gz")
  • source_url_base (Any) (defaults to: "http://download.jetbrains.com/ruby/")


3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'manifests/apps/rubymine.pp', line 3

class badstation::apps::rubymine(
  $product_ver = "7.0.2",
  $product_name = "RubyMine",
  $extension = ".tar.gz",
  $source_url_base = "http://download.jetbrains.com/ruby/",  
) 
{
  $source_url = "${source_url_base}${product_name}-${product_ver}${extension}"
  $download_file = "/opt/${product_name}-${product_ver}${extension}"
  $extracted_dir = "/opt/${product_name}-${product_ver}"
  include badstation::apps
  # TODO: How to make this follow latest release?
  # Get a copy of RubyMine from:
  # http://download.jetbrains.com/ruby/RubyMine-7.0.2.tar.gz
  exec{'download rubymine':
    path => "/opt",
    command => "/usr/bin/wget ${source_url} -O ${download_file}",
  }
  
  file {$download_file:
    ensure => 'present',
    require => Exec['download rubymine'],
  }
  exec {'extract rubymine':
    path => "/opt",
    command => "/bin/tar -zxf ${download_file} -C /opt",
    require => File[$download_file]
  }
  
  file {$extracted_dir:
    ensure => 'directory',
    require => Exec["extract rubymine"]
  }
  
}