fluent_command_builder 0.8.11 → 0.8.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/lib/fluent_command_builder/command_builder_config.rb +31 -0
  2. data/lib/fluent_command_builder/command_builders/appcfg_python.rb +0 -8
  3. data/lib/fluent_command_builder/command_builders/appcfg_python_16.rb +8 -30
  4. data/lib/fluent_command_builder/command_builders/appcfg_python_17.rb +8 -30
  5. data/lib/fluent_command_builder/command_builders/aspnet_compiler.rb +1 -9
  6. data/lib/fluent_command_builder/command_builders/aspnet_compiler_20.rb +8 -30
  7. data/lib/fluent_command_builder/command_builders/aspnet_compiler_40.rb +8 -30
  8. data/lib/fluent_command_builder/command_builders/bundle.rb +0 -8
  9. data/lib/fluent_command_builder/command_builders/bundle_11.rb +8 -30
  10. data/lib/fluent_command_builder/command_builders/cucumber.rb +0 -8
  11. data/lib/fluent_command_builder/command_builders/cucumber_11.rb +8 -30
  12. data/lib/fluent_command_builder/command_builders/cucumber_12.rb +8 -30
  13. data/lib/fluent_command_builder/command_builders/dev_appserver_python.rb +0 -8
  14. data/lib/fluent_command_builder/command_builders/dev_appserver_python_16.rb +8 -30
  15. data/lib/fluent_command_builder/command_builders/dev_appserver_python_17.rb +8 -30
  16. data/lib/fluent_command_builder/command_builders/dotcover.rb +0 -8
  17. data/lib/fluent_command_builder/command_builders/dotcover_10.rb +8 -30
  18. data/lib/fluent_command_builder/command_builders/dotcover_11.rb +8 -30
  19. data/lib/fluent_command_builder/command_builders/dotcover_12.rb +8 -30
  20. data/lib/fluent_command_builder/command_builders/dotcover_20.rb +8 -30
  21. data/lib/fluent_command_builder/command_builders/fastlinkchecker.rb +0 -8
  22. data/lib/fluent_command_builder/command_builders/fastlinkchecker_21.rb +8 -30
  23. data/lib/fluent_command_builder/command_builders/installutil.rb +0 -8
  24. data/lib/fluent_command_builder/command_builders/installutil_11.rb +8 -30
  25. data/lib/fluent_command_builder/command_builders/installutil_20.rb +8 -30
  26. data/lib/fluent_command_builder/command_builders/installutil_35.rb +8 -30
  27. data/lib/fluent_command_builder/command_builders/installutil_40.rb +8 -30
  28. data/lib/fluent_command_builder/command_builders/msbuild.rb +0 -8
  29. data/lib/fluent_command_builder/command_builders/msbuild_20.rb +8 -30
  30. data/lib/fluent_command_builder/command_builders/msbuild_30.rb +8 -30
  31. data/lib/fluent_command_builder/command_builders/msbuild_35.rb +8 -30
  32. data/lib/fluent_command_builder/command_builders/msbuild_40.rb +8 -30
  33. data/lib/fluent_command_builder/command_builders/msdeploy.rb +0 -8
  34. data/lib/fluent_command_builder/command_builders/msdeploy_71.rb +8 -30
  35. data/lib/fluent_command_builder/command_builders/mstest.rb +0 -8
  36. data/lib/fluent_command_builder/command_builders/mstest_100.rb +8 -30
  37. data/lib/fluent_command_builder/command_builders/mstest_80.rb +8 -30
  38. data/lib/fluent_command_builder/command_builders/mstest_90.rb +8 -30
  39. data/lib/fluent_command_builder/command_builders/netsh.rb +0 -8
  40. data/lib/fluent_command_builder/command_builders/netsh_61.rb +8 -30
  41. data/lib/fluent_command_builder/command_builders/nuget.rb +0 -8
  42. data/lib/fluent_command_builder/command_builders/nuget_20.rb +8 -30
  43. data/lib/fluent_command_builder/command_builders/nunit.rb +0 -8
  44. data/lib/fluent_command_builder/command_builders/nunit_25.rb +8 -30
  45. data/lib/fluent_command_builder/command_builders/nunit_26.rb +8 -30
  46. data/lib/fluent_command_builder/command_builders/rake.rb +0 -8
  47. data/lib/fluent_command_builder/command_builders/rake_09.rb +8 -30
  48. data/lib/fluent_command_builder/command_builders/security_osx.rb +0 -8
  49. data/lib/fluent_command_builder/command_builders/security_osx_107.rb +13 -30
  50. data/lib/fluent_command_builder/command_builders/security_osx_108.rb +187 -0
  51. data/lib/fluent_command_builder/command_builders/sevenzip.rb +0 -8
  52. data/lib/fluent_command_builder/command_builders/sevenzip_920.rb +8 -30
  53. data/lib/fluent_command_builder/command_builders/simian.rb +0 -8
  54. data/lib/fluent_command_builder/command_builders/simian_23.rb +8 -30
  55. data/lib/fluent_command_builder/command_builders/team_foundation.rb +0 -8
  56. data/lib/fluent_command_builder/command_builders/team_foundation_100.rb +8 -30
  57. data/lib/fluent_command_builder/command_builders/team_foundation_tee.rb +0 -8
  58. data/lib/fluent_command_builder/command_builders/team_foundation_tee_100.rb +8 -30
  59. data/lib/fluent_command_builder/command_builders/team_foundation_tee_101.rb +8 -30
  60. data/lib/fluent_command_builder/command_builders/xcodebuild.rb +0 -8
  61. data/lib/fluent_command_builder/command_builders/xcodebuild_43.rb +8 -30
  62. data/lib/fluent_command_builder/command_builders/xcodebuild_44.rb +8 -30
  63. data/lib/fluent_command_builder/path_validator.rb +25 -12
  64. data/lib/fluent_command_builder/underlying_builder.rb +10 -19
  65. data/lib/fluent_command_builder/version_validator.rb +33 -21
  66. data/lib/fluent_command_builder.rb +5 -4
  67. metadata +8 -8
  68. data/lib/fluent_command_builder/command_builder_factory.rb +0 -43
  69. data/lib/fluent_command_builder/default_path_validator.rb +0 -33
