motion-xray 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. data/.gitignore +21 -0
  2. data/Gemfile +3 -0
  3. data/Gemfile.lock +28 -0
  4. data/README.md +426 -0
  5. data/Rakefile +11 -0
  6. data/app/app_delegate.rb +44 -0
  7. data/lib/motion-xray.rb +37 -0
  8. data/lib/motion-xray/plugins/accessibility_plugin.rb +129 -0
  9. data/lib/motion-xray/plugins/log_plugin.rb +301 -0
  10. data/lib/motion-xray/plugins/save_ui_plugin.rb +142 -0
  11. data/lib/motion-xray/plugins/ui_plugin.rb +41 -0
  12. data/lib/motion-xray/version.rb +5 -0
  13. data/lib/motion-xray/views/xray_color_swatch.rb +234 -0
  14. data/lib/motion-xray/views/xray_dpad.rb +142 -0
  15. data/lib/motion-xray/views/xray_gradient_view.rb +23 -0
  16. data/lib/motion-xray/views/xray_headers.rb +101 -0
  17. data/lib/motion-xray/views/xray_lock_button.rb +50 -0
  18. data/lib/motion-xray/views/xray_scroll_view.rb +12 -0
  19. data/lib/motion-xray/views/xray_toolbar.rb +173 -0
  20. data/lib/motion-xray/views/xray_window.rb +13 -0
  21. data/lib/motion-xray/xray.rb +56 -0
  22. data/lib/motion-xray/xray_constants.rb +5 -0
  23. data/lib/motion-xray/xray_dummy.rb +8 -0
  24. data/lib/motion-xray/xray_editors.rb +62 -0
  25. data/lib/motion-xray/xray_ext.rb +125 -0
  26. data/lib/motion-xray/xray_plugin.rb +40 -0
  27. data/lib/motion-xray/xray_typewriter.rb +217 -0
  28. data/lib/motion-xray/xray_ui.rb +723 -0
  29. data/lib/motion-xray/z_editors/xray_boolean_editor.rb +24 -0
  30. data/lib/motion-xray/z_editors/xray_color_editor.rb +119 -0
  31. data/lib/motion-xray/z_editors/xray_frame_editor.rb +108 -0
  32. data/lib/motion-xray/z_editors/xray_image_editor.rb +78 -0
  33. data/lib/motion-xray/z_editors/xray_text_editor.rb +94 -0
  34. data/lib/resources/xray_button_bg@2x.png +0 -0
  35. data/lib/resources/xray_choose_button@2x.png +0 -0
  36. data/lib/resources/xray_clear_button@2x.png +0 -0
  37. data/lib/resources/xray_detail_button@2x.png +0 -0
  38. data/lib/resources/xray_dpad@2x.png +0 -0
  39. data/lib/resources/xray_dpad_center@2x.png +0 -0
  40. data/lib/resources/xray_dpad_down@2x.png +0 -0
  41. data/lib/resources/xray_dpad_left@2x.png +0 -0
  42. data/lib/resources/xray_dpad_right@2x.png +0 -0
  43. data/lib/resources/xray_dpad_up@2x.png +0 -0
  44. data/lib/resources/xray_drawer_left@2x.png +0 -0
  45. data/lib/resources/xray_drawer_right@2x.png +0 -0
  46. data/lib/resources/xray_edit_button@2x.png +0 -0
  47. data/lib/resources/xray_email_button@2x.png +0 -0
  48. data/lib/resources/xray_lock_button_horizontal@2x.png +0 -0
  49. data/lib/resources/xray_lock_button_locked@2x.png +0 -0
  50. data/lib/resources/xray_lock_button_unlocked@2x.png +0 -0
  51. data/lib/resources/xray_lock_button_vertical@2x.png +0 -0
  52. data/motion-xray.gemspec +40 -0
  53. data/resources/Default-568h@2x.png +0 -0
  54. data/spec/xray_view_spec.rb +43 -0
  55. data/vendor/Podfile.lock +11 -0
  56. metadata +177 -0
