-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kozakowski Karol
authored and
Kozakowski Karol
committed
Dec 22, 2015
1 parent
0f60e62
commit fef96bf
Showing
3 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# A puppet x module | ||
module Puppet_X | ||
# A COI puppet_x module | ||
module Coi | ||
# JBoss module | ||
module Jboss | ||
# A custom class that holds custom functions | ||
class Functions | ||
|
||
class << self | ||
# PRIVATE INTERNAL FUNCTION. Return the version of application server | ||
# | ||
# @param args [Array] should be only one argument in array | ||
# @return [string|string[]] the application server name(s) | ||
def jboss_short_version args | ||
raise(Puppet::ParseError, "jboss_short_version(): Wrong number of arguments given (#{args.size} for 1)") if args.size != 1 | ||
|
||
version = args[0] | ||
re = /^(?:[a-z]+-)?(\d+\.\d+)\.\d+(?:\.[A-Za-z]+)?$/ | ||
m = re.match(version) | ||
if m then m[1] else nil end | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters