atspi_app_driver 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7d930d5773b89a6c889d32f0e9df0eec9d7e79c9
4
- data.tar.gz: eba633cc38136f387b44ac15381975898636f582
3
+ metadata.gz: df63371ac632f75cd2adf3e2d625df3964e92954
4
+ data.tar.gz: 7ded8612f8651e44609f6daae615aadd3ebb2ddd
5
5
  SHA512:
6
- metadata.gz: 13689dc202b10b4dfbcf71cd15ea9c58183eb590a7b211838393235ece69eb7d24388f73d7b5cbf53d2b3dc50ae193c2d5c54734bee4d40e5be63b1898d6ae9b
7
- data.tar.gz: ae55b5cf166916508a90225ade3757495199e65f3f7b1fa2fdc5c78e744ee3a3a116f68eedce0eea4d0289d0ad4ab5dd7edb0a45127d31367a0fb0c07bc745d0
6
+ metadata.gz: 4e1d27313bd4f2bbb7b9f2d518776a32ebe94dc1acdbb269054ff3bde19ee127f5781872e4b45f7310995113cb4173d4fb108e1ea4f2af2360f60ad31e424c6d
7
+ data.tar.gz: d3063870266ab9de64f410a618bfb15b37832057accd050f8dff15d09ec58497ca9fe822e99150747e6a99eed310c412039a73ba33fe94dbb8a54ca07dffcc95
File without changes
data/Rakefile CHANGED
@@ -1,2 +1,17 @@
1
1
  require 'rake/clean'
2
2
  require 'bundler/gem_tasks'
3
+ require 'rake/testtask'
4
+
5
+ namespace :test do
6
+ Rake::TestTask.new(:end_to_end) do |t|
7
+ t.libs = ['lib']
8
+ t.test_files = FileList['test/end_to_end/*_test.rb']
9
+ t.warning = true
10
+ end
11
+
12
+ task all: [:end_to_end]
13
+ end
14
+
15
+ task test: 'test:all'
16
+
17
+ task default: 'test'
@@ -12,7 +12,7 @@ module AtspiAccessiblePatches
12
12
  end
13
13
  end
14
14
 
15
- def find_role role, regex = //
15
+ def find_role(role, regex = //)
16
16
  return self if role == self.role && name =~ regex
17
17
  each_child do |child|
18
18
  result = child.find_role role, regex
@@ -21,7 +21,7 @@ module AtspiAccessiblePatches
21
21
  nil
22
22
  end
23
23
 
24
- def inspect_recursive level = 0, maxlevel = 5
24
+ def inspect_recursive(level = 0, maxlevel = 5)
25
25
  puts "#{' ' * level} > name: #{name}; role: #{role}"
26
26
  each_child do |child|
27
27
  child.inspect_recursive(level + 1) unless level >= maxlevel
@@ -34,8 +34,8 @@ Atspi::Accessible.include AtspiAccessiblePatches
34
34
  # Test driver for the Atspi-enabled applications. Takes care of boot and
35
35
  # shutdown, and provides a handle on the GUI's main UI frame.
36
36
  class AtspiAppDriver
37
- def initialize app_name, verbose: false
38
- @app_file = "bin/#{app_name}"
37
+ def initialize(app_name, app_file: nil, verbose: false)
38
+ @app_file = app_file || "bin/#{app_name}"
39
39
  @lib_dir = 'lib'
40
40
  @app_name = app_name
41
41
  @pid = nil
@@ -45,7 +45,7 @@ class AtspiAppDriver
45
45
 
46
46
  attr_reader :frame
47
47
 
48
- def boot test_timeout: 30, exit_timeout: 10, arguments: []
48
+ def boot(test_timeout: 30, exit_timeout: 10, arguments: [])
49
49
  raise 'Already booted' if @pid
50
50
 
51
51
  spawn_process(arguments)
@@ -61,7 +61,7 @@ class AtspiAppDriver
61
61
  end
62
62
  end
63
63
 
64
- def spawn_process arguments
64
+ def spawn_process(arguments)
65
65
  command = "ruby -I#{@lib_dir} #{@app_file} #{arguments.join(' ')}"
66
66
  log "About to spawn: `#{command}`"
67
67
  @pid = Process.spawn command
@@ -102,7 +102,7 @@ class AtspiAppDriver
102
102
  Process.kill 'KILL', @pid
103
103
  end
104
104
 
105
- def log message
105
+ def log(message)
106
106
  warn message if @verbose
107
107
  end
108
108
 
@@ -115,7 +115,7 @@ class AtspiAppDriver
115
115
  end
116
116
 
117
117
  # TODO: User timeout
118
- def wait_for description, _timeout
118
+ def wait_for(description, _timeout)
119
119
  start = Time.now
120
120
  # Try for 0.01 * 50 * (50 + 1) / 2 = 12.75 seconds
121
121
  value = 50.times.each do |num|
metadata CHANGED
@@ -1,43 +1,63 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atspi_app_driver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-29 00:00:00.000000000 Z
11
+ date: 2015-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gir_ffi
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 0.8.0
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: 0.10.0
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 0.8.0
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: 0.10.0
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :development
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: minitest
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
51
  - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '1.9'
53
+ version: '5.5'
34
54
  type: :development
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
37
57
  requirements:
38
58
  - - "~>"
39
59
  - !ruby/object:Gem::Version
40
- version: '1.9'
60
+ version: '5.5'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: rake
43
63
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +72,26 @@ dependencies:
52
72
  - - "~>"
53
73
  - !ruby/object:Gem::Version
54
74
  version: '10.1'
75
+ - !ruby/object:Gem::Dependency
76
+ name: gir_ffi-gtk
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 0.8.0
82
+ - - "<"
83
+ - !ruby/object:Gem::Version
84
+ version: 0.10.0
85
+ type: :development
86
+ prerelease: false
87
+ version_requirements: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 0.8.0
92
+ - - "<"
93
+ - !ruby/object:Gem::Version
94
+ version: 0.10.0
55
95
  description:
56
96
  email:
57
97
  - matijs@matijs.net
@@ -59,10 +99,10 @@ executables: []
59
99
  extensions: []
60
100
  extra_rdoc_files: []
61
101
  files:
102
+ - Gemfile
62
103
  - LICENSE
63
104
  - README.md
64
105
  - Rakefile
65
- - gems.rb
66
106
  - lib/atspi_app_driver.rb
67
107
  homepage: http://www.github.com/mvz/atspi_app_driver
68
108
  licenses: []
@@ -83,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
123
  version: '0'
84
124
  requirements: []
85
125
  rubyforge_project:
86
- rubygems_version: 2.4.5.1
126
+ rubygems_version: 2.5.0
87
127
  signing_key:
88
128
  specification_version: 4
89
129
  summary: Test GNOME applications using Atspi
90
130
  test_files: []
91
- has_rdoc: