From 5090e93a9af43996407dc36f6c2a549d7e83d787 Mon Sep 17 00:00:00 2001
From: Akram Ben Aissi <akram@free.fr>
Date: Wed, 28 Jan 2015 04:14:27 -0500
Subject: Allows it to run on OSX

- Versions of ruby ported on OSX requires escaping of hyphens in regexp
- Adds documentation on packages required by OSX to run openshift-online-ansible on OSX
---
 lib/aws_command.rb | 2 +-
 lib/gce_command.rb | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'lib')

diff --git a/lib/aws_command.rb b/lib/aws_command.rb
index 1205fd5f7..17f33fbed 100644
--- a/lib/aws_command.rb
+++ b/lib/aws_command.rb
@@ -114,7 +114,7 @@ module OpenShift
 
       desc "ssh", "Ssh to an instance"
       def ssh(*ssh_ops, host)
-        if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)/
+        if host =~ /^([\w\d_.\-]+)@([\w\d\-_.]+)/
           user = $1
           host = $2
         end
diff --git a/lib/gce_command.rb b/lib/gce_command.rb
index b0a84d27b..ac01a7f00 100644
--- a/lib/gce_command.rb
+++ b/lib/gce_command.rb
@@ -137,7 +137,7 @@ module OpenShift
              :desc => 'A relative path where files are written to.'
       desc "scp_from", "scp files from an instance"
       def scp_from(*ssh_ops, host)
-        if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)$/
+        if host =~ /^([\w\d_.\-]+)@([\w\d\-_.]+)$/
           user = $1
           host = $2
         end
@@ -169,7 +169,7 @@ module OpenShift
 
       desc "ssh", "Ssh to an instance"
       def ssh(*ssh_ops, host)
-        if host =~ /^([\w\d_.-]+)@([\w\d-_.]+)/
+        if host =~ /^([\w\d_.\-]+)@([\w\d\-_.]+)/
           user = $1
           host = $2
         end
-- 
cgit v1.2.3