inetmgr 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +159 -0
- data/RELEASE-NOTES.rdoc +35 -0
- data/doc/Application.html +177 -0
- data/doc/ApplicationPool.html +177 -0
- data/doc/AutoStartProvider.html +177 -0
- data/doc/BindingInformation.html +349 -0
- data/doc/Configuration.html +283 -0
- data/doc/IisConfiguration.html +383 -0
- data/doc/IisObject.html +484 -0
- data/doc/IisObjectCollection.html +534 -0
- data/doc/Inetmgr.html +179 -0
- data/doc/Inetmgr/InetmgrTask.html +338 -0
- data/doc/Object.html +254 -0
- data/doc/PeriodicRestart.html +177 -0
- data/doc/ProcessModel.html +192 -0
- data/doc/README_rdoc.html +114 -0
- data/doc/RSpecExtensions.html +257 -0
- data/doc/Recycling.html +177 -0
- data/doc/Site.html +228 -0
- data/doc/SiteConfiguration.html +269 -0
- data/doc/SiteLimit.html +177 -0
- data/doc/VirtualDirectory.html +177 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +166 -0
- data/doc/js/darkfish.js +116 -0
- data/doc/js/jquery.js +32 -0
- data/doc/js/quicksearch.js +114 -0
- data/doc/js/thickbox-compressed.js +10 -0
- data/doc/rdoc.css +706 -0
- data/inetmgr.gemspec +21 -0
- data/lib/inetmgr.rb +30 -0
- data/lib/inetmgr/configuration.rb +23 -0
- data/lib/inetmgr/iis_configuration.rb +36 -0
- data/lib/inetmgr/iis_object.rb +85 -0
- data/lib/inetmgr/iis_object/application.rb +11 -0
- data/lib/inetmgr/iis_object/application_pool.rb +19 -0
- data/lib/inetmgr/iis_object/auto_start_provider.rb +3 -0
- data/lib/inetmgr/iis_object/binding_information.rb +26 -0
- data/lib/inetmgr/iis_object/periodic_restart.rb +3 -0
- data/lib/inetmgr/iis_object/process_model.rb +18 -0
- data/lib/inetmgr/iis_object/recycling.rb +5 -0
- data/lib/inetmgr/iis_object/site.rb +24 -0
- data/lib/inetmgr/iis_object/site_limit.rb +7 -0
- data/lib/inetmgr/iis_object/virtual_directory.rb +5 -0
- data/lib/inetmgr/iis_object_collection.rb +51 -0
- data/lib/inetmgr/site_configuration.rb +34 -0
- data/lib/rake/inetmgrtask.rb +74 -0
- data/lib/string.rb +5 -0
- data/nbproject/private/config.properties +0 -0
- data/nbproject/private/private.properties +4 -0
- data/nbproject/private/private.xml +4 -0
- data/nbproject/private/rake-d.txt +2 -0
- data/nbproject/project.properties +10 -0
- data/nbproject/project.xml +16 -0
- data/spec/application_pool_spec.rb +120 -0
- data/spec/application_spec.rb +38 -0
- data/spec/auto_start_provider_spec.rb +25 -0
- data/spec/bingin_information_spec.rb +21 -0
- data/spec/iis_configuration_spec.rb +35 -0
- data/spec/site_app_settings_spec.rb +61 -0
- data/spec/site_configuration_spec.rb +24 -0
- data/spec/site_connection_strings_spec.rb +17 -0
- data/spec/site_spec.rb +34 -0
- data/spec/site_validation_settings_spec.rb +18 -0
- data/spec/spec_env.rb +22 -0
- data/spec/string_spec.rb +16 -0
- data/spec/virtual_directory_spec.rb +1 -0
- data/test/create_site.rb +26 -0
- data/test/print_iis_config.rb +56 -0
- data/test/rakefile.rb +27 -0
- metadata +156 -0
data/spec/spec_env.rb
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'uuid'
|
4
|
+
require File.expand_path(File.join(File.dirname(__FILE__), "../lib/inetmgr"))
|
5
|
+
|
6
|
+
module RSpecExtensions
|
7
|
+
|
8
|
+
def configure(apply_changes = true)
|
9
|
+
cfg = IisConfiguration.new
|
10
|
+
yield cfg
|
11
|
+
cfg.apply_changes if apply_changes
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_random_name
|
15
|
+
UUID.generate(:compact).to_s
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
RSpec::Runner.configure do |config|
|
21
|
+
config.include RSpecExtensions
|
22
|
+
end
|
data/spec/string_spec.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
require File.join(File.expand_path(File.dirname(__FILE__)), '../lib/string.rb')
|
3
|
+
|
4
|
+
describe "When converting underscored symbols to camel case" do
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
@values = ['foo_bar']
|
8
|
+
@results = []
|
9
|
+
@values.each {|v| @results << v.to_camel_case }
|
10
|
+
end
|
11
|
+
|
12
|
+
it "all samples shoud be converted ok" do
|
13
|
+
@results[0].should == 'fooBar'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'spec_env'
|
data/test/create_site.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require '../lib/inetmgr.rb'
|
2
|
+
|
3
|
+
IisConfiguration.configure do |cfg|
|
4
|
+
cfg.get_sites.add do |site|
|
5
|
+
site.name = "Contoso"
|
6
|
+
site.auto_start = true
|
7
|
+
site.bindings.add do |b|
|
8
|
+
b.protocol = "http"
|
9
|
+
b.binding_information = "*:80:www.contoso.com"
|
10
|
+
end
|
11
|
+
|
12
|
+
site.bindings.add do |b|
|
13
|
+
b.protocol = "https"
|
14
|
+
b.binding_information = "*:443:"
|
15
|
+
b.add_ssl_certificate "e2564766bad7ebec8cf6899caa2a27c6391c4f19", "MY"
|
16
|
+
end
|
17
|
+
|
18
|
+
site.applications.add do |app|
|
19
|
+
app.path = "/"
|
20
|
+
app.virtual_directories.add do |dir|
|
21
|
+
dir.path = "/"
|
22
|
+
dir.physical_path = "D:\\temp"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require '../lib/inetmgr.rb'
|
2
|
+
|
3
|
+
cfg = IisConfiguration.new
|
4
|
+
|
5
|
+
sites = cfg.get_sites
|
6
|
+
pools = cfg.get_application_pools
|
7
|
+
|
8
|
+
pools.each do |p|
|
9
|
+
puts "\r\nPOOL: #{p.name}"
|
10
|
+
puts "----"
|
11
|
+
puts " - auto_start:\t #{p.auto_start}"
|
12
|
+
puts " - always_running:\t #{p.always_running}"
|
13
|
+
puts " - CLRConfigFile:\t #{p.CLRConfigFile}" # not yet mapped
|
14
|
+
puts " - enable_32bit:\t #{p.enable_32bit}"
|
15
|
+
puts " - enableConfigurationOverride:\t #{p.enableConfigurationOverride}" # not yet mapped
|
16
|
+
puts " - classic_pipeline:\t #{p.classic_pipeline}"
|
17
|
+
puts " - managed_runtime_version:\t #{p.managed_runtime_version}"
|
18
|
+
puts " - passAnonymousToken:\t #{p.passAnonymousToken}"
|
19
|
+
|
20
|
+
puts "\r\n - process_model:"
|
21
|
+
puts " - identity_type: #{p.process_model.identity_type}"
|
22
|
+
puts " - idleTimeout: #{p.process_model.idleTimeout}"
|
23
|
+
puts " - logon_type: #{p.process_model.logon_type}"
|
24
|
+
puts " - user_name '#{p.process_model.user_name}'"
|
25
|
+
puts " - password '#{p.process_model.password}'"
|
26
|
+
puts " - load_user_profile: #{p.process_model.load_user_profile}"
|
27
|
+
|
28
|
+
puts "\r\n - recycling:"
|
29
|
+
puts " - logEventOnRecycle: #{p.recycling.logEventOnRecycle}"
|
30
|
+
puts " - periodic_restart.schedulecount: #{p.recycling.periodic_restart.schedule.size}"
|
31
|
+
puts "----------------------------"
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
sites.each do |s|
|
36
|
+
|
37
|
+
puts "SITE: #{s.name} #{s.bindings.size}"
|
38
|
+
puts "----"
|
39
|
+
|
40
|
+
s.bindings.each do |b|
|
41
|
+
puts " - binding: #{b.protocol}|#{b.binding_information}"
|
42
|
+
end
|
43
|
+
|
44
|
+
puts " - limits: bandwitdth: #{s.limits.max_bandwidth}, connections: #{s.limits.max_connections}, connection timout: #{s.limits.connection_timeout}"
|
45
|
+
|
46
|
+
s.applications.each do |a|
|
47
|
+
puts " - app: #{a.path}"
|
48
|
+
a.virtual_directories.each do |d|
|
49
|
+
puts " - dir: #{d.path} -> #{d.physical_path}"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
puts "----------------------------"
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
|
data/test/rakefile.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require '../lib/inetmgr'
|
2
|
+
|
3
|
+
task :default => [:show_all_settings]
|
4
|
+
|
5
|
+
task :show_all_settings do
|
6
|
+
|
7
|
+
cfg = IisConfiguration.new
|
8
|
+
|
9
|
+
puts "APPLICATION POOLS:"
|
10
|
+
puts ""
|
11
|
+
puts "name |auto_start|runtime_version|classic_pipeline|always_running"
|
12
|
+
puts "------------------------------------------------------------------------------------"
|
13
|
+
cfg.get_application_pools.each do |p|
|
14
|
+
puts sprintf "%-25s|%-10s|%-15s|%-16s|%-s", p.name, p.auto_start, p.managed_runtime_version, p.classic_pipeline, p.always_running
|
15
|
+
end
|
16
|
+
|
17
|
+
puts "SITES:"
|
18
|
+
puts ""
|
19
|
+
puts "name |auto_start"
|
20
|
+
puts "------------------------------------------"
|
21
|
+
cfg.get_sites.each do |s|
|
22
|
+
puts sprintf "%-25s|%-10s", s.name, s.auto_start
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: inetmgr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 4
|
8
|
+
- 0
|
9
|
+
version: 0.4.0
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Gino Heyman
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-04-16 00:00:00 +02:00
|
18
|
+
default_executable:
|
19
|
+
dependencies: []
|
20
|
+
|
21
|
+
description: inetmgr allows you to inspect/configure IIS configuration sections and elements.
|
22
|
+
email: gino.heyman@gmail.com
|
23
|
+
executables: []
|
24
|
+
|
25
|
+
extensions: []
|
26
|
+
|
27
|
+
extra_rdoc_files: []
|
28
|
+
|
29
|
+
files:
|
30
|
+
- doc/Application.html
|
31
|
+
- doc/ApplicationPool.html
|
32
|
+
- doc/AutoStartProvider.html
|
33
|
+
- doc/BindingInformation.html
|
34
|
+
- doc/Configuration.html
|
35
|
+
- doc/IisConfiguration.html
|
36
|
+
- doc/IisObject.html
|
37
|
+
- doc/IisObjectCollection.html
|
38
|
+
- doc/images/brick.png
|
39
|
+
- doc/images/brick_link.png
|
40
|
+
- doc/images/bug.png
|
41
|
+
- doc/images/bullet_black.png
|
42
|
+
- doc/images/bullet_toggle_minus.png
|
43
|
+
- doc/images/bullet_toggle_plus.png
|
44
|
+
- doc/images/date.png
|
45
|
+
- doc/images/find.png
|
46
|
+
- doc/images/loadingAnimation.gif
|
47
|
+
- doc/images/macFFBgHack.png
|
48
|
+
- doc/images/package.png
|
49
|
+
- doc/images/page_green.png
|
50
|
+
- doc/images/page_white_text.png
|
51
|
+
- doc/images/page_white_width.png
|
52
|
+
- doc/images/plugin.png
|
53
|
+
- doc/images/ruby.png
|
54
|
+
- doc/images/tag_green.png
|
55
|
+
- doc/images/wrench.png
|
56
|
+
- doc/images/wrench_orange.png
|
57
|
+
- doc/images/zoom.png
|
58
|
+
- doc/index.html
|
59
|
+
- doc/Inetmgr/InetmgrTask.html
|
60
|
+
- doc/Inetmgr.html
|
61
|
+
- doc/js/darkfish.js
|
62
|
+
- doc/js/jquery.js
|
63
|
+
- doc/js/quicksearch.js
|
64
|
+
- doc/js/thickbox-compressed.js
|
65
|
+
- doc/Object.html
|
66
|
+
- doc/PeriodicRestart.html
|
67
|
+
- doc/ProcessModel.html
|
68
|
+
- doc/rdoc.css
|
69
|
+
- doc/README_rdoc.html
|
70
|
+
- doc/Recycling.html
|
71
|
+
- doc/RSpecExtensions.html
|
72
|
+
- doc/Site.html
|
73
|
+
- doc/SiteConfiguration.html
|
74
|
+
- doc/SiteLimit.html
|
75
|
+
- doc/VirtualDirectory.html
|
76
|
+
- inetmgr.gemspec
|
77
|
+
- lib/inetmgr/configuration.rb
|
78
|
+
- lib/inetmgr/iis_configuration.rb
|
79
|
+
- lib/inetmgr/iis_object/application.rb
|
80
|
+
- lib/inetmgr/iis_object/application_pool.rb
|
81
|
+
- lib/inetmgr/iis_object/auto_start_provider.rb
|
82
|
+
- lib/inetmgr/iis_object/binding_information.rb
|
83
|
+
- lib/inetmgr/iis_object/periodic_restart.rb
|
84
|
+
- lib/inetmgr/iis_object/process_model.rb
|
85
|
+
- lib/inetmgr/iis_object/recycling.rb
|
86
|
+
- lib/inetmgr/iis_object/site.rb
|
87
|
+
- lib/inetmgr/iis_object/site_limit.rb
|
88
|
+
- lib/inetmgr/iis_object/virtual_directory.rb
|
89
|
+
- lib/inetmgr/iis_object.rb
|
90
|
+
- lib/inetmgr/iis_object_collection.rb
|
91
|
+
- lib/inetmgr/site_configuration.rb
|
92
|
+
- lib/inetmgr.rb
|
93
|
+
- lib/rake/inetmgrtask.rb
|
94
|
+
- lib/string.rb
|
95
|
+
- nbproject/private/config.properties
|
96
|
+
- nbproject/private/private.properties
|
97
|
+
- nbproject/private/private.xml
|
98
|
+
- nbproject/private/rake-d.txt
|
99
|
+
- nbproject/project.properties
|
100
|
+
- nbproject/project.xml
|
101
|
+
- README.rdoc
|
102
|
+
- RELEASE-NOTES.rdoc
|
103
|
+
- spec/application_pool_spec.rb
|
104
|
+
- spec/application_spec.rb
|
105
|
+
- spec/auto_start_provider_spec.rb
|
106
|
+
- spec/bingin_information_spec.rb
|
107
|
+
- spec/iis_configuration_spec.rb
|
108
|
+
- spec/site_app_settings_spec.rb
|
109
|
+
- spec/site_configuration_spec.rb
|
110
|
+
- spec/site_connection_strings_spec.rb
|
111
|
+
- spec/site_spec.rb
|
112
|
+
- spec/site_validation_settings_spec.rb
|
113
|
+
- spec/spec_env.rb
|
114
|
+
- spec/string_spec.rb
|
115
|
+
- spec/virtual_directory_spec.rb
|
116
|
+
- test/create_site.rb
|
117
|
+
- test/print_iis_config.rb
|
118
|
+
- test/rakefile.rb
|
119
|
+
has_rdoc: true
|
120
|
+
homepage: http://typesafe.be/inetmgr/
|
121
|
+
licenses: []
|
122
|
+
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
|
126
|
+
require_paths:
|
127
|
+
- lib
|
128
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
segments:
|
134
|
+
- 1
|
135
|
+
- 9
|
136
|
+
- 2
|
137
|
+
version: 1.9.2
|
138
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
139
|
+
none: false
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
segments:
|
144
|
+
- 1
|
145
|
+
- 3
|
146
|
+
- 6
|
147
|
+
version: 1.3.6
|
148
|
+
requirements: []
|
149
|
+
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 1.3.7
|
152
|
+
signing_key:
|
153
|
+
specification_version: 3
|
154
|
+
summary: A library for managing IIS configuration settings.
|
155
|
+
test_files: []
|
156
|
+
|