fluent_command_builder 0.8.7 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. data/lib/fluent_command_builder/command_builder_factory.rb +43 -0
  2. data/lib/fluent_command_builder/command_builders/appcfg_python.rb +3 -1
  3. data/lib/fluent_command_builder/command_builders/appcfg_python_16.rb +10 -8
  4. data/lib/fluent_command_builder/command_builders/appcfg_python_17.rb +10 -8
  5. data/lib/fluent_command_builder/command_builders/aspnet_compiler.rb +3 -1
  6. data/lib/fluent_command_builder/command_builders/aspnet_compiler_20.rb +10 -8
  7. data/lib/fluent_command_builder/command_builders/aspnet_compiler_40.rb +10 -8
  8. data/lib/fluent_command_builder/command_builders/bundle.rb +3 -1
  9. data/lib/fluent_command_builder/command_builders/bundle_11.rb +10 -8
  10. data/lib/fluent_command_builder/command_builders/cucumber.rb +3 -1
  11. data/lib/fluent_command_builder/command_builders/cucumber_11.rb +10 -8
  12. data/lib/fluent_command_builder/command_builders/cucumber_12.rb +10 -8
  13. data/lib/fluent_command_builder/command_builders/dev_appserver_python.rb +3 -1
  14. data/lib/fluent_command_builder/command_builders/dev_appserver_python_16.rb +10 -8
  15. data/lib/fluent_command_builder/command_builders/dev_appserver_python_17.rb +10 -8
  16. data/lib/fluent_command_builder/command_builders/dotcover.rb +3 -1
  17. data/lib/fluent_command_builder/command_builders/dotcover_10.rb +10 -8
  18. data/lib/fluent_command_builder/command_builders/dotcover_11.rb +10 -8
  19. data/lib/fluent_command_builder/command_builders/dotcover_12.rb +10 -8
  20. data/lib/fluent_command_builder/command_builders/dotcover_20.rb +10 -8
  21. data/lib/fluent_command_builder/command_builders/fastlinkchecker.rb +3 -1
  22. data/lib/fluent_command_builder/command_builders/fastlinkchecker_21.rb +10 -8
  23. data/lib/fluent_command_builder/command_builders/installutil.rb +3 -1
  24. data/lib/fluent_command_builder/command_builders/installutil_11.rb +10 -8
  25. data/lib/fluent_command_builder/command_builders/installutil_20.rb +10 -8
  26. data/lib/fluent_command_builder/command_builders/installutil_35.rb +10 -8
  27. data/lib/fluent_command_builder/command_builders/installutil_40.rb +10 -8
  28. data/lib/fluent_command_builder/command_builders/msbuild.rb +3 -1
  29. data/lib/fluent_command_builder/command_builders/msbuild_20.rb +10 -8
  30. data/lib/fluent_command_builder/command_builders/msbuild_30.rb +10 -8
  31. data/lib/fluent_command_builder/command_builders/msbuild_35.rb +10 -8
  32. data/lib/fluent_command_builder/command_builders/msbuild_40.rb +10 -8
  33. data/lib/fluent_command_builder/command_builders/msdeploy.rb +3 -1
  34. data/lib/fluent_command_builder/command_builders/msdeploy_71.rb +10 -8
  35. data/lib/fluent_command_builder/command_builders/mstest.rb +3 -1
  36. data/lib/fluent_command_builder/command_builders/mstest_100.rb +10 -8
  37. data/lib/fluent_command_builder/command_builders/mstest_80.rb +10 -8
  38. data/lib/fluent_command_builder/command_builders/mstest_90.rb +10 -8
  39. data/lib/fluent_command_builder/command_builders/netsh.rb +3 -1
  40. data/lib/fluent_command_builder/command_builders/netsh_61.rb +10 -8
  41. data/lib/fluent_command_builder/command_builders/nuget.rb +3 -1
  42. data/lib/fluent_command_builder/command_builders/nuget_20.rb +10 -8
  43. data/lib/fluent_command_builder/command_builders/nunit.rb +3 -1
  44. data/lib/fluent_command_builder/command_builders/nunit_25.rb +10 -8
  45. data/lib/fluent_command_builder/command_builders/nunit_26.rb +10 -8
  46. data/lib/fluent_command_builder/command_builders/rake.rb +3 -1
  47. data/lib/fluent_command_builder/command_builders/rake_09.rb +10 -8
  48. data/lib/fluent_command_builder/command_builders/security_osx.rb +3 -1
  49. data/lib/fluent_command_builder/command_builders/security_osx_107.rb +10 -8
  50. data/lib/fluent_command_builder/command_builders/sevenzip.rb +3 -1
  51. data/lib/fluent_command_builder/command_builders/sevenzip_920.rb +10 -8
  52. data/lib/fluent_command_builder/command_builders/simian.rb +3 -1
  53. data/lib/fluent_command_builder/command_builders/simian_23.rb +10 -8
  54. data/lib/fluent_command_builder/command_builders/team_foundation.rb +3 -1
  55. data/lib/fluent_command_builder/command_builders/team_foundation_100.rb +10 -8
  56. data/lib/fluent_command_builder/command_builders/team_foundation_tee.rb +3 -1
  57. data/lib/fluent_command_builder/command_builders/team_foundation_tee_100.rb +10 -8
  58. data/lib/fluent_command_builder/command_builders/team_foundation_tee_101.rb +10 -8
  59. data/lib/fluent_command_builder/command_builders/xcodebuild.rb +3 -1
  60. data/lib/fluent_command_builder/command_builders/xcodebuild_43.rb +10 -8
  61. data/lib/fluent_command_builder/command_builders/xcodebuild_44.rb +10 -8
  62. data/lib/fluent_command_builder/command_formatters/hidden_password_formatter.rb +3 -3
  63. data/lib/fluent_command_builder/default_path_validator.rb +33 -0
  64. data/lib/fluent_command_builder/execution_context.rb +3 -1
  65. data/lib/fluent_command_builder/version.rb +11 -16
  66. data/lib/fluent_command_builder/version_validator.rb +12 -7
  67. metadata +8 -6
