inetmgr 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,6 +54,11 @@ the use of the +configure+ method to ensure the changes get committed.
54
54
  dir.physical_path = "D:\\sites\\www.******.be"
55
55
  end
56
56
  end
57
+
58
+ site.log_file.directory = 'D:\logs'
59
+ site.log_file.period = 'Hourly'
60
+ site.log_file.format = 'IIS'
61
+ site.log_file.log_ext_file_flags = 'Date, Time, ClientIP, Method, HttpStatus, BytesSent, TimeTaken, Referer, UserAgent'
57
62
  end
58
63
  end
59
64
 
@@ -1,11 +1,15 @@
1
1
  = inetmgr Release Notes
2
2
 
3
- == Latest Version (0.5.0)
3
+ == Latest Version (0.6.0)
4
4
 
5
- - Added support for managing remote IIS instances (added server argument to COnfiguration class)
5
+ - Merged pull request from Scott Baldwin (https://github.com/scottsbaldwin) who was so kind to add support for configuring site log files.
6
6
 
7
7
  == Previous Versions
8
8
 
9
+ == 0.5.0
10
+
11
+ - Added support for managing remote IIS instances (added server argument to Configuration class)
12
+
9
13
  === 0.4.0
10
14
 
11
15
  - removed mswin32 platform indfication from gemspec, this setting turned out to be a bit too inconsistent
@@ -4,18 +4,18 @@ require 'rake/gempackagetask'
4
4
  spec = Gem::Specification.new do |s|
5
5
 
6
6
  s.name = "inetmgr"
7
- s.version = "0.5.0"
7
+ s.version = "0.6.0"
8
8
  s.summary = "A library for managing IIS configuration settings."
9
9
  s.description = "inetmgr allows you to inspect/configure IIS configuration sections and elements."
10
10
 
11
- s.required_ruby_version = '>= 1.9.2'
12
- s.required_rubygems_version = ">= 1.3.6"
13
-
14
- s.author = "Gino Heyman"
11
+ s.required_ruby_version = '>= 1.9.2'
12
+ s.required_rubygems_version = ">= 1.3.6"
13
+
14
+ s.author = "Gino Heyman"
15
15
  s.email = "gino.heyman@gmail.com"
16
16
  s.homepage = "http://typesafe.be/inetmgr/"
17
17
 
18
18
  s.files = FileList["**/**/*"].to_a
19
19
  s.require_path = "lib"
20
-
20
+
21
21
  end
@@ -7,7 +7,8 @@ class ApplicationPool < IisObject
7
7
  # prop :pass_anonymous_token, :passAnonymousToken
8
8
  # prop :queue_length, :queueLength
9
9
 
10
- prop :auto_start, :autoStart, lambda { |a| a == true ? "true" : "false" }, lambda {|value| value == "true" }
10
+ # autoStart getting returns TrueClass from WIN32OLE
11
+ prop :auto_start, :autoStart, lambda { |a| a == true ? "true" : "false" }, lambda {|value| value == true || value == "true" }
11
12
  prop :classic_pipeline, :managedPipelineMode, lambda { |a| a == true ? 1 : 0 }, lambda {|value| value.to_i == 1 }
12
13
  prop :enable_32bit, :enable32BitAppOnWin64
13
14
  prop :always_running, :startMode, lambda { |a| a == true ? "AlwaysRunning" : "OnDemand" },lambda {|value| value.to_i == 1 }
@@ -1,4 +1,5 @@
1
1
  require File.join(File.expand_path(File.dirname(__FILE__)), 'site_limit.rb')
2
+ require File.join(File.expand_path(File.dirname(__FILE__)), 'site_logfile.rb')
2
3
  require File.join(File.expand_path(File.dirname(__FILE__)), 'binding_information.rb')
3
4
  require File.join(File.expand_path(File.dirname(__FILE__)), 'application.rb')
4
5
 
@@ -7,13 +8,15 @@ class Site < IisObject
7
8
  # name
8
9
  # id
9
10
 
10
- prop :auto_start, :serverAutoStart
11
+ # autoStart getting returns TrueClass from WIN32OLE
12
+ prop :auto_start, :serverAutoStart, lambda { |a| a == true ? "true" : "false" }, lambda {|value| value == true || value == "true" }
11
13
 
12
14
  collection :applications, :application, Application
13
15
 
14
16
  children :bindings, :binding, BindingInformation
15
17
 
16
18
  child :limits, :limits, SiteLimit
19
+ child :log_file, :logFile, SiteLogFile
17
20
 
18
21
  def configure
19
22
  cfg = SiteConfiguration.new name
@@ -0,0 +1,8 @@
1
+ class SiteLogFile < IisObject
2
+
3
+ prop :directory, :directory
4
+ prop :log_ext_file_flags, :logExtFileFlags
5
+ prop :format, :logFormat
6
+ prop :period, :period
7
+
8
+ end
@@ -1,26 +1,31 @@
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
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
+
26
+ site.log_file.directory = 'D:\logs'
27
+ site.log_file.period = 'Hourly'
28
+ site.log_file.format = 'IIS'
29
+ site.log_file.log_ext_file_flags = 'Date, Time, ClientIP, Method, HttpStatus, BytesSent, TimeTaken, Referer, UserAgent'
30
+ end
31
+ end
@@ -51,6 +51,10 @@ sites.each do |s|
51
51
  end
52
52
  puts "----------------------------"
53
53
 
54
+ puts "log_file.directory: #{s.log_file.directory}"
55
+ puts "log file period: #{s.log_file.period}"
56
+ puts "log file format: #{s.log_file.format}"
57
+ puts "log file file flags: #{s.log_file.log_ext_file_flags}"
54
58
  end
55
59
 
56
60
 
@@ -22,3 +22,6 @@ task :show_all_settings do
22
22
  puts sprintf "%-25s|%-10s", s.name, s.auto_start
23
23
  end
24
24
  end
25
+
26
+
27
+
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 5
7
+ - 6
8
8
  - 0
9
- version: 0.5.0
9
+ version: 0.6.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Gino Heyman
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-08-11 00:00:00 +02:00
17
+ date: 2011-10-21 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies: []
20
20
 
@@ -73,7 +73,7 @@ files:
73
73
  - doc/SiteConfiguration.html
74
74
  - doc/SiteLimit.html
75
75
  - doc/VirtualDirectory.html
76
- - inetmgr-0.4.0.gem
76
+ - inetmgr-0.6.0.gem
77
77
  - inetmgr.gemspec
78
78
  - lib/inetmgr/configuration.rb
79
79
  - lib/inetmgr/iis_configuration.rb
@@ -86,6 +86,7 @@ files:
86
86
  - lib/inetmgr/iis_object/recycling.rb
87
87
  - lib/inetmgr/iis_object/site.rb
88
88
  - lib/inetmgr/iis_object/site_limit.rb
89
+ - lib/inetmgr/iis_object/site_logfile.rb
89
90
  - lib/inetmgr/iis_object/virtual_directory.rb
90
91
  - lib/inetmgr/iis_object.rb
91
92
  - lib/inetmgr/iis_object_collection.rb
@@ -93,12 +94,6 @@ files:
93
94
  - lib/inetmgr.rb
94
95
  - lib/rake/inetmgrtask.rb
95
96
  - lib/string.rb
96
- - nbproject/private/config.properties
97
- - nbproject/private/private.properties
98
- - nbproject/private/private.xml
99
- - nbproject/private/rake-d.txt
100
- - nbproject/project.properties
101
- - nbproject/project.xml
102
97
  - README.rdoc
103
98
  - RELEASE-NOTES.rdoc
104
99
  - spec/application_pool_spec.rb
Binary file
File without changes
@@ -1,4 +0,0 @@
1
- file.reference.inetmgr-lib=D:\\_git\\typesafe\\inetmgr\\lib
2
- file.reference.inetmgr-spec=D:\\_git\\typesafe\\inetmgr\\spec
3
- file.reference.inetmgr-test=D:\\_git\\typesafe\\inetmgr\\test
4
- platform.active=Ruby
@@ -1,4 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
3
- <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1"/>
4
- </project-private>
@@ -1,2 +0,0 @@
1
- default=
2
- show_all_settings=
@@ -1,10 +0,0 @@
1
- file.reference.inetmgr-lib=lib
2
- file.reference.inetmgr-spec=spec
3
- file.reference.inetmgr-test=test
4
- javac.classpath=
5
- main.file=create_site.rb
6
- platform.active=Ruby
7
- source.encoding=UTF-8
8
- src.dir=${file.reference.inetmgr-lib}
9
- test.spec.dir=spec
10
- test.src.dir=${file.reference.inetmgr-test}
@@ -1,16 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://www.netbeans.org/ns/project/1">
3
- <type>org.netbeans.modules.ruby.rubyproject</type>
4
- <configuration>
5
- <data xmlns="http://www.netbeans.org/ns/ruby-project/1">
6
- <name>inetmgr</name>
7
- <source-roots>
8
- <root id="src.dir"/>
9
- </source-roots>
10
- <test-roots>
11
- <root id="test.spec.dir"/>
12
- <root id="test.src.dir"/>
13
- </test-roots>
14
- </data>
15
- </configuration>
16
- </project>