calabash_drishyam 0.1.0

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.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +4 -0
  5. data/CODE_OF_CONDUCT.md +13 -0
  6. data/Gemfile +4 -0
  7. data/LICENSE +21 -0
  8. data/README.md +41 -0
  9. data/Rakefile +6 -0
  10. data/bin/.DS_Store +0 -0
  11. data/bin/calabash_drishyam +29 -0
  12. data/calabash_drishyam.gemspec +35 -0
  13. data/calabash_drishyam.output +1113 -0
  14. data/lib/.DS_Store +0 -0
  15. data/lib/calabash_drishyam.rb +43 -0
  16. data/lib/calabash_drishyam/.DS_Store +0 -0
  17. data/lib/calabash_drishyam/assets/bg.gif +0 -0
  18. data/lib/calabash_drishyam/assets/bullet.gif +0 -0
  19. data/lib/calabash_drishyam/assets/calabash_inspector.js +22 -0
  20. data/lib/calabash_drishyam/assets/calabash_symbiote_screenshot_92.png +0 -0
  21. data/lib/calabash_drishyam/assets/footerbg.gif +0 -0
  22. data/lib/calabash_drishyam/assets/headerbg.gif +0 -0
  23. data/lib/calabash_drishyam/assets/query.json +1 -0
  24. data/lib/calabash_drishyam/assets/spy.jpg +0 -0
  25. data/lib/calabash_drishyam/assets/style.css +338 -0
  26. data/lib/calabash_drishyam/assets/tableft.gif +0 -0
  27. data/lib/calabash_drishyam/assets/tabright.gif +0 -0
  28. data/lib/calabash_drishyam/images/.DS_Store +0 -0
  29. data/lib/calabash_drishyam/images/.keep +0 -0
  30. data/lib/calabash_drishyam/images/Image_1.png +0 -0
  31. data/lib/calabash_drishyam/images/bg.gif +0 -0
  32. data/lib/calabash_drishyam/images/bullet.gif +0 -0
  33. data/lib/calabash_drishyam/images/footerbg.gif +0 -0
  34. data/lib/calabash_drishyam/images/headerbg.gif +0 -0
  35. data/lib/calabash_drishyam/images/query.json +1 -0
  36. data/lib/calabash_drishyam/images/spy.jpg +0 -0
  37. data/lib/calabash_drishyam/images/tableft.gif +0 -0
  38. data/lib/calabash_drishyam/images/tabright.gif +0 -0
  39. data/lib/calabash_drishyam/javascripts/.DS_Store +0 -0
  40. data/lib/calabash_drishyam/javascripts/application.js +16 -0
  41. data/lib/calabash_drishyam/javascripts/calabash_inspector.js +25 -0
  42. data/lib/calabash_drishyam/stylesheets/.DS_Store +0 -0
  43. data/lib/calabash_drishyam/stylesheets/style.css +122 -0
  44. data/lib/calabash_drishyam/stylesheets/style1.scss +345 -0
  45. data/lib/calabash_drishyam/version.rb +3 -0
  46. data/lib/calabash_drishyam/views/home.erb +97 -0
  47. data/lib/calabash_drishyam/views/layout.erb +28 -0
  48. metadata +219 -0