@@ -0,0 +1,31 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/path_validator')
2
+ require File.expand_path(File.dirname(__FILE__) + '/version_validator')
3
+ require File.expand_path(File.dirname(__FILE__) + '/version_detectors/default_version_detector')
4
+
5
+ module FluentCommandBuilder
6
+ class CommandBuilderConfig
7
+
8
+ attr_accessor :path, :command_name, :version, :version_detector, :version_validation_level
9
+
10
+ def initialize(command_name, version)
11
+ @path = nil
12
+ @command_name = command_name
13
+ @version = version
14
+ @version_detector = DefaultVersionDetector.new command_name
15
+ @version_validation_level = :fatal
16
+ end
17
+
18
+ def validate_path(validation_level)
19
+ return unless @path
20
+ v = PathValidator.new self
21
+ v.validate validation_level
22
+ end
23
+
24
+ def validate_version(validation_level=@version_validation_level)
25
+ return unless @version
26
+ v = VersionValidator.new self
27
+ v.validate validation_level
28
+ end
29
+
30
+ end
31
+ end
@@ -1,12 +1,8 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
- require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
4
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
5
4
 
6
5
  module FluentCommandBuilder
7
- def appcfg_python(&block)
8
- AppCfgPython.create &block
9
- end
10
6
  module AppCfgPython
11
7
  COMMAND_NAME = 'appcfg.py'
12
8
  def self.version_detector
@@ -18,9 +14,5 @@ module FluentCommandBuilder
18
14
  def self.version(path=nil)
19
15
  self.version_detector.version path
20
16
  end
