kracker 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +21 -0
  3. data/.ruby-version +1 -0
  4. data/.travis.yml +14 -0
  5. data/Gemfile +16 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +33 -0
  8. data/Rakefile +23 -0
  9. data/app/assets/javascripts/application.js +1 -0
  10. data/app/assets/stylesheets/1236_grid.css +21 -0
  11. data/app/assets/stylesheets/720_grid.css +33 -0
  12. data/app/assets/stylesheets/986_grid.css +24 -0
  13. data/app/assets/stylesheets/kracker.css +134 -0
  14. data/app/assets/stylesheets/normalize.css +425 -0
  15. data/app/controllers/kracker_application_controller.rb +8 -0
  16. data/app/controllers/kracker_controller.rb +114 -0
  17. data/app/views/kracker/about.html.erb +3 -0
  18. data/app/views/kracker/artifacts.html.erb +16 -0
  19. data/app/views/kracker/index.html.erb +12 -0
  20. data/app/views/kracker/new.html.erb +15 -0
  21. data/app/views/kracker/path_config.html.erb +8 -0
  22. data/app/views/kracker/show.html.erb +42 -0
  23. data/app/views/layouts/kracker.html.erb +32 -0
  24. data/app/views/shared/_dom_set.html.erb +35 -0
  25. data/app/views/shared/_kracker_nav.html.erb +8 -0
  26. data/config/routes.rb +17 -0
  27. data/kracker.gemspec +27 -0
  28. data/lib/kracker/analysis.rb +114 -0
  29. data/lib/kracker/element.rb +92 -0
  30. data/lib/kracker/kracker.rb +112 -0
  31. data/lib/kracker/locations.rb +49 -0
  32. data/lib/kracker/rails/engine.rb +7 -0
  33. data/lib/kracker/svg.rb +71 -0
  34. data/lib/kracker/version.rb +3 -0
  35. data/lib/kracker.rb +7 -0
  36. data/test/page_objects/kracker/about_page.rb +7 -0
  37. data/test/page_objects/kracker/artifacts_page.rb +7 -0
  38. data/test/page_objects/kracker/config_page.rb +19 -0
  39. data/test/page_objects/kracker/index_page.rb +9 -0
  40. data/test/page_objects/kracker/local_index_page.rb +7 -0
  41. data/test/page_objects/kracker/new_page.rb +7 -0
  42. data/test/page_objects/kracker/show_page.rb +15 -0
  43. data/test/page_objects/kracker/viewer_page.rb +15 -0
  44. data/test/page_objects/navigation.rb +34 -0
  45. data/test/page_objects.rb +13 -0
  46. data/test/selenium/mapping_test.rb +98 -0
  47. data/test/selenium/viewer_test.rb +25 -0
  48. data/test/selenium_test_helper.rb +102 -0
  49. data/test/test_app/Gemfile +10 -0
  50. data/test/test_app/app/assets/stylesheets/local_app.css +25 -0
  51. data/test/test_app/app/controllers/application_controller.rb +2 -0
  52. data/test/test_app/app/controllers/local_controller.rb +8 -0
  53. data/test/test_app/app/views/layouts/local.html.erb +14 -0
  54. data/test/test_app/app/views/local/index.html.erb +45 -0
  55. data/test/test_app/config/database.yml +13 -0
  56. data/test/test_app/config/initializers/kracker_initializer.rb +5 -0
  57. data/test/test_app/config/routes.rb +4 -0
  58. data/test/test_app/config.ru +31 -0
  59. data/test/test_app/test_app.rb +30 -0
  60. data/test/test_helper.rb +41 -0
  61. data/test/test_helpers/kracker_class_for_stubbing.rb +3 -0
  62. data/test/test_helpers/location_helpers.rb +29 -0
  63. data/test/test_objects/test_objects.rb +30 -0
  64. data/test/unit/analysis_test.rb +87 -0
  65. data/test/unit/element_test.rb +47 -0
  66. data/test/unit/kracker_test.rb +79 -0
  67. data/test/unit/location_test.rb +23 -0
  68. data/watchr_script.rb +3 -0
  69. metadata +199 -0
