swt 0.6-java → 0.7-java

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.
data/bin/swt_cucumber CHANGED
@@ -8,4 +8,4 @@ require 'swt'
8
8
  runner = Swt::CucumberRunner.new
9
9
  runner.run_features(ARGV)
10
10
  Swt.event_loop { runner.tests_finished? }
11
-
11
+ exit(runner.exit_code)
@@ -1,33 +1,33 @@
1
-
2
- module Cucumber
3
- module Ast
4
- class StepInvocation #:nodoc:#
5
- class << self
6
- attr_accessor :wait_time
7
- end
8
-
9
- def invoke_with_swt(step_mother, options)
10
- block = Swt::RRunnable.new { invoke_without_swt(step_mother, options) }
11
-
12
- Swt.sync_exec(&block)
13
- sleep ENV["SLOW_CUKES"].to_f if ENV["SLOW_CUKES"]
14
- sleep(Cucumber::Ast::StepInvocation.wait_time || 0)
15
- Cucumber::Ast::StepInvocation.wait_time = nil
16
- end
17
-
18
- alias_method :invoke_without_swt, :invoke
19
- alias_method :invoke, :invoke_with_swt
20
- end
21
- end
22
-
23
- module Cli
24
- class Configuration
25
- def require_dirs_with_redcar_plugins
26
- require_dirs_without_redcar_plugins + Dir['plugins/*/features']
27
- end
28
-
29
- alias_method :require_dirs_without_redcar_plugins, :require_dirs
30
- alias_method :require_dirs, :require_dirs_with_redcar_plugins
31
- end
32
- end
33
- end
1
+ #
2
+ # module Cucumber
3
+ # module Ast
4
+ # class StepInvocation #:nodoc:#
5
+ # class << self
6
+ # attr_accessor :wait_time
7
+ # end
8
+ #
9
+ # def invoke_with_swt(step_mother, options)
10
+ # block = Swt::RRunnable.new { invoke_without_swt(step_mother, options) }
11
+ #
12
+ # Swt.sync_exec(&block)
13
+ # sleep ENV["SLOW_CUKES"].to_f if ENV["SLOW_CUKES"]
14
+ # sleep(Cucumber::Ast::StepInvocation.wait_time || 0)
15
+ # Cucumber::Ast::StepInvocation.wait_time = nil
16
+ # end
17
+ #
18
+ # alias_method :invoke_without_swt, :invoke
19
+ # alias_method :invoke, :invoke_with_swt
20
+ # end
21
+ # end
22
+ #
23
+ # module Cli
24
+ # class Configuration
25
+ # def require_dirs_with_redcar_plugins
26
+ # require_dirs_without_redcar_plugins + Dir['plugins/*/features']
27
+ # end
28
+ #
29
+ # alias_method :require_dirs_without_redcar_plugins, :require_dirs
30
+ # alias_method :require_dirs, :require_dirs_with_redcar_plugins
31
+ # end
32
+ # end
33
+ # end
@@ -6,6 +6,10 @@ module Swt
6
6
  @tests_finished
7
7
  end
8
8
 
9
+ def exit_code
10
+ @is_fail ? 1 : 0
11
+ end
12
+
9
13
  def run_features(args)
10
14
  require "cucumber/cli/main"
11
15
  require "cucumber"
@@ -15,8 +19,9 @@ module Swt
15
19
  begin
16
20
  sleep START_DELAY
17
21
  main = Cucumber::Cli::Main.new(args)
18
- main.execute!
22
+ @is_fail = main.execute!
19
23
  @tests_finished = true
24
+ Swt.sync_exec {}
20
25
  rescue Object => e
21
26
  puts e.message
22
27
  puts e.backtrace
data/lib/swt/minimal.rb CHANGED
@@ -95,11 +95,23 @@ module Swt
95
95
  return if event_loop_running?
96
96
  @event_loop_running = true
97
97
  display = Swt::Widgets::Display.current
98
+
98
99
  until stop_conditions.any? {|c| c[] }
99
- display.sleep unless display.read_and_dispatch
100
+ unless display.read_and_dispatch
101
+ display.sleep
102
+ end
100
103
  end
104
+
101
105
  display.dispose
102
- true
106
+ end
107
+
108
+ def self.bot
109
+ @bot ||= begin
110
+ Dir[File.expand_path("../../../vendor/swtbot", __FILE__) + "/*.jar"].each do |fn|
111
+ require fn
112
+ end
113
+ org.eclipse.swtbot.swt.finder.SWTBot.new
114
+ end
103
115
  end
104
116
  end
105
117
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: swt
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: "0.6"
5
+ version: "0.7"
6
6
  platform: java
7
7
  authors:
8
8
  - Daniel Lucraft
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-03 00:00:00 -04:00
13
+ date: 2011-08-04 00:00:00 -04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -35,6 +35,11 @@ files:
35
35
  - lib/swt/minimal.rb
36
36
  - LICENSE
37
37
  - README.md
38
+ - vendor/swt_linux.jar
39
+ - vendor/swt_linux64.jar
40
+ - vendor/swt_osx64.jar
41
+ - vendor/swt_osx_3_7.jar
42
+ - vendor/swt_win32.jar
38
43
  - vendor/jface/org.eclipse.core.commands.jar
39
44
  - vendor/jface/org.eclipse.core.jobs.jar
40
45
  - vendor/jface/org.eclipse.core.resources.jar
@@ -45,11 +50,14 @@ files:
45
50
  - vendor/jface/org.eclipse.jface.text_3.5.0.jar
46
51
  - vendor/jface/org.eclipse.osgi.jar
47
52
  - vendor/jface/org.eclipse.text_3.5.0.v20090513-2000.jar
48
- - vendor/swt_linux.jar
49
- - vendor/swt_linux64.jar
50
- - vendor/swt_osx64.jar
51
- - vendor/swt_osx_3_7.jar
52
- - vendor/swt_win32.jar
53
+ - vendor/swtbot/org.apache.log4j_1.2.13.v200903072027.jar
54
+ - vendor/swtbot/org.eclipse.swtbot.junit4_x_2.0.4.20110304_0338-e5aff47-dev-e36.jar
55
+ - vendor/swtbot/org.eclipse.swtbot.swt.finder_2.0.4.20110304_0338-e5aff47-dev-e36.jar
56
+ - vendor/swtbot/org.hamcrest.core_1.1.0.v20090501071000.jar
57
+ - vendor/swtbot/org.hamcrest.integration_1.1.0.v20090501071000.jar
58
+ - vendor/swtbot/org.hamcrest.library_1.1.0.v20090501071000.jar
59
+ - vendor/swtbot/org.hamcrest.text_1.1.0.v20090501071000.jar
60
+ - vendor/swtbot/org.hamcrest_1.1.0.v20090501071000.jar
53
61
  has_rdoc: true
54
62
  homepage: http://github.com/danlucraft/swt
55
63
  licenses: []