fluent_command_builder 0.7.6 → 0.7.7

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.
Files changed (41) hide show
  1. data/lib/fluent_command_builder/command_base.rb +2 -11
  2. data/lib/fluent_command_builder/command_builders/appcfg_python_16.rb +7 -0
  3. data/lib/fluent_command_builder/command_builders/appcfg_python_17.rb +7 -0
  4. data/lib/fluent_command_builder/command_builders/aspnet_compiler_20.rb +7 -0
  5. data/lib/fluent_command_builder/command_builders/aspnet_compiler_40.rb +7 -0
  6. data/lib/fluent_command_builder/command_builders/bundle_11.rb +7 -0
  7. data/lib/fluent_command_builder/command_builders/cucumber_11.rb +7 -0
  8. data/lib/fluent_command_builder/command_builders/cucumber_12.rb +7 -0
  9. data/lib/fluent_command_builder/command_builders/dev_appserver_python_16.rb +7 -0
  10. data/lib/fluent_command_builder/command_builders/dev_appserver_python_17.rb +7 -0
  11. data/lib/fluent_command_builder/command_builders/dotcover_10.rb +7 -0
  12. data/lib/fluent_command_builder/command_builders/dotcover_11.rb +7 -0
  13. data/lib/fluent_command_builder/command_builders/dotcover_12.rb +7 -0
  14. data/lib/fluent_command_builder/command_builders/dotcover_20.rb +7 -0
  15. data/lib/fluent_command_builder/command_builders/installutil_11.rb +7 -0
  16. data/lib/fluent_command_builder/command_builders/installutil_20.rb +7 -0
  17. data/lib/fluent_command_builder/command_builders/installutil_35.rb +7 -0
  18. data/lib/fluent_command_builder/command_builders/installutil_40.rb +7 -0
  19. data/lib/fluent_command_builder/command_builders/msbuild_20.rb +7 -0
  20. data/lib/fluent_command_builder/command_builders/msbuild_30.rb +7 -0
  21. data/lib/fluent_command_builder/command_builders/msbuild_35.rb +7 -0
  22. data/lib/fluent_command_builder/command_builders/msbuild_40.rb +7 -0
  23. data/lib/fluent_command_builder/command_builders/msdeploy_71.rb +7 -0
  24. data/lib/fluent_command_builder/command_builders/mstest_100.rb +7 -0
  25. data/lib/fluent_command_builder/command_builders/mstest_80.rb +7 -0
  26. data/lib/fluent_command_builder/command_builders/mstest_90.rb +7 -0
  27. data/lib/fluent_command_builder/command_builders/netsh_61.rb +7 -0
  28. data/lib/fluent_command_builder/command_builders/nuget_20.rb +7 -0
  29. data/lib/fluent_command_builder/command_builders/nunit_25.rb +7 -0
  30. data/lib/fluent_command_builder/command_builders/nunit_26.rb +7 -0
  31. data/lib/fluent_command_builder/command_builders/rake_09.rb +7 -0
  32. data/lib/fluent_command_builder/command_builders/security_osx_107.rb +7 -0
  33. data/lib/fluent_command_builder/command_builders/sevenzip_92.rb +7 -0
  34. data/lib/fluent_command_builder/command_builders/simian_23.rb +7 -0
  35. data/lib/fluent_command_builder/command_builders/team_foundation_100.rb +7 -0
  36. data/lib/fluent_command_builder/command_builders/team_foundation_tee_100.rb +7 -0
  37. data/lib/fluent_command_builder/command_builders/xcodebuild_43.rb +7 -0
  38. data/lib/fluent_command_builder/command_builders/xcodebuild_44.rb +7 -0
  39. data/lib/fluent_command_builder/printer.rb +12 -0
  40. data/lib/fluent_command_builder/version_validator.rb +18 -1
  41. metadata +7 -6
@@ -1,5 +1,3 @@
1
- require 'term/ansicolor'; include Term::ANSIColor
2
- require File.expand_path(File.dirname(__FILE__) + '/version')
3
1
  require File.expand_path(File.dirname(__FILE__) + '/version_validator')
4
2
 
5
3
  module FluentCommandBuilder
@@ -16,6 +14,7 @@ module FluentCommandBuilder
16
14
 
17
15
  def initialize(underlying_builder)
18
16
  @b = underlying_builder
17
+ @printer = FluentCommandBuilder::Printer.new
19
18
  end
20
19
 
21
20
  def execute!
@@ -33,15 +32,7 @@ module FluentCommandBuilder
33
32
 
34
33
  def validate_version
35
34
  validator = VersionValidator.new self.class, @b.path