@@ -0,0 +1,425 @@
1
+ /*! normalize.css v3.0.0 | MIT License | git.io/normalize */
2
+
3
+ /**
4
+ * 1. Set default font family to sans-serif.
5
+ * 2. Prevent iOS text size adjust after orientation change, without disabling
6
+ * user zoom.
7
+ */
8
+
9
+ html {
10
+ font-family: sans-serif; /* 1 */
11
+ -ms-text-size-adjust: 100%; /* 2 */
12
+ -webkit-text-size-adjust: 100%; /* 2 */
13
+ }
14
+
15
+ /**
16
+ * Remove default margin.
17
+ */
18
+
19
+ body {
20
+ margin: 0;
21
+ }
22
+
23
+ /* HTML5 display definitions
24
+ ========================================================================== */
25
+
26
+ /**
27
+ * Correct `block` display not defined for any HTML5 element in IE 8/9.
28
+ * Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
29
+ * Correct `block` display not defined for `main` in IE 11.
30
+ */
31
+
32
+ article,
33
+ aside,
34
+ details,
35
+ figcaption,
36
+ figure,
37
+ footer,
38
+ header,
39
+ hgroup,
40
+ main,
41
+ nav,
42
+ section,
43
+ summary {
44
+ display: block;
45
+ }
46
+
47
+ /**
48
+ * 1. Correct `inline-block` display not defined in IE 8/9.
49
+ * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
50
+ */
51
+
52
+ audio,
53
+ canvas,
54
+ progress,
55
+ video {
56
+ display: inline-block; /* 1 */
57
+ vertical-align: baseline; /* 2 */
58
+ }
59
+
60
+ /**
61
+ * Prevent modern browsers from displaying `audio` without controls.
62
+ * Remove excess height in iOS 5 devices.
63
+ */
64
+
65
+ audio:not([controls]) {
66
+ display: none;
67
+ height: 0;
68
+ }
69
+
70
+ /**
71
+ * Address `[hidden]` styling not present in IE 8/9/10.
72
+ * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22.
73
+ */
74
+
75
+ [hidden],
76
+ template {
77
+ display: none;
78
+ }
79
+
80
+ /* Links
81
+ ========================================================================== */
82
+
83
+ /**
84
+ * Remove the gray background color from active links in IE 10.
85
+ */
86
+
87
+ a {
88
+ background: transparent;
89
+ }
90
+
91
+ /**
92
+ * Improve readability when focused and also mouse hovered in all browsers.
93
+ */
94
+
95
+ a:active,
96
+ a:hover {
97
+ outline: 0;
98
+ }
99
+
100
+ /* Text-level semantics
101
+ ========================================================================== */
102
+
103
+ /**
104
+ * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
105
+ */
106
+
107
+ abbr[title] {
108
+ border-bottom: 1px dotted;
109
+ }
110
+
111
+ /**
112
+ * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
113
+ */
114
+
115
+ b,
116
+ strong {
117
+ font-weight: bold;
118
+ }
119
+
120
+ /**
121
+ * Address styling not present in Safari and Chrome.
122
+ */
123
+
124
+ dfn {
125
+ font-style: italic;
126
+ }
127
+
128
+ /**
129
+ * Address variable `h1` font-size and margin within `section` and `article`
130
+ * contexts in Firefox 4+, Safari, and Chrome.
131
+ */
132
+
133
+ h1 {
134
+ font-size: 2em;
135
+ margin: 0.67em 0;
136
+ }
137
+
138
+ /**
139
+ * Address styling not present in IE 8/9.
140
+ */
141
+
142
+ mark {
143
+ background: #ff0;
144
+ color: #000;
145
+ }
146
+
147
+ /**
148
+ * Address inconsistent and variable font size in all browsers.
149
+ */
150
+
151
+ small {
152
+ font-size: 80%;
153
+ }
154
+
155
+ /**
156
+ * Prevent `sub` and `sup` affecting `line-height` in all browsers.
157
+ */
158
+
159
+ sub,
160
+ sup {
161
+ font-size: 75%;
162
+ line-height: 0;
163
+ position: relative;
164
+ vertical-align: baseline;
165
+ }
166
+
167
+ sup {
168
+ top: -0.5em;
169
+ }
170
+
171
+ sub {
172
+ bottom: -0.25em;
173
+ }
174
+
175
+ /* Embedded content
176
+ ========================================================================== */
177
+
178
+ /**
179
+ * Remove border when inside `a` element in IE 8/9/10.
180
+ */
181
+
182
+ img {
183
+ border: 0;
184
+ }
185
+
186
+ /**
187
+ * Correct overflow not hidden in IE 9/10/11.
188
+ */
189
+
190
+ svg:not(:root) {
191
+ overflow: hidden;
192
+ }
193
+
194
+ /* Grouping content
195
+ ========================================================================== */
196
+
197
+ /**
198
+ * Address margin not present in IE 8/9 and Safari.
199
+ */
200
+
201
+ figure {
202
+ margin: 1em 40px;
203
+ }
204
+
205
+ /**
206
+ * Address differences between Firefox and other browsers.
207
+ */
208
+
209
+ hr {
210
+ -moz-box-sizing: content-box;
211
+ box-sizing: content-box;
212
+ height: 0;
213
+ }
214
+
215
+ /**
216
+ * Contain overflow in all browsers.
217
+ */
218
+
219
+ pre {
220
+ overflow: auto;
221
+ }
222
+
223
+ /**
224
+ * Address odd `em`-unit font size rendering in all browsers.
225
+ */
226
+
227
+ code,
228
+ kbd,
229
+ pre,
230
+ samp {
231
+ font-family: monospace, monospace;
232
+ font-size: 1em;
233
+ }
234
+
235
+ /* Forms
236
+ ========================================================================== */
237
+
238
+ /**
239
+ * Known limitation: by default, Chrome and Safari on OS X allow very limited
240
+ * styling of `select`, unless a `border` property is set.
241
+ */
242
+
243
+ /**
244
+ * 1. Correct color not being inherited.
245
+ * Known issue: affects color of disabled elements.
246
+ * 2. Correct font properties not being inherited.
247
+ * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
248
+ */
249
+
250
+ button,
251
+ input,
252
+ optgroup,
253
+ select,
254
+ textarea {
255
+ color: inherit; /* 1 */
256
+ font: inherit; /* 2 */
257
+ margin: 0; /* 3 */
258
+ }
259
+
260
+ /**
261
+ * Address `overflow` set to `hidden` in IE 8/9/10/11.
262
+ */
263
+
264
+ button {
265
+ overflow: visible;
266
+ }
267
+
268
+ /**
269
+ * Address inconsistent `text-transform` inheritance for `button` and `select`.
270
+ * All other form control elements do not inherit `text-transform` values.
271
+ * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
272
+ * Correct `select` style inheritance in Firefox.
273
+ */
274
+
275
+ button,
276
+ select {
277
+ text-transform: none;
278
+ }
279
+
280
+ /**
281
+ * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
282
+ * and `video` controls.
283
+ * 2. Correct inability to style clickable `input` types in iOS.
284
+ * 3. Improve usability and consistency of cursor style between image-type
285
+ * `input` and others.
286
+ */
287
+
288
+ button,
289
+ html input[type="button"], /* 1 */
290
+ input[type="reset"],
291
+ input[type="submit"] {
292
+ -webkit-appearance: button; /* 2 */
293
+ cursor: pointer; /* 3 */
294
+ }
295
+
296
+ /**
297
+ * Re-set default cursor for disabled elements.
298
+ */
299
+
300
+ button[disabled],
301
+ html input[disabled] {
302
+ cursor: default;
303
+ }
304
+
305
+ /**
306
+ * Remove inner padding and border in Firefox 4+.
307
+ */
308
+
309
+ button::-moz-focus-inner,
310
+ input::-moz-focus-inner {
311
+ border: 0;
312
+ padding: 0;
313
+ }
314
+
315
+ /**
316
+ * Address Firefox 4+ setting `line-height` on `input` using `!important` in
317
+ * the UA stylesheet.
318
+ */
319
+
320
+ input {
321
+ line-height: normal;
322
+ }
323
+
324
+ /**
325
+ * It's recommended that you don't attempt to style these elements.
326
+ * Firefox's implementation doesn't respect box-sizing, padding, or width.
327
+ *
328
+ * 1. Address box sizing set to `content-box` in IE 8/9/10.
329
+ * 2. Remove excess padding in IE 8/9/10.
330
+ */
331
+
332
+ input[type="checkbox"],
333
+ input[type="radio"] {
334
+ box-sizing: border-box; /* 1 */
335
+ padding: 0; /* 2 */
336
+ }
337
+
338
+ /**
339
+ * Fix the cursor style for Chrome's increment/decrement buttons. For certain
340
+ * `font-size` values of the `input`, it causes the cursor style of the
341
+ * decrement button to change from `default` to `text`.
342
+ */
343
+
344
+ input[type="number"]::-webkit-inner-spin-button,
345
+ input[type="number"]::-webkit-outer-spin-button {
346
+ height: auto;
347
+ }
348
+
349
+ /**
350
+ * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
351
+ * 2. Address `box-sizing` set to `border-box` in Safari and Chrome
352
+ * (include `-moz` to future-proof).
353
+ */
354
+
355
+ input[type="search"] {
356
+ -webkit-appearance: textfield; /* 1 */
357
+ -moz-box-sizing: content-box;
358
+ -webkit-box-sizing: content-box; /* 2 */
359
+ box-sizing: content-box;
360
+ }
361
+
362
+ /**
363
+ * Remove inner padding and search cancel button in Safari and Chrome on OS X.
364
+ * Safari (but not Chrome) clips the cancel button when the search input has
365
+ * padding (and `textfield` appearance).
366
+ */
367
+
368
+ input[type="search"]::-webkit-search-cancel-button,
369
+ input[type="search"]::-webkit-search-decoration {
370
+ -webkit-appearance: none;
371
+ }
372
+
373
+ /**
374
+ * Define consistent border, margin, and padding.
375
+ */
376
+
377
+ fieldset {
378
+ border: 1px solid #c0c0c0;
379
+ margin: 0 2px;
380
+ padding: 0.35em 0.625em 0.75em;
381
+ }
382
+
383
+ /**
384
+ * 1. Correct `color` not being inherited in IE 8/9/10/11.
385
+ * 2. Remove padding so people aren't caught out if they zero out fieldsets.
386
+ */
387
+
388
+ legend {
389
+ border: 0; /* 1 */
390
+ padding: 0; /* 2 */
391
+ }
392
+
393
+ /**
394
+ * Remove default vertical scrollbar in IE 8/9/10/11.
395
+ */
396
+
397
+ textarea {
398
+ overflow: auto;
399
+ }
400
+
401
+ /**
402
+ * Don't inherit the `font-weight` (applied by a rule above).
403
+ * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
404
+ */
405
+
406
+ optgroup {
407
+ font-weight: bold;
408
+ }
409
+
410
+ /* Tables
411
+ ========================================================================== */
412
+
413
+ /**
414
+ * Remove most spacing between table cells.
415
+ */
416
+
417
+ table {
418
+ border-collapse: collapse;
419
+ border-spacing: 0;
420
+ }
421
+
422
+ td,
423
+ th {
424
+ padding: 0;
425
+ }
@@ -0,0 +1,8 @@
1
+ class KrackerApplicationController < ApplicationController
2
+ before_filter :get_gem_version
3
+
4
+ def get_gem_version
5
+ @kracker_gem_version = Gem.loaded_specs['kracker'].version.to_s
6
+ @parent_application_name = Rails.application.class.to_s.split('::').first
7
+ end
8
+ end
@@ -0,0 +1,114 @@
1
+ class KrackerController < KrackerApplicationController
2
+ layout 'kracker'
3
+
4
+ require 'kramdown'
5
+
6
+ def index
7
+ @files = if Kracker.diff_file_location
8
+ Dir[File.join(Kracker.diff_file_location, "*_diff.html")].map{|f| File.basename(f)}
9
+ else
10
+ []
11
+ end
12
+ end
13
+
14
+ def show
15
+ @test_root = params[:diff_file].gsub('_diff', '').gsub('.html', '')
16
+
17
+ @file_diff = "#{@test_root}_diff.html"
18
+ @file_set_not_master = "#{@test_root}__current_not_master__diff.yaml"
19
+ @file_set_not_current = "#{@test_root}__master_not_current__diff.yaml"
20
+ @file_set_changed = "#{@test_root}__changed_master__diff.yaml"
21
+
22
+ @file_diff = "#{@test_root}_diff.html"
23
+ end
24
+
25
+ def path_config
26
+ end
27
+
28
+ def new
29
+ @files_current = Dir[File.join(Kracker.current_file_location, '*.yaml')].map { |f| File.basename(f).gsub('.yaml', '') }
30
+ @files_master = Dir[File.join(Kracker.master_file_location, '*.yaml')].map { |f| File.basename(f).gsub('.yaml', '') }
31
+
32
+ @extra_files = @files_current.select { |f| !@files_master.include?("#{f}_master")}.sort
33
+ end
34
+
35
+ def make_master
36
+ test_root = params[:file]
37
+ src = Kracker.current_filename(test_root)
38
+ dst = Kracker.master_filename(test_root)
39
+ FileUtils.cp src, dst
40
+
41
+ redirect_to '/kracker/new'
42
+ end
43
+
44
+ def delete_current
45
+ test_root = params[:file]
46
+ src = Kracker.current_filename(test_root)
47
+ FileUtils.rm_rf src
48
+
49
+ redirect_to '/kracker/new'
50
+ end
51
+
52
+ def artifacts
53
+ artifacts_location = File.expand_path(File.join('~', 'Downloads', '*_artifacts.zip'))
54
+ @artifacts = Dir.glob(artifacts_location).map { |f| File.basename(f) }
55
+ end
56
+
57
+ def artifacts_delete
58
+ artifacts = params[:file].gsub('^', '.')
59
+ FileUtils.rm_rf File.expand_path(File.join('~', 'Downloads', artifacts))
60
+ redirect_to '/kracker/artifacts'
61
+ end
62
+
63
+ def artifacts_expand
64
+ artifacts = params[:file].gsub('^', '.')
65
+ artifacts = File.expand_path(File.join('~', 'Downloads', artifacts))
66
+
67
+ Zip::ZipFile.open(artifacts) do |zip_file|
68
+ zip_file.each do |entry|
69
+ file_destination = generate_unzip_destination(entry.name)
70
+ File.open(file_destination, 'wb') { |file| file.write(zip_file.read(entry)) } if file_destination
71
+ end
72
+ end
73
+
74
+ redirect_to kracker_path
75
+ end
76
+
77
+ def about
78
+ about_file = File.expand_path('../../../README.md', __FILE__)
79
+ raw = File.read(about_file)
80
+ @about = Kramdown::Document.new(raw).to_html
81
+ end
82
+
83
+ def clear
84
+ Dir[File.join(Kracker.diff_file_location, '*.yaml'), File.join(Kracker.diff_file_location, '*.html')].each { |f| FileUtils.rm_rf(f) }
85
+ Dir[File.join(Kracker.current_file_location, '*.yaml')].each { |f| FileUtils.rm_rf(f) }
86
+ redirect_to kracker_path
87
+ end
88
+
89
+ def bless
90
+ blessings = []
91
+ params.each_pair { |k, v| blessings << v if k.start_with?('option_') }
92
+
93
+ blessings.each do |blessing|
94
+ base_test_name = blessing
95
+
96
+ src_yaml = Kracker.current_filename(base_test_name)
97
+ dst_yaml = Kracker.master_filename(base_test_name)
98
+
99
+ FileUtils.cp src_yaml, dst_yaml if File.exist?(src_yaml)
100
+
101
+ if params['delete_on_bless'] == 'true'
102
+ files_to_remove = [Kracker.diff_filename(base_test_name)]
103
+ files_to_remove << File.join(Kracker.diff_file_location, blessing + '__current_not_master__diff.yaml')
104
+ files_to_remove << File.join(Kracker.diff_file_location, blessing + '__master_not_current__diff.yaml')
105
+ files_to_remove << File.join(Kracker.diff_file_location, blessing + '__changed_master__diff.yaml')
106
+
107
+ files_to_remove.each { |f| FileUtils.rm_rf f }
108
+ end
109
+ end
110
+
111
+ redirect_to kracker_path
112
+ end
113
+
114
+ end
@@ -0,0 +1,3 @@
1
+ <div class="row kr--about">
2
+ <%= @about.html_safe %>
3
+ </div>
@@ -0,0 +1,16 @@
1
+ <div class="row">
2
+ <h1>TeamCity Artifacts</h1>
3
+ <p>assume downloads from TeamCity will end up in ~/Downloads</p>
4
+
5
+ <p><strong>** Can't unzip yet. **</strong></p>
6
+ <table class='kr kr--artifacts'>
7
+ <% @artifacts.each do |artifact| %>
8
+ <tr>
9
+ <% a = artifact.gsub('.', '^') %>
10
+ <th><%= artifact %></th>
11
+ <td>unzip</td>
12
+ <td><%= link_to 'delete', "artifacts_delete/#{a}", :class => 'kr' %></td>
13
+ </tr>
14
+ <% end -%>
15
+ </table>
16
+ </div>
@@ -0,0 +1,12 @@
1
+ <h2>difference files</h2>
2
+ <% if @files.length > 0 %>
3
+ <p>file location: <%= Kracker.diff_file_location %></p>
4
+ <% else %>
5
+ <p>There were no differences files found.</p>
6
+ <% end %>
7
+
8
+ <ul id="kr--files" class="kr--ul">
9
+ <% @files.each do |file| %>
10
+ <li class="kr--file"><%= link_to file, "/kracker/show/#{file}", :class => 'kr' %></li>
11
+ <% end %>
12
+ </ul>
@@ -0,0 +1,15 @@
1
+ <div class="row">
2
+ <p>Files in the Screenshot directory that do not have a corresponding master file in the expected file location. Probably means that they go with a new test.</p>
3
+ </div>
4
+
5
+ <div class="row">
6
+ <table class='kr kr--artifacts'>
7
+ <% @extra_files.each do |f| %>
8
+ <tr>
9
+ <td><%= f %></td>
10
+ <td><%= link_to 'make master', "make_master/#{f}", :class => 'kr' %></td>
11
+ <td><%= link_to 'delete', "delete_current/#{f}", :class => 'kr' %></td>
12
+ </tr>
13
+ <% end %>
14
+ </table>
15
+ </div>
@@ -0,0 +1,8 @@
1
+ <h2>Path Configuration</h2>
2
+ <table class="kr">
3
+ <tbody>
4
+ <tr><th>master</th><td id="js-config_master"><%= Kracker.master_file_location %></td></tr>
5
+ <tr><th>current</th><td id="js-config_current"><%= Kracker.current_file_location %></td></tr>
6
+ <tr><th>diff</th><td id="js-config_diffs"><%= Kracker.diff_file_location %></td></tr>
7
+ </tbody>
8
+ </table>
@@ -0,0 +1,42 @@
1
+ <form name="bessing" action="/kracker/bless" method="POST">
2
+ <p><input type="checkbox" name="delete_on_bless" value='true' checked>Remove difference files on blessing</p>
3
+ <input type="submit" value="Bless these differences">
4
+ <input type="hidden" name="option_1" value="<%= @test_root %>" />
5
+ </form>
6
+
7
+ <table class="kr--dom_review_table">
8
+ <tr>
9
+ <td>
10
+ <% contents = File.read(File.join(Kracker.diff_file_location, "#{@file_diff}")) %>
11
+ <%= raw(contents) %>
12
+ </td>
13
+ <td>
14
+ <h2>in current dom, not master</h2>
15
+ <% elements = YAML::load_file(File.join(Kracker.diff_file_location, @file_set_not_master)) %>
16
+ <%= render :partial => "shared/dom_set", :locals => {:elements => elements, :finder_id => 'js--not_master'} %>
17
+
18
+ <h2>in master dom, not current</h2>
19
+ <% elements = YAML::load_file(File.join(Kracker.diff_file_location, @file_set_not_current)) %>
20
+ <%= render :partial => "shared/dom_set", :locals => {:elements => elements, :finder_id => 'js--not_current'} %>
21
+
22
+ <h2>changed</h2>
23
+ <% elements = YAML::load_file(File.join(Kracker.diff_file_location, @file_set_changed)) %>
24
+ <%= render :partial => "shared/dom_set", :locals => {:elements => elements, :finder_id => 'js--changed'} %>
25
+
26
+ </td>
27
+ </tr>
28
+ </table>
29
+
30
+ <script type="text/javascript">
31
+ highlightElement = function(element_id) {
32
+ var elements = document.getElementsByTagName('rect');
33
+ var element = null;
34
+ var length = elements.length;
35
+
36
+ for (var i = 0; i < length; i++) {
37
+ elements[i].setAttribute("stroke-width", "1");
38
+ }
39
+ var this_element = document.getElementById(element_id);
40
+ this_element.setAttribute("stroke-width", "5");
41
+ }
42
+ </script>
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Kracker</title>
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
6
+
7
+ <%= stylesheet_link_tag "noramlize.css", :media => "all" %>
8
+ <%= stylesheet_link_tag "720_grid.css", :media => "screen and (min-width: 720px)" %>
9
+ <%= stylesheet_link_tag "986_grid.css", :media => "screen and (min-width: 986px)" %>
10
+ <%= stylesheet_link_tag "1236_grid.css", :media => "screen and (min-width: 1236px)" %>
11
+
12
+ <%= stylesheet_link_tag "kracker", :media => "all" %>
13
+
14
+ <%= csrf_meta_tags %>
15
+ </head>
16
+ <body>
17
+ <div class="grid grid_top">
18
+ <div class="row">
19
+ <h1>Kracker</h1>
20
+ </div>
21
+ <div class="row">
22
+ <h2 class="caramel"><%= @parent_application_name %> {<span id="js-kr--gem_rev"><%= @kracker_gem_version %></span>}</h2>
23
+ </div>
24
+
25
+ <%= render :partial => 'shared/kracker_nav' %>
26
+
27
+ <div class="row">
28
+ <%= yield %>
29
+ </div>
30
+ </div>
31
+ </body>
32
+ </html>