Binary file
@@ -0,0 +1,40 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/motion-xray/version.rb', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.name = 'motion-xray'
6
+ gem.version = Motion::Xray::Version
7
+
8
+ gem.authors = ['Colin T.A. Gray']
9
+ gem.email = ['colinta@gmail.com']
10
+ gem.summary = %{An in-app UI editing system for iOS}
11
+ gem.description = <<-DESC
12
+ The simulator and RubyMotion REPL make on-device testing a painful cycle of
13
+ code, compile, check, repeat. *Especially* when it comes to testing the UI,
14
+ where inexplicable differences can crop up between a device and the simulator.
15
+
16
+ Motion-Xray is an in-app developer's toolbox. Activate Xray (usually by shaking the
17
+ phone) and a UI editor appears where you can add, modify, and remove views.
18
+
19
+ Why stop there! There's a log panel, and an accessibility panel that gives you
20
+ a visiualization of how you app "looks" to the blind or color blind.
21
+
22
+ And you're damn right it's extensible! You can write new UI editors, register
23
+ custom views, and add new panels, for instance maybe you need a Bluetooth device
24
+ scanner, or a way to check API requests.
25
+
26
+ Enjoy!
27
+ DESC
28
+
29
+ gem.homepage = 'https://github.com/colinta/motion-xray'
30
+
31
+ gem.files = `git ls-files`.split($\)
32
+ gem.test_files = gem.files.grep(%r{^spec/})
33
+
34
+ gem.require_paths = ['lib']
35
+
36
+ gem.add_dependency 'sugarcube', '>= 0.20.1'
37
+ gem.add_dependency 'geomotion', '>= 0.10.0'
38
+
39
+ gem.add_development_dependency 'rspec'
40
+ end
Binary file
@@ -0,0 +1,43 @@
1
+ class XrayViewSpec < UIView
2
+
3
+ class << self
4
+ def xray
5
+ {
6
+ 'Content' => { text: Motion::Xray::TextEditor }
7
+ }
8
+ end
9
+ end
10
+
11
+ end
12
+
13
+
14
+ describe "Xray view extensions" do
15
+ before do
16
+ @view_a = UIView.alloc.init
17
+ @view_b = XrayViewSpec.alloc.init
18
+ end
19
+
20
+ it "should have xray properties" do
21
+ @view_a.xray.should != nil
22
+ end
23
+
24
+ it "should have xray properties that are a hash" do
25
+ Hash.should === @view_a.xray
26
+ end
27
+
28
+ it "should have xray properties that are {section: {property: Editor}}" do
29
+ first = @view_a.xray.first
30
+ String.should === first[0]
31
+ Hash.should === first[1]
32
+ first_editor = first[1].first
33
+ Symbol.should === first_editor[0]
34
+ Hash.should === first_editor[1]
35
+ end
36
+
37
+ it "should merge xray properties" do
38
+ @view_b.xray.length.should > @view_a.xray.length
39
+ @view_b.xray['Frame'].should == @view_a.xray['Frame']
40
+ @view_b.xray['Content'].should == {text: Motion::Xray::TextEditor}
41
+ end
42
+
43
+ end
@@ -0,0 +1,11 @@
1
+
2
+ PODS:
3
+ - CocoaLumberjack (1.6)
4
+
5
+ DEPENDENCIES:
6
+ - CocoaLumberjack
7
+
8
+ SPEC CHECKSUMS:
9
+ CocoaLumberjack: 0f2fa7090a23f13261072d882e017c688300efbe
10
+
11
+ COCOAPODS: 0.16.2
metadata ADDED
@@ -0,0 +1,177 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: motion-xray
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.4
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Colin T.A. Gray
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-04-02 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: sugarcube
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: 0.20.1
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 0.20.1
30
+ - !ruby/object:Gem::Dependency
31
+ name: geomotion
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.10.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.10.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: rspec
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: ! 'The simulator and RubyMotion REPL make on-device testing a painful
63
+ cycle of
64
+
65
+ code, compile, check, repeat. *Especially* when it comes to testing the UI,
66
+
67
+ where inexplicable differences can crop up between a device and the simulator.
68
+
69
+
70
+ Motion-Xray is an in-app developer''s toolbox. Activate Xray (usually by shaking
71
+ the
72
+
73
+ phone) and a UI editor appears where you can add, modify, and remove views.
74
+
75
+
76
+ Why stop there! There''s a log panel, and an accessibility panel that gives you
77
+
78
+ a visiualization of how you app "looks" to the blind or color blind.
79
+
80
+
81
+ And you''re damn right it''s extensible! You can write new UI editors, register
82
+
83
+ custom views, and add new panels, for instance maybe you need a Bluetooth device
84
+
85
+ scanner, or a way to check API requests.
86
+
87
+
88
+ Enjoy!
89
+
90
+ '
91
+ email:
92
+ - colinta@gmail.com
93
+ executables: []
94
+ extensions: []
95
+ extra_rdoc_files: []
96
+ files:
97
+ - .gitignore
98
+ - Gemfile
99
+ - Gemfile.lock
100
+ - README.md
101
+ - Rakefile
102
+ - app/app_delegate.rb
103
+ - lib/motion-xray.rb
104
+ - lib/motion-xray/plugins/accessibility_plugin.rb
105
+ - lib/motion-xray/plugins/log_plugin.rb
106
+ - lib/motion-xray/plugins/save_ui_plugin.rb
107
+ - lib/motion-xray/plugins/ui_plugin.rb
108
+ - lib/motion-xray/version.rb
109
+ - lib/motion-xray/views/xray_color_swatch.rb
110
+ - lib/motion-xray/views/xray_dpad.rb
111
+ - lib/motion-xray/views/xray_gradient_view.rb
112
+ - lib/motion-xray/views/xray_headers.rb
113
+ - lib/motion-xray/views/xray_lock_button.rb
114
+ - lib/motion-xray/views/xray_scroll_view.rb
115
+ - lib/motion-xray/views/xray_toolbar.rb
116
+ - lib/motion-xray/views/xray_window.rb
117
+ - lib/motion-xray/xray.rb
118
+ - lib/motion-xray/xray_constants.rb
119
+ - lib/motion-xray/xray_dummy.rb
120
+ - lib/motion-xray/xray_editors.rb
121
+ - lib/motion-xray/xray_ext.rb
122
+ - lib/motion-xray/xray_plugin.rb
123
+ - lib/motion-xray/xray_typewriter.rb
124
+ - lib/motion-xray/xray_ui.rb
125
+ - lib/motion-xray/z_editors/xray_boolean_editor.rb
126
+ - lib/motion-xray/z_editors/xray_color_editor.rb
127
+ - lib/motion-xray/z_editors/xray_frame_editor.rb
128
+ - lib/motion-xray/z_editors/xray_image_editor.rb
129
+ - lib/motion-xray/z_editors/xray_text_editor.rb
130
+ - lib/resources/xray_button_bg@2x.png
131
+ - lib/resources/xray_choose_button@2x.png
132
+ - lib/resources/xray_clear_button@2x.png
133
+ - lib/resources/xray_detail_button@2x.png
134
+ - lib/resources/xray_dpad@2x.png
135
+ - lib/resources/xray_dpad_center@2x.png
136
+ - lib/resources/xray_dpad_down@2x.png
137
+ - lib/resources/xray_dpad_left@2x.png
138
+ - lib/resources/xray_dpad_right@2x.png
139
+ - lib/resources/xray_dpad_up@2x.png
140
+ - lib/resources/xray_drawer_left@2x.png
141
+ - lib/resources/xray_drawer_right@2x.png
142
+ - lib/resources/xray_edit_button@2x.png
143
+ - lib/resources/xray_email_button@2x.png
144
+ - lib/resources/xray_lock_button_horizontal@2x.png
145
+ - lib/resources/xray_lock_button_locked@2x.png
146
+ - lib/resources/xray_lock_button_unlocked@2x.png
147
+ - lib/resources/xray_lock_button_vertical@2x.png
148
+ - motion-xray.gemspec
149
+ - resources/Default-568h@2x.png
150
+ - spec/xray_view_spec.rb
151
+ - vendor/Podfile.lock
152
+ homepage: https://github.com/colinta/motion-xray
153
+ licenses: []
154
+ post_install_message:
155
+ rdoc_options: []
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ! '>='
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ none: false
166
+ requirements:
167
+ - - ! '>='
168
+ - !ruby/object:Gem::Version
169
+ version: '0'
170
+ requirements: []
171
+ rubyforge_project:
172
+ rubygems_version: 1.8.25
173
+ signing_key:
174
+ specification_version: 3
175
+ summary: An in-app UI editing system for iOS
176
+ test_files:
177
+ - spec/xray_view_spec.rb