AXElements 7.0.0.pre3 → 7.0.0.pre4

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: 5dbc6cd5044cfd1d0d997fa1af18f723d298480b
4
- data.tar.gz: 300b119742fa97600c3b2c79445e208f0321eba7
3
+ metadata.gz: c58978353602020db77950da18c9e239fe200bf4
4
+ data.tar.gz: 0a0c08e814471c9b8875b1a0f54c6ea3df8cd091
5
5
  SHA512:
6
- metadata.gz: b0773965241f98983ff4cd7941257b358e7d332d87e4a650ec9bfe8da716226201ff59ba02b46c365a0abaab4ae2ca694c1f75b3c479292759fbe872afab98ec
7
- data.tar.gz: f1c8b184420efdc69da096d01a3c2027abf7ec589cfb5f36764ac343a76abefea8be1e993b1267e26dda5969a422a1b0a4adfe4b0688a3c4da8557f15bc87ceb
6
+ metadata.gz: b7e576feeda11756c6118412c22ab14abf9dacf87df94149f07ffdc0e0b0874638a27e19535f7e6fb4e1bed8312a0db871239dd16c97c8858167a8347c655a63
7
+ data.tar.gz: 8ca050a4964285c45311454f1ef87faf8d8ab8f6507620d892f39d130e13d2d9faf679e87dadbc14a424a67cea2b7e01eccee091a45402206df1268fb783325d
@@ -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
Binary file
data/.yardopts CHANGED
@@ -1,8 +1,5 @@
1
- --no-cache
2
- --no-output
3
1
  --verbose
4
2
  --markup markdown
5
- --markup-provider kramdown
6
3
  --asset docs/images:images
7
4
  --readme README.markdown
8
5
  --hide-void-return
@@ -11,4 +8,3 @@ ext/**/*{.m,.c}
11
8
  -
12
9
  History.markdown
13
10
  CONTRIBUTING.markdown
14
-
@@ -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`, then you can
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
  ![How To Grant Access](http://axelements.com/images/privacy_prefs.png)
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. Supported Rubies are:
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
  ![Universal Access](http://ferrous26.com/images/enable_accessibility.png)
97
95
 
98
- Then you can install AXElements either from RubyGems or from source. The
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
- ```bash
102
- gem install AXElements
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-2013, Marketcircle Inc.
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
  [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/AXElements/axelements/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
225
-
@@ -136,4 +136,3 @@ class Accessibility::Element
136
136
  # @return [Accessibility::Translator]
137
137
  TRANSLATOR = Accessibility::Translator.instance
138
138
  end
139
-
@@ -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,#to_s]
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.
@@ -64,7 +64,7 @@ class Accessibility::Qualifier
64
64
  # array. This is done to avoid checking types for each call to
65
65
  # {#qualifies?}.
66
66
  #
67
- # @param criteria [Hash]
67
+ # @return [void]
68
68
  def compile!
69
69
  @filters = @criteria.map do |key, value|
70
70
  if value.kind_of? Hash
@@ -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.0.0.pre3'
7
+ VERSION = '7.0.0.pre4'
8
8
 
9
9
  # @return [String]
10
- CODE_NAME = case RUBY_ENGINE
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 `RUBY_ENGINE` information.
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
@@ -272,7 +272,7 @@ class AX::Application < AX::Element
272
272
  perform :unhide
273
273
  end
274
274
 
275
- # (see AX::Element#perform)
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 receiver, the control in the app that
298
- # currently has focus will receive the key presses.
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
- # hold_key "\\CONTROL" do
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
- @ref.post [[code, true]]
329
+ KeyCoder.post_event([[code, true]])
329
330
  yield
330
331
  ensure
331
- @ref.post [[code,false]] if code
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 *path
348
+ target = navigate_menu(*path)
348
349
  target.perform :press
349
350
  target
350
351
  end
@@ -13,7 +13,7 @@ class AX::Button < AX::Element
13
13
  #
14
14
  # @return [Boolean]
15
15
  def == other
16
- if other.kind_of? NSString
16
+ if other.is_a? String
17
17
  attribute(:title) == other
18
18
  else
19
19
  super
@@ -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 {AXUIElementRef} objects into a more Rubyish
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) ||
@@ -13,7 +13,7 @@ class AX::RadioButton < AX::Element
13
13
  #
14
14
  # @return [Boolean]
15
15
  def == other
16
- if other.kind_of? NSString
16
+ if other.kind_of? String
17
17
  attribute(:title) == other
18
18
  else
19
19
  super
@@ -12,7 +12,7 @@ class AX::StaticText < AX::Element
12
12
  #
13
13
  # @return [Boolean]
14
14
  def == other
15
- if other.kind_of? NSString
15
+ if other.kind_of? String
16
16
  attribute(:value) == other
17
17
  else
18
18
  super
@@ -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
- # @note With the `SystemWide` class, using {#type} will send the
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
- # See the
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
- # hold_key "\\CONTROL" do
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
- @ref.post [[code, true]]
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
- @ref.post [[code,false]] if code
79
+ KeyCoder.post_event([[code, false]]) if code
85
80
  code
86
81
  end
87
82
 
@@ -7,10 +7,9 @@ require 'accessibility/text_highlighter'
7
7
  class AX::TextArea < AX::Element
8
8
  include Accessibility::TextHighlighter
9
9
 
10
- # (see Accessibility::TextHighlighter#highlight_text)
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
@@ -6,6 +6,6 @@ end
6
6
  desc 'Remove files generated by YARD'
7
7
  task :clobber_yard do
8
8
  rm_rf '.yardoc/'
9
+ rm_rf 'doc/'
9
10
  end
10
11
  task :clobber => :clobber_yard
11
-
@@ -24,7 +24,7 @@ class TestAXElement < Minitest::Test
24
24
 
25
25
  def test_search_plural
26
26
  result = app.window.search(:buttons)
27
- assert_kind_of NSArray, result
27
+ assert_kind_of Array, result
28
28
  end
29
29
 
30
30
  def test_set_range
@@ -100,7 +100,7 @@ class TestAXApplication < Minitest::Test
100
100
  end
101
101
 
102
102
  def test_info_plist
103
- assert_equal 'transmute', app.info_plist['CFBundleIconFile']
103
+ assert_equal 'hmmmmm', app.info_plist['CFBundleIconFile']
104
104
  end
105
105
 
106
106
  def test_version
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.pre3
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
- date: 2015-01-11 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMRMwEQYDVQQDDAptYXJr
14
+ cmFkYTI2MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZFgNj
15
+ b20wHhcNMTUwMjAyMDQ1MTA3WhcNMTYwMjAyMDQ1MTA3WjBBMRMwEQYDVQQDDApt
16
+ YXJrcmFkYTI2MRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJk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encies:
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: 2.0.0
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: 2.0.0
48
+ version: '4.0'
27
49
  - !ruby/object:Gem::Dependency
28
50
  name: screen_recorder
29
51
  requirement: !ruby/object:Gem::Requirement
@@ -0,0 +1,2 @@
1
+ #+������LV
2
+ �F^���@�j�'����A��Ϫ~/vIWY��z��K�d��b�m����O<ڥt�'��C�.���+h���p