AXElements 7.0.0.pre3 → 7.0.0.pre4
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.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +0 -0
- data/.yardopts +0 -4
- data/README.markdown +18 -11
- data/lib/accessibility/factory.rb +0 -1
- data/lib/accessibility/pretty_printer.rb +3 -5
- data/lib/accessibility/qualifier.rb +1 -1
- data/lib/accessibility/translator.rb +1 -1
- data/lib/accessibility/version.rb +3 -8
- data/lib/ax/application.rb +9 -8
- data/lib/ax/button.rb +1 -1
- data/lib/ax/element.rb +2 -2
- data/lib/ax/radio_button.rb +1 -1
- data/lib/ax/static_text.rb +1 -1
- data/lib/ax/systemwide.rb +6 -11
- data/lib/ax/text_area.rb +1 -2
- data/rakelib/doc.rake +1 -1
- data/test/integration/ax/test_element.rb +1 -1
- data/test/sanity/ax/test_application.rb +1 -1
- metadata +27 -5
- metadata.gz.sig +2 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c58978353602020db77950da18c9e239fe200bf4
|
4
|
+
data.tar.gz: 0a0c08e814471c9b8875b1a0f54c6ea3df8cd091
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7e576feeda11756c6118412c22ab14abf9dacf87df94149f07ffdc0e0b0874638a27e19535f7e6fb4e1bed8312a0db871239dd16c97c8858167a8347c655a63
|
7
|
+
data.tar.gz: 8ca050a4964285c45311454f1ef87faf8d8ab8f6507620d892f39d130e13d2d9faf679e87dadbc14a424a67cea2b7e01eccee091a45402206df1268fb783325d
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
a�e�_T澓yRc���S��Ǻu�En?<�]M����mŽ�����)�R�N��¸�$��:Ri���l(=M�E2G9�!�M��}����'�l_�+�E.�,��ǵZܴ۠!VӮ����'cu�S�w-�Vƽ������K���ԑ�1I�<l��j��o-���R�+�Xԩ��v�\\���G�t��OTAcH�_G�W3룯Jp_�N��B
|
data.tar.gz.sig
ADDED
Binary file
|
data/.yardopts
CHANGED
data/README.markdown
CHANGED
@@ -73,8 +73,8 @@ command line tools, and then you can install AXElements:
|
|
73
73
|
sudo gem install AXElements
|
74
74
|
```
|
75
75
|
|
76
|
-
Alternatively, if you know how to change your `$GEM_HOME`,
|
77
|
-
install AXElements without using `sudo`.
|
76
|
+
Alternatively, if you know how to change your `$GEM_HOME`, or are
|
77
|
+
using RVM, then you can install AXElements without using `sudo`.
|
78
78
|
|
79
79
|
You will be asked to "Grant access" for Accessibility to Terminal.app
|
80
80
|
when you first try using AXElements. Make sure you select Terminal in
|
@@ -86,22 +86,30 @@ you to grant further permissions:
|
|
86
86
|

|
87
87
|
|
88
88
|
For older versions of OS X, you will need to install a compatible version
|
89
|
-
of Ruby along with the Developer tools.
|
90
|
-
|
91
|
-
- [Ruby 1.9.4+](http://www.ruby-lang.org/)
|
89
|
+
of Ruby (2.0.0+) along with the Developer tools.
|
92
90
|
|
93
91
|
You will also need to make sure you "enable access for assistive devices".
|
94
92
|
This can be done in System Preferences in the Universal Access section:
|
95
93
|
|
96
94
|

|
97
95
|
|
98
|
-
Then you can install AXElements
|
99
|
-
RubyGems install is as usual, but you may need `sudo` power:
|
96
|
+
Then you can install AXElements the same as OS X 10.9.
|
100
97
|
|
101
|
-
|
102
|
-
|
98
|
+
|
99
|
+
### Security
|
100
|
+
|
101
|
+
AXElements is cryptographically signed. To be sure the gem you install
|
102
|
+
hasn’t been tampered with you will want to add my public key (if you
|
103
|
+
haven’t already) as a trusted certificate for Rubygems:
|
104
|
+
|
105
|
+
```sh
|
106
|
+
gem cert --add <(curl -Ls https://raw.github.com/AXElements/AXElements/master/certs/markrada26@gmail.com.pem)
|
107
|
+
gem install AXElements -P MediumSecurity
|
103
108
|
```
|
104
109
|
|
110
|
+
Unfortunately, not all of AXElements' dependencies are signed, and so
|
111
|
+
`Medium` security is the strongest that can be used at the moment.
|
112
|
+
|
105
113
|
|
106
114
|
### Install From Source
|
107
115
|
|
@@ -193,7 +201,7 @@ See {file:CONTRIBUTING.markdown}
|
|
193
201
|
|
194
202
|
## Copyright
|
195
203
|
|
196
|
-
Copyright (c) 2010-
|
204
|
+
Copyright (c) 2010-2015, Marketcircle Inc.
|
197
205
|
All rights reserved.
|
198
206
|
|
199
207
|
Redistribution and use in source and binary forms, with or without
|
@@ -222,4 +230,3 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
222
230
|
|
223
231
|
|
224
232
|
[](https://bitdeli.com/free "Bitdeli Badge")
|
225
|
-
|
@@ -16,7 +16,7 @@ module Accessibility::PrettyPrinter
|
|
16
16
|
# Create an identifier for the receiver by using various attributes
|
17
17
|
# that should make it very easy to identify the element.
|
18
18
|
#
|
19
|
-
# @return [String
|
19
|
+
# @return [String]
|
20
20
|
def pp_identifier
|
21
21
|
# @note use, or lack of use, of #inspect is intentional for visual effect
|
22
22
|
|
@@ -48,8 +48,6 @@ module Accessibility::PrettyPrinter
|
|
48
48
|
if attributes.include? :identifier
|
49
49
|
return " id=#{attribute(:identifier)}"
|
50
50
|
end
|
51
|
-
|
52
|
-
rescue NoMethodError
|
53
51
|
end
|
54
52
|
|
55
53
|
##
|
@@ -92,7 +90,7 @@ module Accessibility::PrettyPrinter
|
|
92
90
|
end
|
93
91
|
|
94
92
|
##
|
95
|
-
# Safely create a {pp_checkbox} for the `KAXEnabledAttribute`
|
93
|
+
# Safely create a {#pp_checkbox} for the `KAXEnabledAttribute`
|
96
94
|
#
|
97
95
|
# If the receiver does not have the attribute then an empty
|
98
96
|
# string will be returned.
|
@@ -107,7 +105,7 @@ module Accessibility::PrettyPrinter
|
|
107
105
|
end
|
108
106
|
|
109
107
|
##
|
110
|
-
# Safely create a {pp_checkbox} for the `KAXFocusedAttribute`
|
108
|
+
# Safely create a {#pp_checkbox} for the `KAXFocusedAttribute`
|
111
109
|
#
|
112
110
|
# If the receiver does not have the attribute then an empty
|
113
111
|
# string will be returned.
|
@@ -154,7 +154,7 @@ class Accessibility::Translator
|
|
154
154
|
@rubyisms = Hash.new do |hash, key|
|
155
155
|
hash[key] = [ActiveSupport::Inflector.underscore(@unprefixes[key]).to_sym]
|
156
156
|
end
|
157
|
-
preloads.each_pair do |k,v| @rubyisms[v] << k end
|
157
|
+
preloads.each_pair do |k, v| @rubyisms[v] << k end
|
158
158
|
end
|
159
159
|
|
160
160
|
# @return [Hash{Symbol=>String}]
|
@@ -4,24 +4,19 @@
|
|
4
4
|
# The main AXElements namespace.
|
5
5
|
module Accessibility
|
6
6
|
# @return [String]
|
7
|
-
VERSION
|
7
|
+
VERSION = '7.0.0.pre4'
|
8
8
|
|
9
9
|
# @return [String]
|
10
|
-
CODE_NAME =
|
11
|
-
when 'ruby' then 'ブースター'
|
12
|
-
when 'rbx' then 'ブラッキー' # for when rbx has good cext support
|
13
|
-
else 'シャワーズ' # vapor(ware)eon
|
14
|
-
end
|
10
|
+
CODE_NAME = 'ニンフィア'
|
15
11
|
|
16
12
|
##
|
17
13
|
# The complete version string for AXElements
|
18
14
|
#
|
19
15
|
# This differs from {Accessibility::VERSION} in that it also
|
20
|
-
# includes
|
16
|
+
# includes {CODE_NAME} information.
|
21
17
|
#
|
22
18
|
# @return [String]
|
23
19
|
def self.version
|
24
20
|
"#{VERSION}-#{CODE_NAME}"
|
25
21
|
end
|
26
|
-
|
27
22
|
end
|
data/lib/ax/application.rb
CHANGED
@@ -272,7 +272,7 @@ class AX::Application < AX::Element
|
|
272
272
|
perform :unhide
|
273
273
|
end
|
274
274
|
|
275
|
-
#
|
275
|
+
# @see AX::Element#perform
|
276
276
|
def perform name
|
277
277
|
case name
|
278
278
|
when :terminate
|
@@ -294,8 +294,8 @@ class AX::Application < AX::Element
|
|
294
294
|
end
|
295
295
|
|
296
296
|
##
|
297
|
-
# Send keyboard input to the
|
298
|
-
#
|
297
|
+
# Send keyboard input to the focused control element; this is not necessarily
|
298
|
+
# an element belonging to the receiving app.
|
299
299
|
#
|
300
300
|
# For details on how to format the string, check out the
|
301
301
|
# [Keyboarding documentation](http://github.com/Marketcircle/AXElements/wiki/Keyboarding).
|
@@ -312,11 +312,12 @@ class AX::Application < AX::Element
|
|
312
312
|
|
313
313
|
##
|
314
314
|
# Press the given modifier key and hold it down while yielding to
|
315
|
-
# the given block.
|
315
|
+
# the given block. As with {#type}, the key events apply to the control
|
316
|
+
# element which is currently focused.
|
316
317
|
#
|
317
318
|
# @example
|
318
319
|
#
|
319
|
-
#
|
320
|
+
# hold_modifier "\\CONTROL" do
|
320
321
|
# drag_mouse_to point
|
321
322
|
# end
|
322
323
|
#
|
@@ -325,10 +326,10 @@ class AX::Application < AX::Element
|
|
325
326
|
def hold_modifier key
|
326
327
|
code = EventGenerator::CUSTOM[key]
|
327
328
|
raise ArgumentError, "Invalid modifier `#{key}' given" unless code
|
328
|
-
|
329
|
+
KeyCoder.post_event([[code, true]])
|
329
330
|
yield
|
330
331
|
ensure
|
331
|
-
|
332
|
+
KeyCoder.post_event([[code, false]]) if code
|
332
333
|
code
|
333
334
|
end
|
334
335
|
|
@@ -344,7 +345,7 @@ class AX::Application < AX::Element
|
|
344
345
|
# @param path [String,Regexp]
|
345
346
|
# @return [AX::MenuItem]
|
346
347
|
def select_menu_item *path
|
347
|
-
target = navigate_menu
|
348
|
+
target = navigate_menu(*path)
|
348
349
|
target.perform :press
|
349
350
|
target
|
350
351
|
end
|
data/lib/ax/button.rb
CHANGED
data/lib/ax/element.rb
CHANGED
@@ -14,7 +14,7 @@ require 'accessibility/pretty_printer'
|
|
14
14
|
# @abstract
|
15
15
|
#
|
16
16
|
# The abstract base class for all accessibility objects. `AX::Element`
|
17
|
-
# composes low level
|
17
|
+
# composes low level `AXUIElementRef` objects into a more Rubyish
|
18
18
|
# interface.
|
19
19
|
#
|
20
20
|
# This abstract base class provides generic functionality that all
|
@@ -428,7 +428,7 @@ class AX::Element
|
|
428
428
|
# lookups, but will return false for potential implicit searches.
|
429
429
|
#
|
430
430
|
# This does not work for predicate methods at the moment.
|
431
|
-
def respond_to? name
|
431
|
+
def respond_to? name, priv = false
|
432
432
|
key = TRANSLATOR.cocoaify name.to_s.chomp(EQUALS)
|
433
433
|
@ref.attributes.include?(key) ||
|
434
434
|
@ref.parameterized_attributes.include?(key) ||
|
data/lib/ax/radio_button.rb
CHANGED
data/lib/ax/static_text.rb
CHANGED
data/lib/ax/systemwide.rb
CHANGED
@@ -37,7 +37,6 @@ class AX::SystemWide < AX::Element
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
40
|
##
|
42
41
|
# Overridden since there is only one way to get the element ref.
|
43
42
|
def initialize
|
@@ -45,14 +44,10 @@ class AX::SystemWide < AX::Element
|
|
45
44
|
end
|
46
45
|
|
47
46
|
##
|
48
|
-
#
|
49
|
-
# events to which ever app has focus.
|
50
|
-
#
|
51
|
-
# Generate keyboard events by simulating keyboard input.
|
47
|
+
# Send keyboard input to the focused control element.
|
52
48
|
#
|
53
|
-
#
|
54
|
-
# [Keyboarding documentation](http://github.com/Marketcircle/AXElements/wiki/Keyboarding)
|
55
|
-
# for more information on how to format strings.
|
49
|
+
# For details on how to format the string, check out the
|
50
|
+
# [Keyboarding documentation](http://github.com/Marketcircle/AXElements/wiki/Keyboarding).
|
56
51
|
#
|
57
52
|
# @param string [String]
|
58
53
|
# @return [Boolean]
|
@@ -69,7 +64,7 @@ class AX::SystemWide < AX::Element
|
|
69
64
|
#
|
70
65
|
# @example
|
71
66
|
#
|
72
|
-
#
|
67
|
+
# hold_modifier "\\CONTROL" do
|
73
68
|
# drag_mouse_to point
|
74
69
|
# end
|
75
70
|
#
|
@@ -78,10 +73,10 @@ class AX::SystemWide < AX::Element
|
|
78
73
|
def hold_modifier key
|
79
74
|
code = EventGenerator::CUSTOM[key]
|
80
75
|
raise ArgumentError, "Invalid modifier `#{key}' given" unless code
|
81
|
-
|
76
|
+
KeyCoder.post_event([[code, true]])
|
82
77
|
yield
|
83
78
|
ensure # if block raises the button might stuck, so ensure it is released
|
84
|
-
|
79
|
+
KeyCoder.post_event([[code, false]]) if code
|
85
80
|
code
|
86
81
|
end
|
87
82
|
|
data/lib/ax/text_area.rb
CHANGED
@@ -7,10 +7,9 @@ require 'accessibility/text_highlighter'
|
|
7
7
|
class AX::TextArea < AX::Element
|
8
8
|
include Accessibility::TextHighlighter
|
9
9
|
|
10
|
-
#
|
10
|
+
# @see Accessibility::TextHighlighter#highlight_text
|
11
11
|
def highlight_text range
|
12
12
|
# @todo make sure the text is visible first
|
13
13
|
super
|
14
14
|
end
|
15
|
-
|
16
15
|
end
|
data/rakelib/doc.rake
CHANGED
metadata
CHANGED
@@ -1,14 +1,36 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: AXElements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.0.
|
4
|
+
version: 7.0.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rada
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
|
-
cert_chain:
|
11
|
-
|
10
|
+
cert_chain:
|
11
|
+
- |
|
12
|
+
-----BEGIN CERTIFICATE-----
|
13
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAptYXJr
|
14
|
+
cmFkYTI2MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
|
15
|
+
b20wHhcNMTUwMjAyMDQ1MTA3WhcNMTYwMjAyMDQ1MTA3WjBBMRMwEQYDVQQDDApt
|
16
|
+
YXJrcmFkYTI2MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
17
|
+
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw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|
12
34
|
dependencies:
|
13
35
|
- !ruby/object:Gem::Dependency
|
14
36
|
name: mouse
|
@@ -16,14 +38,14 @@ dependencies:
|
|
16
38
|
requirements:
|
17
39
|
- - "~>"
|
18
40
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
41
|
+
version: '4.0'
|
20
42
|
type: :runtime
|
21
43
|
prerelease: false
|
22
44
|
version_requirements: !ruby/object:Gem::Requirement
|
23
45
|
requirements:
|
24
46
|
- - "~>"
|
25
47
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
48
|
+
version: '4.0'
|
27
49
|
- !ruby/object:Gem::Dependency
|
28
50
|
name: screen_recorder
|
29
51
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
ADDED