vmc-IronFoundry 0.3.16.IF.3 → 0.3.17.IF.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cli.rb CHANGED
@@ -1,6 +1,7 @@
1
- ROOT = File.expand_path(File.dirname(__FILE__))
2
- WINDOWS = !!(RUBY_PLATFORM =~ /mingw|mswin32|cygwin/)
1
+ require "rbconfig"
3
2
 
3
+ ROOT = File.expand_path(File.dirname(__FILE__))
4
+ WINDOWS = !!(RbConfig::CONFIG['host_os'] =~ /mingw|mswin32|cygwin/)
4
5
 
5
6
  module VMC
6
7
  autoload :Client, "#{ROOT}/vmc/client"
@@ -167,7 +167,7 @@ module VMC::Cli::Command
167
167
  else
168
168
  wait_for_tunnel_start(port)
169
169
  unless start_local_prog(clients, client_name, conn_info, port)
170
- err "'#{client_name}' executation failed; is it in your $PATH?"
170
+ err "'#{client_name}' execution failed; is it in your $PATH?"
171
171
  end
172
172
  end
173
173
  end
@@ -50,13 +50,14 @@ module VMC::Cli
50
50
  5.times do
51
51
  begin
52
52
  results = @telnet_client.login("Name"=>auth_info["username"],
53
- "Password"=>auth_info["password"]) {|line|
54
- if line =~ /[$%#>] \z/n
55
- prompt = line
56
- elsif line =~ /Login failed/
57
- err_msg = line
58
- end
59
- }
53
+ "Password"=>auth_info["password"])
54
+ lines = results.split("\n")
55
+ last_line = lines.pop
56
+ if last_line =~ /[$%#>] \z/n
57
+ prompt = last_line
58
+ elsif last_line =~ /Login failed/
59
+ err_msg = last_line
60
+ end
60
61
  break
61
62
  rescue TimeoutError
62
63
  sleep 1
@@ -19,13 +19,18 @@ module VMC::Cli
19
19
  'WSGI' => ['wsgi', { :mem => '64M', :description => 'Python WSGI Application'}],
20
20
  'Django' => ['django', { :mem => '128M', :description => 'Python Django Application'}],
21
21
  'ASP.NET 4.0' => ['aspdotnet', { :mem => '64M', :description => 'ASP.NET 4.0 Application'}],
22
+ 'dotNet' => ['dotNet', { :mem => '128M', :description => '.Net Web Application'}],
22
23
  'Rack' => ['rack', { :mem => '128M', :description => 'Rack Application'}]
23
24
  }
24
25
 
25
26
  class << self
26
27
 
27
- def known_frameworks
28
- FRAMEWORKS.keys
28
+ def known_frameworks(available_frameworks)
29
+ frameworks = []
30
+ FRAMEWORKS.each do |key,fw|
31
+ frameworks << key if available_frameworks.include? [fw[0]]
32
+ end
33
+ frameworks
29
34
  end
30
35
 
31
36
  def lookup(name)
@@ -88,17 +93,13 @@ module VMC::Cli
88
93
  f.exec = "ruby #{matched_file}"
89
94
  return f
90
95
  end
91
- # Node.js
92
- elsif !Dir.glob('*.js').empty?
93
- if File.exist?('server.js') || File.exist?('app.js') || File.exist?('index.js') || File.exist?('main.js')
94
- return Framework.lookup('Node')
95
- end
96
96
 
97
97
  # ASP.NET 4.0
98
98
  elsif !Dir.glob('*.config').empty?
99
99
  if File.exist?('web.config')
100
100
  return Framework.lookup('ASP.NET 4.0')
101
101
  end
102
+
102
103
  # PHP
103
104
  elsif !Dir.glob('*.php').empty?
104
105
  return Framework.lookup('PHP')
@@ -115,6 +116,16 @@ module VMC::Cli
115
116
  # Python
116
117
  elsif !Dir.glob('wsgi.py').empty?
117
118
  return Framework.lookup('WSGI')
119
+
120
+ # .Net
121
+ elsif !Dir.glob('web.config').empty?
122
+ return Framework.lookup('dotNet')
123
+
124
+ # Node.js
125
+ elsif !Dir.glob('*.js').empty?
126
+ if File.exist?('server.js') || File.exist?('app.js') || File.exist?('index.js') || File.exist?('main.js')
127
+ return Framework.lookup('Node')
128
+ end
118
129
  end
119
130
 
120
131
  # Default to Standalone if no other match was made