@@ -0,0 +1,43 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/printer')
2
+ require File.expand_path(File.dirname(__FILE__) + '/version')
3
+
4
+ module FluentCommandBuilder
5
+ class CommandBuilderFactory
6
+
7
+ def initialize(command_module)
8
+ @command_module = command_module
9
+ @printer = Printer.new
10
+ end
11
+
12
+ def create(&block)
13
+ validate_version
14
+
15
+ begin
16
+ version_module.create &block
17
+ rescue
18
+ message = %Q[Builder for command "#{@command_module::COMMAND_NAME}", version "#{version.to_s(2)}" does not exist. Please consider contributing.]
19
+ @printer.print_error message
20
+ raise message
21
+ end
22
+ end
23
+
24
+ private
25
+
26
+ def validate_version
27
+ unless version
28
+ message = %Q[Failed to create builder for command "#{@command_module::COMMAND_NAME}". Unable to determine required version.]
29
+ @printer.print_error message
30
+ raise message
31
+ end
32
+ end
33
+
34
+ def version
35
+ @version ||= Version.version_or_nil(@command_module.version)
36
+ end
37
+
38
+ def version_module
39
+ eval "#{@command_module.name}::V#{version.compact}"
40
+ end
41
+
42
+ end
43
+ end
@@ -1,5 +1,6 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
3
4
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
4
5
 
5
6
  module FluentCommandBuilder
@@ -18,7 +19,8 @@ module FluentCommandBuilder
18
19
  self.version_detector.version path
19
20
  end
20
21
  def self.create(&block)
21
- version_module(AppCfgPython).create &block
22
+ f = CommandBuilderFactory.new AppCfgPython
23
+ f.create &block
22
24
  end
23
25
  end
24
26
  end
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module AppCfgPython
12
12
  module V16
13
13
  VERSION = '1.6'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::AppCfgPython::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create
27
- b = UnderlyingBuilder.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::AppCfgPython.version path }
30
32
  c = AppCfgPython.new(b)
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module AppCfgPython
12
12
  module V17
13
13
  VERSION = '1.7'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::AppCfgPython::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create
27
- b = UnderlyingBuilder.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::AppCfgPython.version path }
30
32
  c = AppCfgPython.new(b)
@@ -1,5 +1,6 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
3
4
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
4
5
 
5
6
  module FluentCommandBuilder
@@ -18,7 +19,8 @@ module FluentCommandBuilder
18
19
  self.version_detector.version path
19
20
  end
20
21
  def self.create(&block)
21
- version_module(AspnetCompiler).create &block
22
+ f = CommandBuilderFactory.new AspnetCompiler
23
+ f.create &block
22
24
  end
