AXElements 0.9.0 → 1.0.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/.yardopts +0 -4
  2. data/README.markdown +22 -17
  3. data/Rakefile +1 -1
  4. data/ext/accessibility/key_coder/extconf.rb +1 -1
  5. data/ext/accessibility/key_coder/key_coder.c +2 -4
  6. data/lib/accessibility.rb +3 -3
  7. data/lib/accessibility/core.rb +948 -0
  8. data/lib/accessibility/dsl.rb +30 -186
  9. data/lib/accessibility/enumerators.rb +1 -0
  10. data/lib/accessibility/factory.rb +78 -134
  11. data/lib/accessibility/graph.rb +5 -9
  12. data/lib/accessibility/highlighter.rb +86 -0
  13. data/lib/accessibility/{pretty_printer.rb → pp_inspector.rb} +4 -3
  14. data/lib/accessibility/qualifier.rb +3 -5
  15. data/lib/accessibility/screen_recorder.rb +217 -0
  16. data/lib/accessibility/statistics.rb +57 -0
  17. data/lib/accessibility/translator.rb +23 -32
  18. data/lib/accessibility/version.rb +2 -22
  19. data/lib/ax/application.rb +20 -159
  20. data/lib/ax/element.rb +42 -32
  21. data/lib/ax/scroll_area.rb +5 -6
  22. data/lib/ax/systemwide.rb +1 -33
  23. data/lib/ax_elements.rb +1 -9
  24. data/lib/ax_elements/core_graphics_workaround.rb +5 -0
  25. data/lib/ax_elements/nsarray_compat.rb +17 -97
  26. data/lib/ax_elements/vendor/inflection_data.rb +66 -0
  27. data/lib/ax_elements/vendor/inflections.rb +176 -0
  28. data/lib/ax_elements/vendor/inflector.rb +306 -0
  29. data/lib/minitest/ax_elements.rb +180 -0
  30. data/lib/mouse.rb +227 -0
  31. data/lib/rspec/expectations/ax_elements.rb +234 -0
  32. data/rakelib/gem.rake +3 -12
  33. data/rakelib/test.rake +15 -0
  34. data/test/helper.rb +20 -10
  35. data/test/integration/accessibility/test_core.rb +18 -0
  36. data/test/integration/accessibility/test_dsl.rb +40 -38
  37. data/test/integration/accessibility/test_enumerators.rb +1 -0
  38. data/test/integration/accessibility/test_graph.rb +0 -1
  39. data/test/integration/accessibility/test_qualifier.rb +2 -2
  40. data/test/integration/ax/test_application.rb +2 -9
  41. data/test/integration/ax/test_element.rb +0 -40
  42. data/test/integration/minitest/test_ax_elements.rb +89 -0
  43. data/test/integration/rspec/expectations/test_ax_elements.rb +102 -0
  44. data/test/sanity/accessibility/test_factory.rb +2 -2
  45. data/test/sanity/accessibility/test_highlighter.rb +56 -0
  46. data/test/sanity/accessibility/{test_pretty_printer.rb → test_pp_inspector.rb} +9 -9
  47. data/test/sanity/accessibility/test_statistics.rb +57 -0
  48. data/test/sanity/ax/test_application.rb +1 -16
  49. data/test/sanity/ax/test_element.rb +2 -2
  50. data/test/sanity/ax_elements/test_nsobject_inspect.rb +2 -4
  51. data/test/sanity/minitest/test_ax_elements.rb +17 -0
  52. data/test/sanity/rspec/expectations/test_ax_elements.rb +15 -0
  53. data/test/sanity/test_mouse.rb +22 -0
  54. data/test/test_core.rb +454 -0
  55. metadata +44 -69
  56. data/History.markdown +0 -41
  57. data/lib/accessibility/system_info.rb +0 -230
  58. data/lib/ax_elements/active_support_selections.rb +0 -10
  59. data/lib/ax_elements/mri.rb +0 -57
  60. data/test/sanity/accessibility/test_version.rb +0 -15
@@ -1,10 +0,0 @@
1
- # this is just a list of core extensions from Active Support
2
- # that I would like to have loaded by default
3
-
4
- require 'active_support/core_ext/numeric'
5
- require 'active_support/core_ext/date/calculations'
6
- require 'active_support/core_ext/date/conversions'
7
- require 'active_support/core_ext/time/calculations'
8
- require 'active_support/core_ext/time/conversions'
9
- require 'active_support/core_ext/date_time/calculations'
10
- require 'active_support/core_ext/date_time/conversions'
@@ -1,57 +0,0 @@
1
- unless on_macruby?
2
-
3
- KAXChildrenAttribute = 'AXChildren'
4
- KAXRoleAttribute = 'AXRole'
5
- KAXSubroleAttribute = 'AXSubrole'
6
- KAXIdentifierAttribute = 'AXIdentifier'
7
- KAXWindowCreatedNotification = 'AXWindowCreated'
8
- KAXMainWindowAttribute = 'AXMainWindow'
9
- KAXFocusedAttribute = 'AXFocused'
10
- KAXValueChangedNotification = 'AXValueChanged'
11
- KAXTitleAttribute = 'AXTitle'
12
- KAXURLAttribute = 'AXURL'
13
- KAXTitleUIElementAttribute = 'AXTitleUIElement'
14
- KAXPlaceholderValueAttribute = 'AXPlaceholderValue'
15
- KAXWindowRole = 'AXWindow'
16
- KAXCloseButtonSubrole = 'AXCloseButton'
17
- KAXTrashDockItemSubrole = 'AXTrashDockItem'
18
- KAXRTFForRangeParameterizedAttribute = 'AXRTFForRange'
19
- KAXIsApplicationRunningAttribute = 'AXIsApplicationRunning'
20
- KAXStringForRangeParameterizedAttribute = 'AXStringForRange'
21
-
22
- unless defined? NSString
23
- NSString = String
24
- end
25
-
26
- unless defined? NSDictionary
27
- NSDictionary = Hash
28
- end
29
-
30
- unless defined? NSArray
31
- NSArray = Array
32
- end
33
-
34
- unless defined? NSDate
35
- NSDate = Time
36
- end
37
-
38
- class Symbol
39
-
40
- def chomp suffix
41
- to_s.chomp suffix
42
- end
43
-
44
- end
45
-
46
- end
47
-
48
- unless defined? KAXIdentifierAttribute
49
- ##
50
- # Added for backwards compatability with Snow Leopard.
51
- # This attribute is standard with Lion and newer. AXElements depends
52
- # on it being defined.
53
- #
54
- # @return [String]
55
- KAXIdentifierAttribute = 'AXIdentifier'
56
- end
57
-
@@ -1,15 +0,0 @@
1
- require 'test/runner'
2
- require 'accessibility/version'
3
-
4
- class TestAccessibilityVersion < MiniTest::Unit::TestCase
5
-
6
- def test_version_is_ascii_only # RubyGems :(
7
- assert_equal Accessibility::VERSION.encode(Encoding::ASCII), Accessibility::VERSION
8
- end
9
-
10
- def test_version_method
11
- assert_match Accessibility::VERSION, Accessibility.version
12
- assert_match Accessibility::ENGINE, Accessibility.version
13
- end
14
-
15
- end