21
- def self.create(&block)
22
- f = CommandBuilderFactory.new AppCfgPython
23
- f.create &block
24
- end
25
17
  end
26
18
  end
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def appcfg_python_16
9
- FluentCommandBuilder::AppCfgPython::V16.create { |b| yield b if block_given? }
10
- end
11
8
  module AppCfgPython
12
9
  module V16
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::AppCfgPython::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::AppCfgPython.version_detector
13
+ def configure_appcfg_python
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create
34
- b = UnderlyingBuilder.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::AppCfgPython.version_detector
17
+ def appcfg_python
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = AppCfgPython.new(b)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def appcfg_python
43
- FluentCommandBuilder::AppCfgPython::V16.create { |b| yield b if block_given? }
44
- end
45
23
  class AppCfgPython < CommandBase
46
24
  def initialize(underlying_builder)
47
25
  super underlying_builder
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def appcfg_python_17
9
- FluentCommandBuilder::AppCfgPython::V17.create { |b| yield b if block_given? }
10
- end
11
8
  module AppCfgPython
12
9
  module V17
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::AppCfgPython::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::AppCfgPython.version_detector
13
+ def configure_appcfg_python
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create
34
- b = UnderlyingBuilder.new FluentCommandBuilder::AppCfgPython::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::AppCfgPython.version_detector
17
+ def appcfg_python
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = AppCfgPython.new(b)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def appcfg_python
43
- FluentCommandBuilder::AppCfgPython::V17.create { |b| yield b if block_given? }
44
- end
45
23
  class AppCfgPython < CommandBase
46
24
  def initialize(underlying_builder)
47
25
  super underlying_builder
@@ -1,16 +1,12 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
- require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
4
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
5
4
 
6
5
  module FluentCommandBuilder
7
- def aspnet_compiler(&block)
8
- AspnetCompiler.create &block
9
- end
10
6
  module AspnetCompiler
11
7
  COMMAND_NAME = 'aspnet_compiler'
12
8
  def self.version_detector
13
- @version_detector ||= MSBuild.version_detector
9
+ @version_detector ||= StandardVersionDetector.new 'MSBuild', '/version'
14
10
  end
15
11
  def self.version_detector=(value)
16
12
  @version_detector = value
@@ -18,9 +14,5 @@ module FluentCommandBuilder
18
14
  def self.version(path=nil)
19
15
  self.version_detector.version path
20
16
  end
21
- def self.create(&block)
22
- f = CommandBuilderFactory.new AspnetCompiler
23
- f.create &block
24
- end
25
17
  end
26
18
  end
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def aspnet_compiler_20(target_dir=nil)
9
- FluentCommandBuilder::AspnetCompiler::V20.create(target_dir) { |b| yield b if block_given? }
10
- end
11
8
  module AspnetCompiler
12
9
  module V20
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::AspnetCompiler.version_detector
13
+ def configure_aspnet_compiler
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create(target_dir=nil)
34
- b = UnderlyingBuilder.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::AspnetCompiler.version_detector
17
+ def aspnet_compiler(target_dir=nil)
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = AspnetCompiler.new(b, target_dir)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def aspnet_compiler(target_dir=nil)
43
- FluentCommandBuilder::AspnetCompiler::V20.create(target_dir) { |b| yield b if block_given? }
44
- end
45
23
  class AspnetCompiler < CommandBase
46
24
  def initialize(underlying_builder, target_dir=nil)
47
25
  super underlying_builder
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def aspnet_compiler_40(target_dir=nil)
9
- FluentCommandBuilder::AspnetCompiler::V40.create(target_dir) { |b| yield b if block_given? }
10
- end
11
8
  module AspnetCompiler