23
25
  end
24
26
  end
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module AspnetCompiler
12
12
  module V20
13
13
  VERSION = '2.0'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create(target_dir=nil)
27
- b = UnderlyingBuilder.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::AspnetCompiler.version path }
30
32
  c = AspnetCompiler.new(b, target_dir)
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module AspnetCompiler
12
12
  module V40
13
13
  VERSION = '4.0'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create(target_dir=nil)
27
- b = UnderlyingBuilder.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::AspnetCompiler.version path }
30
32
  c = AspnetCompiler.new(b, target_dir)
@@ -1,5 +1,6 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
3
4
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
4
5
 
5
6
  module FluentCommandBuilder
@@ -18,7 +19,8 @@ module FluentCommandBuilder
18
19
  self.version_detector.version path
19
20
  end
20
21
  def self.create(&block)
21
- version_module(Bundle).create &block
22
+ f = CommandBuilderFactory.new Bundle
23
+ f.create &block
22
24
  end
23
25
  end
24
26
  end
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module Bundle
12
12
  module V11
13
13
  VERSION = '1.1'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Bundle::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Bundle::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::Bundle::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create
27
- b = UnderlyingBuilder.new FluentCommandBuilder::Bundle::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::Bundle::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::Bundle.version path }
30
32
  c = Bundle.new(b)
@@ -1,5 +1,6 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
3
4
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
4
5
 
5
6
  module FluentCommandBuilder
@@ -18,7 +19,8 @@ module FluentCommandBuilder
18
19
  self.version_detector.version path
19
20
  end
20
21
  def self.create(&block)
21
- version_module(Cucumber).create &block
22
+ f = CommandBuilderFactory.new Cucumber
23
+ f.create &block
22
24
  end
23
25
  end
24
26
  end
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module Cucumber
12
12
  module V11
13
13
  VERSION = '1.1'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::Cucumber::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create(feature=nil)
27
- b = UnderlyingBuilder.new FluentCommandBuilder::Cucumber::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::Cucumber::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::Cucumber.version path }
30
32
  c = Cucumber.new(b, feature)
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module Cucumber
12
12
  module V12
13
13
  VERSION = '1.2'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::Cucumber::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create(feature=nil)
27
- b = UnderlyingBuilder.new FluentCommandBuilder::Cucumber::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::Cucumber::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::Cucumber.version path }
30
32
  c = Cucumber.new(b, feature)
@@ -1,5 +1,6 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
3
4
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
4
5
 
5
6
  module FluentCommandBuilder
@@ -18,7 +19,8 @@ module FluentCommandBuilder
18
19
  self.version_detector.version path
19
20
  end
20
21
  def self.create(&block)
21
- version_module(DevAppserverPython).create &block
22
+ f = CommandBuilderFactory.new DevAppserverPython
23
+ f.create &block
22
24
  end
23
25
  end
24
26
  end
@@ -1,7 +1,7 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
3
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
4
- require File.expand_path(File.dirname(__FILE__) + '/../printer')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../default_path_validator')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
@@ -11,20 +11,22 @@ module FluentCommandBuilder
11
11
  module DevAppserverPython
12
12
  module V16
13
13
  VERSION = '1.6'
14
+ def self.exact_version
15
+ @exact_version ||= VERSION
16
+ end
17
+ def self.exact_version=(value)
18
+ @exact_version = value
19
+ end
14
20
  def self.default_path
15
21
  @default_path ||= nil
16
22
  end
17
23
  def self.default_path=(value)
18
- printer = FluentCommandBuilder::Printer.new
19
- begin
20
- printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DevAppserverPython::COMMAND_NAME}", version "#{VERSION}" does not exist. Path: #{value}] unless File.exist? value
21
- rescue
22
- printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DevAppserverPython::COMMAND_NAME}", version "#{VERSION}" exists. An internal error occurred.]
23
- end
24
+ validator = DefaultPathValidator.new value, FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, exact_version
25
+ validator.validate
24
26
  @default_path = value
25
27
  end
26
28
  def self.create(application_root=nil)
27
- b = UnderlyingBuilder.new FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, VERSION
29
+ b = UnderlyingBuilder.new FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, self.exact_version
28
30
  b.path = self.default_path
29
31
  b.actual_version_lambda = lambda { |path| FluentCommandBuilder::DevAppserverPython.version path }
30
32
  c = DevAppserverPython.new(b, application_root)