iisconfig 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -7,8 +7,8 @@ module IISConfig
7
7
  tool = :appcmd
8
8
 
9
9
  puts " #{tool.to_s} #{args.join(' ')}"
10
- result = `c:/windows/system32/inetsrv/appcmd #{args.join(' ')}`
11
- raise Exception.new($?.exitstatus) unless result
10
+ result = `c:/windows/system32/inetsrv/appcmd #{args.join(' ')}"`
11
+ raise Exception.new($?.exitstatus) unless $?.success?
12
12
  result
13
13
  end
14
14
 
@@ -42,6 +42,7 @@ module IISConfig
42
42
  end
43
43
 
44
44
  def delete
45
+ return %W(DELETE SITE \"#{@name}\") if @name.include?(' ')
45
46
  %W{DELETE SITE #{@name}}
46
47
  end
47
48
 
@@ -49,7 +50,7 @@ module IISConfig
49
50
  args = []
50
51
  args << 'ADD'
51
52
  args << 'SITE'
52
- args << "/name:#{@name}"
53
+ args << "/name:\"#{@name}\""
53
54
  args << "/bindings:\"#{@bindings.join('","')}\""
54
55
  args << "/physicalPath:#{@physical_path.gsub(/\//, '\\')}"
55
56
 
@@ -66,8 +67,8 @@ module IISConfig
66
67
  commands = []
67
68
  commands << delete if exist? :site, @name
68
69
  commands << add
69
- commands << %W{SET SITE /site.name:#{@name} /[path='#{@path}'].applicationPool:#{@app_pool}} unless @app_pool.nil?
70
- commands << %W{SET SITE /site.name:#{@name} /[path='#{@path}']} if @app_pool.nil?
70
+ commands << %W{SET SITE /site.name:\"#{@name}\" /[path='#{@path}'].applicationPool:#{@app_pool}} unless @app_pool.nil?
71
+ commands << %W{SET SITE /site.name:\"#{@name}\" /[path='#{@path}']} if @app_pool.nil?
71
72
 
72
73
  @applications.each do |s|
73
74
  commands += s.build_commands @name, @app_pool
data/test/example.rb CHANGED
@@ -47,6 +47,22 @@ ftp_site do |s|
47
47
  s.allow_ssl
48
48
  end
49
49
 
50
+ app_pool do |p|
51
+ p.name 'Default-Web-Site'
52
+ p.runtime_version :'v2.0'
53
+ p.pipeline_mode 'Classic'
54
+ p.process_model do |pm|
55
+ pm.identity_type 'NetworkService'
56
+ end
57
+
58
+ p.site do |s|
59
+ s.name 'Default Web Site'
60
+ s.path '/'
61
+ s.physical_path 'C:\\inetpub\\wwwroot'
62
+ s.binding "http/*:8088:localhost"
63
+ end
64
+ end
65
+
50
66
  after do
51
67
  puts "done"
52
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iisconfig
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-05-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gli
16
- requirement: &22591860 !ruby/object:Gem::Requirement
16
+ requirement: &20496300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *22591860
24
+ version_requirements: *20496300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rainbow
27
- requirement: &22591152 !ruby/object:Gem::Requirement
27
+ requirement: &20495736 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *22591152
35
+ version_requirements: *20495736
36
36
  description: IIS Configuration
37
37
  email:
38
38
  - stuff@lukesmith.net
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  segments:
72
72
  - 0
73
- hash: 242673005
73
+ hash: 1019746637
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  none: false
76
76
  requirements:
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
79
  version: '0'
80
80
  segments:
81
81
  - 0
82
- hash: 242673005
82
+ hash: 1019746637
83
83
  requirements: []
84
84
  rubyforge_project: iisconfig
85
85
  rubygems_version: 1.8.12