12
9
  module V40
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::AspnetCompiler.version_detector
13
+ def configure_aspnet_compiler
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create(target_dir=nil)
34
- b = UnderlyingBuilder.new FluentCommandBuilder::AspnetCompiler::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::AspnetCompiler.version_detector
17
+ def aspnet_compiler(target_dir=nil)
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = AspnetCompiler.new(b, target_dir)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def aspnet_compiler(target_dir=nil)
43
- FluentCommandBuilder::AspnetCompiler::V40.create(target_dir) { |b| yield b if block_given? }
44
- end
45
23
  class AspnetCompiler < CommandBase
46
24
  def initialize(underlying_builder, target_dir=nil)
47
25
  super underlying_builder
@@ -1,12 +1,8 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
- require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
4
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
5
4
 
6
5
  module FluentCommandBuilder
7
- def bundle(&block)
8
- Bundle.create &block
9
- end
10
6
  module Bundle
11
7
  COMMAND_NAME = 'bundle'
12
8
  def self.version_detector
@@ -18,9 +14,5 @@ module FluentCommandBuilder
18
14
  def self.version(path=nil)
19
15
  self.version_detector.version path
20
16
  end
21
- def self.create(&block)
22
- f = CommandBuilderFactory.new Bundle
23
- f.create &block
24
- end
25
17
  end
26
18
  end
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def bundle_11
9
- FluentCommandBuilder::Bundle::V11.create { |b| yield b if block_given? }
10
- end
11
8
  module Bundle
12
9
  module V11
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::Bundle::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::Bundle::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::Bundle.version_detector
13
+ def configure_bundle
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create
34
- b = UnderlyingBuilder.new FluentCommandBuilder::Bundle::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::Bundle.version_detector
17
+ def bundle
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = Bundle.new(b)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def bundle
43
- FluentCommandBuilder::Bundle::V11.create { |b| yield b if block_given? }
44
- end
45
23
  class Bundle < CommandBase
46
24
  def initialize(underlying_builder)
47
25
  super underlying_builder
@@ -1,12 +1,8 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
- require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
4
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
5
4
 
6
5
  module FluentCommandBuilder
7
- def cucumber(&block)
8
- Cucumber.create &block
9
- end
10
6
  module Cucumber
11
7
  COMMAND_NAME = 'cucumber'
12
8
  def self.version_detector
@@ -18,9 +14,5 @@ module FluentCommandBuilder
18
14
  def self.version(path=nil)
19
15
  self.version_detector.version path
20
16
  end
21
- def self.create(&block)
22
- f = CommandBuilderFactory.new Cucumber
23
- f.create &block
24
- end
25
17
  end
26
18
  end
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def cucumber_11(feature=nil)
9
- FluentCommandBuilder::Cucumber::V11.create(feature) { |b| yield b if block_given? }
10
- end
11
8
  module Cucumber
12
9
  module V11
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::Cucumber::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::Cucumber::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::Cucumber.version_detector
13
+ def configure_cucumber
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create(feature=nil)
34
- b = UnderlyingBuilder.new FluentCommandBuilder::Cucumber::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::Cucumber.version_detector
17
+ def cucumber(feature=nil)
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = Cucumber.new(b, feature)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def cucumber(feature=nil)
43
- FluentCommandBuilder::Cucumber::V11.create(feature) { |b| yield b if block_given? }
44
- end
45
23
  class Cucumber < CommandBase
46
24
  def initialize(underlying_builder, feature=nil)
47
25
  super underlying_builder
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def cucumber_12(feature=nil)
9
- FluentCommandBuilder::Cucumber::V12.create(feature) { |b| yield b if block_given? }
10
- end
11
8
  module Cucumber
12
9
  module V12
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::Cucumber::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::Cucumber::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::Cucumber.version_detector
13
+ def configure_cucumber
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create(feature=nil)
34
- b = UnderlyingBuilder.new FluentCommandBuilder::Cucumber::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::Cucumber.version_detector
17
+ def cucumber(feature=nil)
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = Cucumber.new(b, feature)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def cucumber(feature=nil)
43
- FluentCommandBuilder::Cucumber::V12.create(feature) { |b| yield b if block_given? }
44
- end
45
23
  class Cucumber < CommandBase