36
-
37
- unless validator.can_validate?
38
- print yellow, %Q[WARNING: Version validation for command "#{@b.command_name}" aborted. An internal error occurred.], reset, "\n"
39
- return
40
- end
41
-
42
- unless validator.is_valid?
43
- print yellow, %Q[WARNING: Version validation for command "#{@b.command_name}" failed. Expected version #{validator.version_in_use.to_s(2)} but was #{validator.version_on_path.to_s(2)}.], reset, "\n"
44
- end
35
+ validator.validate
45
36
  end
46
37
 
47
38
  end
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AppCfgPython::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(target_dir=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::AspnetCompiler::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(target_dir=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Bundle::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Bundle::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(feature=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Cucumber::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(feature=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DevAppserverPython::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DevAppserverPython::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(application_root=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DevAppserverPython::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DevAppserverPython::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(application_root=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::DotCover::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::InstallUtil::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(project_file=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(project_file=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(project_file=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSBuild::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(project_file=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSDeploy::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSDeploy::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSTest::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSTest::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSTest::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSTest::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::MSTest::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::MSTest::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Netsh::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Netsh::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::NuGet::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::NuGet::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::NUnit::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::NUnit::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(input_files=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::NUnit::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::NUnit::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(input_files=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Rake::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Rake::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create(task=nil)
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::SecurityOSX::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::SecurityOSX::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::SevenZip::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::SevenZip::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::Simian::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::Simian::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::TeamFoundation::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::TeamFoundation::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::TeamFoundationTEE::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::TeamFoundationTEE::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::XCodeBuild::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::XCodeBuild::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../command_base')
2
+ require File.expand_path(File.dirname(__FILE__) + '/../printer')
2
3
  require File.expand_path(File.dirname(__FILE__) + '/../underlying_builder')
3
4
 
4
5
  module FluentCommandBuilder
@@ -12,6 +13,12 @@ module FluentCommandBuilder
12
13
  @default_path ||= nil
13
14
  end
14
15
  def self.default_path=(value)
16
+ printer = FluentCommandBuilder::Printer.new
17
+ begin
18
+ printer.print_warning %Q[Default Path for command "#{FluentCommandBuilder::XCodeBuild::COMMAND_NAME}" does not exist. Path: #{value}] unless File.exist? value
19
+ rescue
20
+ printer.print_warning %Q[Failed to determine whether Default Path for command "#{FluentCommandBuilder::XCodeBuild::COMMAND_NAME}" exists. An internal error occurred.]
21
+ end
15
22
  @default_path = value
16
23
  end
17
24
  def self.create
@@ -0,0 +1,12 @@
1
+ require 'term/ansicolor'
2
+
3
+ module FluentCommandBuilder
4
+ class Printer
5
+ include Term::ANSIColor
6
+
7
+ def print_warning(message)
8
+ print yellow, 'WARNING: ', message, reset, "\n"
9
+ end
10
+
11
+ end
12
+ end
@@ -1,3 +1,4 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/printer')
1
2
  require File.expand_path(File.dirname(__FILE__) + '/version')
2
3
 
3
4
  module FluentCommandBuilder
@@ -7,6 +8,18 @@ module FluentCommandBuilder
7
8
  def initialize(command_builder_class, path)
8
9
  @command_builder_class = command_builder_class
9
10
  @path = path
11
+ @printer = Printer.new
12
+ end
13
+
14
+ def validate
15
+ unless can_validate?
16
+ @printer.print_warning %Q[Version validation for command "#{command_name}" aborted. An internal error occurred.]
17
+ return
18
+ end
19
+
20
+ unless is_valid?
21
+ @printer.print_warning %Q[Version validation for command "#{command_name}" failed. Expected version #{version_in_use.to_s(2)} but was #{version_on_path.to_s(2)}.]
22
+ end
10
23
  end
11
24
 
12
25
  def can_validate?
@@ -22,6 +35,8 @@ module FluentCommandBuilder
22
35
  version_in_use.compact == version_on_path.compact
23
36
  end
24
37
 
38
+ private
39
+
25
40
  def version_in_use
26
41
  @version_in_use ||= Version.new(module_at_index(2)::VERSION)
27
42
  end
@@ -30,7 +45,9 @@ module FluentCommandBuilder
30
45
  @version_on_path ||= Version.new(module_at_index(1).version(@path))
31
46
  end
32
47
 
33
- private
48
+ def command_name
49
+ @command_name ||= module_at_index(1)::COMMAND_NAME
50
+ end
34
51
 
35
52
  def module_at_index(index)
36
53
  module_name = @command_builder_class.name.split('::').first(index + 1).join('::')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent_command_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.6
4
+ version: 0.7.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-19 00:00:00.000000000 Z
12
+ date: 2012-08-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70303473806480 !ruby/object:Gem::Requirement
16
+ requirement: &70346297621380 !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: *70303473806480
24
+ version_requirements: *70346297621380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: term-ansicolor
27
- requirement: &70303473806040 !ruby/object:Gem::Requirement
27
+ requirement: &70346297620940 !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: *70303473806040
35
+ version_requirements: *70346297620940
36
36
  description: Fluent Command Builder makes building command lines easy and intuitive.
37
37
  email: matthew-github@matthewriley.name
38
38
  executables: []
@@ -105,6 +105,7 @@ files:
105
105
  - lib/fluent_command_builder/path_finder.rb
106
106
  - lib/fluent_command_builder/path_finders/unix_path_finder.rb
107
107
  - lib/fluent_command_builder/path_finders/windows_path_finder.rb
108
+ - lib/fluent_command_builder/printer.rb
108
109
  - lib/fluent_command_builder/underlying_builder.rb
109
110
  - lib/fluent_command_builder/version.rb
110
111
  - lib/fluent_command_builder/version_detectors/appcfg_python.rb