jenkins-plugin-runtime 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,6 +44,9 @@ module Jenkins
44
44
 
45
45
  def tearDown(build, listener)
46
46
  @impl.teardown(@plugin.import(build), @plugin.import(listener), @env)
47
+ true
48
+ rescue Jenkins::Model::Build::Halt
49
+ false
47
50
  end
48
51
  end
49
52
 
@@ -1,7 +1,7 @@
1
1
  module Jenkins
2
2
  class Plugin
3
3
  module Runtime
4
- VERSION = "0.1.9"
4
+ VERSION = "0.1.10"
5
5
  end
6
6
  end
7
7
  end
@@ -32,4 +32,30 @@ describe Jenkins::Plugin::Proxies::BuildWrapper do
32
32
  @wrapper.setUp(@jBuild, @jLauncher, @jListener).should be_nil
33
33
  end
34
34
  end
35
- end
35
+
36
+ describe "halting behavior on teardown" do
37
+ environment = nil
38
+ before do
39
+ @object.stub(:teardown).and_raise(Jenkins::Model::Build::Halt)
40
+ @object.stub(:setup)
41
+ environment = @wrapper.setUp(@jBuild, @jLauncher, @jListener)
42
+ end
43
+
44
+ it "returns false if the build was halted explicitly" do
45
+ environment.tearDown(@jBuild, @jListener).should be_false
46
+ end
47
+ end
48
+
49
+ describe "normal behavior on teardown" do
50
+ environment = nil
51
+ before do
52
+ @object.stub(:teardown).and_return(nil)
53
+ @object.stub(:setup)
54
+ environment = @wrapper.setUp(@jBuild, @jLauncher, @jListener)
55
+ end
56
+
57
+ it "returns true if the build was not halted explicitly" do
58
+ environment.tearDown(@jBuild, @jListener).should be_true
59
+ end
60
+ end
61
+ end
@@ -5,7 +5,7 @@ require 'jenkins/war'
5
5
  for path in Dir[File.join(ENV['HOME'], '.jenkins', 'wars', Jenkins::War::VERSION, "**/*.jar")]
6
6
  $CLASSPATH << path
7
7
  end
8
- $CLASSPATH << Pathname(__FILE__).dirname.join('../target')
8
+ $CLASSPATH << Pathname(__FILE__).dirname.join('../target/')
9
9
  $:.unshift Pathname(__FILE__).dirname.join('../lib')
10
10
 
11
11
  require 'jenkins/plugin/runtime'
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jenkins-plugin-runtime
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.9
5
+ version: 0.1.10
6
6
  platform: ruby
7
7
  authors:
8
8
  - Charles Lowell