46
24
  def initialize(underlying_builder, feature=nil)
47
25
  super underlying_builder
@@ -1,12 +1,8 @@
1
1
  # Generated code. Do not modify.
2
2
 
3
- require File.expand_path(File.dirname(__FILE__) + '/../command_builder_factory')
4
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
5
4
 
6
5
  module FluentCommandBuilder
7
- def dev_appserver_python(&block)
8
- DevAppserverPython.create &block
9
- end
10
6
  module DevAppserverPython
11
7
  COMMAND_NAME = 'dev_appserver.py'
12
8
  def self.version_detector
@@ -18,9 +14,5 @@ module FluentCommandBuilder
18
14
  def self.version(path=nil)
19
15
  self.version_detector.version path
20
16
  end
21
- def self.create(&block)
22
- f = CommandBuilderFactory.new DevAppserverPython
23
- f.create &block
24
- end
25
17
  end
26
18
  end
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def dev_appserver_python_16(application_root=nil)
9
- FluentCommandBuilder::DevAppserverPython::V16.create(application_root) { |b| yield b if block_given? }
10
- end
11
8
  module DevAppserverPython
12
9
  module V16
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::DevAppserverPython.version_detector
13
+ def configure_dev_appserver_python
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create(application_root=nil)
34
- b = UnderlyingBuilder.new FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::DevAppserverPython.version_detector
17
+ def dev_appserver_python(application_root=nil)
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = DevAppserverPython.new(b, application_root)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def dev_appserver_python(application_root=nil)
43
- FluentCommandBuilder::DevAppserverPython::V16.create(application_root) { |b| yield b if block_given? }
44
- end
45
23
  class DevAppserverPython < CommandBase
46
24
  def initialize(underlying_builder, application_root=nil)
47
25
  super underlying_builder
@@ -1,47 +1,25 @@
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__) + '/../default_path_validator')
4
+ require File.expand_path(File.dirname(__FILE__) + '/../command_builder_config')
5
5
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
6
6
 
7
7
  module FluentCommandBuilder
8
- def dev_appserver_python_17(application_root=nil)
9
- FluentCommandBuilder::DevAppserverPython::V17.create(application_root) { |b| yield b if block_given? }
10
- end
11
8
  module DevAppserverPython
12
9
  module V17
13
10
  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
20
- def self.default_path
21
- @default_path ||= nil
22
- end
23
- def self.default_path=(value)
24
- validator = DefaultPathValidator.new value, FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, exact_version
25
- validator.validate
26
- @default_path = value
11
+ @@config = CommandBuilderConfig.new FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, VERSION
12
+ @@config.version_detector = FluentCommandBuilder::DevAppserverPython.version_detector
13
+ def configure_dev_appserver_python
14
+ yield @@config
15
+ @@config.validate_path :warn
27
16
  end
28
- def self.version_validation_options
29
- @version_validation_options ||= {}
30
- yield @version_validation_options if block_given?
31
- @version_validation_options
32
- end
33
- def self.create(application_root=nil)
34
- b = UnderlyingBuilder.new FluentCommandBuilder::DevAppserverPython::COMMAND_NAME, self.exact_version
35
- b.path = self.default_path
36
- b.version_validation_options = self.version_validation_options
37
- b.version_detector = FluentCommandBuilder::DevAppserverPython.version_detector
17
+ def dev_appserver_python(application_root=nil)
18
+ b = UnderlyingBuilder.new @@config
38
19
  c = DevAppserverPython.new(b, application_root)
39
20
  yield b if block_given?
40
21
  c
41
22
  end
42
- def dev_appserver_python(application_root=nil)
43
- FluentCommandBuilder::DevAppserverPython::V17.create(application_root) { |b| yield b if block_given? }
44
- end
45
23
  class DevAppserverPython < CommandBase
46
24
  def initialize(underlying_builder, application_root=nil)
47
25
  super underlying_builder