@@ -197,7 +197,7 @@ module VMC::Cli::ManifestHelper
197
197
  "Select Application Type",
198
198
  :indexed => true,
199
199
  :default => framework,
200
- :choices => VMC::Cli::Framework.known_frameworks
200
+ :choices => VMC::Cli::Framework.known_frameworks(frameworks_info)
201
201
  )
202
202
  )
203
203
  display "Selected #{framework}"
data/lib/cli/version.rb CHANGED
@@ -2,6 +2,6 @@ module VMC
2
2
  module Cli
3
3
  # This version number is used as the RubyGem release version.
4
4
  # The internal VMC version number is VMC::VERSION.
5
- VERSION = '0.3.16.IF.3'
5
+ VERSION = '0.3.17.IF.2'
6
6
  end
7
7
  end
data/lib/cli/zip_util.rb CHANGED
@@ -10,7 +10,7 @@ module VMC::Cli
10
10
  class << self
11
11
 
12
12
  def to_dev_null
13
- if !!RUBY_PLATFORM['mingw'] || !!RUBY_PLATFORM['mswin32'] || !!RUBY_PLATFORM['cygwin']
13
+ if WINDOWS
14
14
  'nul'
15
15
  else
16
16
  '/dev/null'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vmc-IronFoundry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.16.IF.3
4
+ version: 0.3.17.IF.2
5
5
  prerelease: 7
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-03 00:00:00.000000000 Z
12
+ date: 2012-05-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json_pure
16
- requirement: &26166276 !ruby/object:Gem::Requirement
16
+ requirement: &26494716 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 1.7.0
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *26166276
27
+ version_requirements: *26494716
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rubyzip
30
- requirement: &26165652 !ruby/object:Gem::Requirement
30
+ requirement: &26494260 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
@@ -35,10 +35,10 @@ dependencies:
35
35
  version: 0.9.4
36
36
  type: :runtime
37
37
  prerelease: false
38
- version_requirements: *26165652
38
+ version_requirements: *26494260
39
39
  - !ruby/object:Gem::Dependency
40
40
  name: rest-client
41
- requirement: &26165028 !ruby/object:Gem::Requirement
41
+ requirement: &26493816 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
44
  - - ! '>='
@@ -49,10 +49,10 @@ dependencies:
49
49
  version: 1.7.0
50
50
  type: :runtime
51
51
  prerelease: false
52
- version_requirements: *26165028
52
+ version_requirements: *26493816
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: terminal-table
55
- requirement: &26163612 !ruby/object:Gem::Requirement
55
+ requirement: &26492916 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: 1.4.2
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *26163612
63
+ version_requirements: *26492916
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: interact
66
- requirement: &26163120 !ruby/object:Gem::Requirement
66
+ requirement: &26484864 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: 0.4.0
72
72
  type: :runtime
73
73
  prerelease: false
74
- version_requirements: *26163120
74
+ version_requirements: *26484864
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: addressable
77
- requirement: &26162628 !ruby/object:Gem::Requirement
77
+ requirement: &26484408 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: 2.2.6
83
83
  type: :runtime
84
84
  prerelease: false
85
- version_requirements: *26162628
85
+ version_requirements: *26484408
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: uuidtools
88
- requirement: &26161044 !ruby/object:Gem::Requirement
88
+ requirement: &26483808 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: 2.1.0
94
94
  type: :runtime
95
95
  prerelease: false
96
- version_requirements: *26161044
96
+ version_requirements: *26483808
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rake
99
- requirement: &26160564 !ruby/object:Gem::Requirement
99
+ requirement: &26483304 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ! '>='
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: '0'
105
105
  type: :development
106
106
  prerelease: false
107
- version_requirements: *26160564
107
+ version_requirements: *26483304
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: rspec
110
- requirement: &26160216 !ruby/object:Gem::Requirement
110
+ requirement: &26482776 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,18 +115,18 @@ dependencies:
115
115
  version: 1.3.0
116
116
  type: :development
117
117
  prerelease: false
118
- version_requirements: *26160216
118
+ version_requirements: *26482776
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: webmock
121
- requirement: &26159808 !ruby/object:Gem::Requirement
121
+ requirement: &26482320 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
- - - =
124
+ - - ~>
125
125
  - !ruby/object:Gem::Version
126
126
  version: 1.5.0
127
127
  type: :development
128
128
  prerelease: false
129
- version_requirements: *26159808
129
+ version_requirements: *26482320
130
130
  description: Client library and CLI that provides access to the VMware Cloud Application
131
131
  Platform.
132
132
  email: help@ironfoundry.org