@@ -0,0 +1,3 @@
1
+ module CalabashDrishyam
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,97 @@
1
+ <%
2
+ public_folder_files_before_screenshot = Dir.entries(ASSETS_PATH)
3
+
4
+ public_folder_files_before_screenshot.each do |file_name|
5
+
6
+ if file_name.start_with?(CALABASH_SCREENSHOT_FILE_NAME)
7
+
8
+ delete_file_path = File.expand_path(file_name, ASSETS_PATH)
9
+ File.delete delete_file_path
10
+
11
+ end
12
+
13
+ end
14
+
15
+ screenshot_embed(:prefix => "#{ASSETS_PATH}", :name => "#{CALABASH_SCREENSHOT_FILE_NAME}")
16
+ image_path = ""
17
+
18
+ public_folder_files_after_screenshot = Dir.entries(ASSETS_PATH)
19
+
20
+ public_folder_files_after_screenshot.each do |file_name|
21
+
22
+ if file_name.start_with?(CALABASH_SCREENSHOT_FILE_NAME)
23
+
24
+ image_path = file_name
25
+ break
26
+
27
+ end
28
+
29
+ end
30
+
31
+ parsed_query_objects = query "*"
32
+
33
+ calabash_server_version_json = server_version
34
+ view_dimensions = calabash_server_version_json["screen_dimensions"]
35
+ view_scale = view_dimensions["scale"]
36
+ view_height = view_dimensions["height"]/view_scale
37
+ view_width = view_dimensions["width"]/view_scale
38
+
39
+ if landscape?
40
+
41
+ temp = view_height
42
+ view_height = view_width
43
+ view_width = temp
44
+
45
+ end
46
+
47
+ %>
48
+
49
+ <div id="wrap">
50
+
51
+ <div id="sidebar">
52
+
53
+ <h1>VIEW OBJECTS</h1>
54
+ <div class="left-box">
55
+ <ul class="sidemenu" style="height:<%= view_height %>px">
56
+
57
+ <%
58
+
59
+ parsed_query_objects.each do |sub_view|
60
+
61
+ id = sub_view["id"]
62
+ class_name = sub_view["class"]
63
+ #class_name = class_name.gsub('\','\\') unless class_name.nil?
64
+ label_name = sub_view["label"]
65
+ #label_name = label_name.gsub('\','//') unless label_name.nil?
66
+ text_name = sub_view["text"]
67
+ #text_name = text_name.gsub('/','//') unless text_name.nil?
68
+ rect = sub_view["rect"]
69
+ height = rect["height"]
70
+ x = rect["x"]
71
+ y = rect["y"]
72
+ width = rect["width"]
73
+
74
+ %>
75
+
76
+ <li><a onmouseover="highlightViewInScreenShot('<%= image_path %>',<%= x %>,<%= y %>,<%= width %>,<%= height %>)"><span class="red">Class:</span> <%= class_name %><br/><span class="red">Id:</span> <%= id %><br/><span class="red">Label:</span> <pre><%= label_name %></pre><br/><span class="red">Text:</span> <pre><%= text_name %></pre></a></li>
77
+
78
+ <% end %>
79
+
80
+ </ul>
81
+ </div>
82
+
83
+ </div>
84
+
85
+
86
+ <div id="main">
87
+
88
+ <h1>VIEW OBJECTS INSPECTOR</h1>
89
+ <div id="canvascontainer">
90
+
91
+ <canvas id="canvas" width="<%= view_width %>" height="<%= view_height %>"> Canvas Not Supported.</canvas>
92
+
93
+ </div>
94
+
95
+ </div>
96
+
97
+ </div>
@@ -0,0 +1,28 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf8">
5
+ <title>Calabash Drishyam</title>
6
+ <link href="style.css" rel="stylesheet" type="text/css" />
7
+ <script src="calabash_inspector.js"></script>
8
+ </head>
9
+ <body>
10
+
11
+ <div id="header">
12
+
13
+ <div id="logo"><span class="white">Calabash</span><span class="red">Drishyam</span></div>
14
+ </div>
15
+
16
+ <%= yield %>
17
+
18
+ <!-- footer starts here -->
19
+ <div class="footer">
20
+ <p>
21
+ Version 0.1.0.
22
+
23
+ </p>
24
+ </div>
25
+
26
+ </body>
27
+ </html>
28
+
metadata ADDED
@@ -0,0 +1,219 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: calabash_drishyam
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Mohan Kumar Selvaraj
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-02-02 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sinatra
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.4'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sinatra-contrib
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.4'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: daemons
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.2'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: calabash-cucumber
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.16'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.16'
69
+ - !ruby/object:Gem::Dependency
70
+ name: htmlentities
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '4.3'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '4.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: json_spec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '1.1'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '1.1'
97
+ - !ruby/object:Gem::Dependency
98
+ name: bundler
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '1.10'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '1.10'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rake
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '10.0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '10.0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: This gem is useful for inspecting the objects generated by Calabash)
140
+ in the view port of mobile applications in iOS platform.
141
+ email:
142
+ - yamkayselvaraj@gmail.com
143
+ executables:
144
+ - calabash_drishyam
145
+ extensions: []
146
+ extra_rdoc_files: []
147
+ files:
148
+ - ".gitignore"
149
+ - ".rspec"
150
+ - ".travis.yml"
151
+ - CODE_OF_CONDUCT.md
152
+ - Gemfile
153
+ - LICENSE
154
+ - README.md
155
+ - Rakefile
156
+ - bin/.DS_Store
157
+ - bin/calabash_drishyam
158
+ - calabash_drishyam.gemspec
159
+ - calabash_drishyam.output
160
+ - lib/.DS_Store
161
+ - lib/calabash_drishyam.rb
162
+ - lib/calabash_drishyam/.DS_Store
163
+ - lib/calabash_drishyam/assets/bg.gif
164
+ - lib/calabash_drishyam/assets/bullet.gif
165
+ - lib/calabash_drishyam/assets/calabash_inspector.js
166
+ - lib/calabash_drishyam/assets/calabash_symbiote_screenshot_92.png
167
+ - lib/calabash_drishyam/assets/footerbg.gif
168
+ - lib/calabash_drishyam/assets/headerbg.gif
169
+ - lib/calabash_drishyam/assets/query.json
170
+ - lib/calabash_drishyam/assets/spy.jpg
171
+ - lib/calabash_drishyam/assets/style.css
172
+ - lib/calabash_drishyam/assets/tableft.gif
173
+ - lib/calabash_drishyam/assets/tabright.gif
174
+ - lib/calabash_drishyam/images/.DS_Store
175
+ - lib/calabash_drishyam/images/.keep
176
+ - lib/calabash_drishyam/images/Image_1.png
177
+ - lib/calabash_drishyam/images/bg.gif
178
+ - lib/calabash_drishyam/images/bullet.gif
179
+ - lib/calabash_drishyam/images/footerbg.gif
180
+ - lib/calabash_drishyam/images/headerbg.gif
181
+ - lib/calabash_drishyam/images/query.json
182
+ - lib/calabash_drishyam/images/spy.jpg
183
+ - lib/calabash_drishyam/images/tableft.gif
184
+ - lib/calabash_drishyam/images/tabright.gif
185
+ - lib/calabash_drishyam/javascripts/.DS_Store
186
+ - lib/calabash_drishyam/javascripts/application.js
187
+ - lib/calabash_drishyam/javascripts/calabash_inspector.js
188
+ - lib/calabash_drishyam/stylesheets/.DS_Store
189
+ - lib/calabash_drishyam/stylesheets/style.css
190
+ - lib/calabash_drishyam/stylesheets/style1.scss
191
+ - lib/calabash_drishyam/version.rb
192
+ - lib/calabash_drishyam/views/home.erb
193
+ - lib/calabash_drishyam/views/layout.erb
194
+ homepage: https://github.com/yamkay/calabash_drishyam
195
+ licenses:
196
+ - MIT
197
+ metadata: {}
198
+ post_install_message:
199
+ rdoc_options: []
200
+ require_paths:
201
+ - lib
202
+ required_ruby_version: !ruby/object:Gem::Requirement
203
+ requirements:
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
207
+ required_rubygems_version: !ruby/object:Gem::Requirement
208
+ requirements:
209
+ - - ">="
210
+ - !ruby/object:Gem::Version
211
+ version: '0'
212
+ requirements: []
213
+ rubyforge_project:
214
+ rubygems_version: 2.4.5
215
+ signing_key:
216
+ specification_version: 4
217
+ summary: "'Drishyam' means 'Scene' in Indian languages. This tool is a simple view
218
+ objects inspector for the popular mobile UI automation tool 'Calabash'."
219
+ test_files: []