motion-accessibility 2.1.1 → 2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c09c14b80650cbf3bb0c741c0add8d2a98a93b16
4
- data.tar.gz: 59ec108344d57422fca195a3237f1497efc2a496
3
+ metadata.gz: 0fda7b42011a96176aceec7228a2e39709678ffb
4
+ data.tar.gz: 1ecf5a331e9f478340c90c487b3d4a74ce97c36b
5
5
  SHA512:
6
- metadata.gz: 479339e0aab7ae9f0d8cbc5c953e970849cbfcc238afc834c2c5bed988d8c75c2c63128290121e6aab8218fc9fe245e4021e65681d30a037621298dc4e479cc2
7
- data.tar.gz: 34cb1ca30f82dd3bdf6d3d5c910f302b3591291df043a65a2af4ec97f539f79f9dddc99327cabf764d0288a450e694226ff917352dfde055046d2aae8cc68685
6
+ metadata.gz: 2500c41291c52741eb0393ca50cf845e5914674fe53ce64a8a66eec443338fabf0239a5fb1e7377f9b986fc19a2cf25c3ca20521ec35cfeadd4d329e26d78b03
7
+ data.tar.gz: 1c43feb40d9621ca49f5c5551d4e6b87d396a4f89ad1fb019469717f0f7c7d3a9623ea89df9b136f4cb58e06a52346a306d6100d5bcf85e85ab15a8ffe93239e
data/README.md CHANGED
@@ -63,6 +63,8 @@ You can refresh the browser by passing the `:refresh` or `:top` keyword.
63
63
 
64
64
  You may pass the `:scroll` keyword to scroll a UIScrollView or descendants, such as a UITableView. This still has some minor issues .
65
65
 
66
+ You may pass any view as an argument to browse it. Use the `:refresh` or `:top` keywords to switch back to the running application.
67
+
66
68
  #### `view` or `v`
67
69
 
68
70
  The `view` or `v` command simply returns the current view. If you have just browsed a view, it will return that. Otherwise, you may specify the view you wish to browse. Note that for all the commands, you may either use its number or accessibility label.
@@ -109,19 +111,20 @@ main)> label=UILabel.alloc.initWithFrame(CGRectMake(0, 0, 100, 100))
109
111
  (main)> label.text="Hello!"
110
112
  => "Hello!"
111
113
  (main)> label.inspect_accessibility
112
- Accessibility label: "Hello!"
113
- Accessibility hint: nil
114
- Accessibility traits: Static text
115
- Accessibility value: nil
116
- Accessibility language: nil
117
- Accessibility frame: x=0.0 y=0.0 width=100.0 height=100.0
118
- Accessibility activation point: x=0.0 y=0.0
114
+ Accessibility label: Hello!
115
+ Accessibility hint: nil
116
+ Accessibility traits: Static text
117
+ Accessibility value: nil
118
+ Accessibility language: nil
119
+ Accessibility frame: x=0.0 y=20.0 width=320.0 height=189.3
120
+ Accessibility activation point: x=160.0 y=114.7
119
121
  Accessibility path: nil
120
- Accessibility view is modal: false
121
- Should group accessibility children: false
122
- Accessibility elements hidden: false
123
- Is accessibility element: false
122
+ Accessibility view is modal: false
123
+ Should group accessibility children: false
124
+ Accessibility elements hidden: false
125
+ Is accessibility element: true
124
126
  Accessibility identifier: nil
127
+ => nil
125
128
  ```
126
129
 
127
130
  By the way, `a11y` stands for `accessibility`, because it has a, then 11 letters, then y. Hence, you can use `inspect_a11y` as a shortcut. You can also use this abreviation when referring to the Accessibility class, for instance `A11y::Element`.
@@ -39,7 +39,7 @@ when :cgpoint then value="x=#{value.x.round(1)} y=#{value.y.round(1)}"
39
39
  when :uibezierpath then value="x=#{value.bounds.origin.x.round(1)} y=#{value.bounds.origin.y.round(1)} width=#{value.bounds.size.width.round(1)} height=#{value.bounds.size.height.round(1)}"
40
40
  end
41
41
  else
42
- value="nil"
42
+ value="nil" if value.nil?
43
43
  end
44
44
  rescue
45
45
  value="Error: #{$!}"
@@ -63,7 +63,7 @@ elsif request==:scroll
63
63
  raise "This view cannot scroll" unless A11y::Console.scrollable_view?($browser_current.view)
64
64
  below=CGRect.new([0, $browser_current.view.size.height], $browser_current.view.size)
65
65
  $browser_current.view.scrollRectToVisible(below, animated: false)
66
- else
66
+ elsif request.kind_of?(Fixnum)||request.kind_of?(String)
67
67
  A11y::Console.init unless $browser_tree
68
68
  $browser_current=$browser_tree unless $browser_current
69
69
  found=$browser_current.find(request)
@@ -76,6 +76,11 @@ A11y::Console.init unless A11y::Data[:refresh]
76
76
  $browser_current=found
77
77
  $browser_path<<found
78
78
  end
79
+ elsif request.respond_to?(:view)&&request.respond_to?(:subviews)
80
+ A11y::Console.init(request)
81
+ $browser_current=$browser_tree
82
+ else
83
+ puts "Unknown request: #{request.inspect}"
79
84
  end
80
85
  $browser_cursor=$browser_current
81
86
  A11y::Console.display_views
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-accessibility
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: '2.2'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Austin Seraphin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-09 00:00:00.000000000 Z
11
+ date: 2014-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake