frank-cucumber 0.9.6 → 0.9.7

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 (50) hide show
  1. data/frank-skeleton/frank_static_resources.bundle/index.html +29 -34
  2. data/frank-skeleton/frank_static_resources.bundle/{index.haml → index.html.haml} +28 -29
  3. data/frank-skeleton/frank_static_resources.bundle/js/accessible_views_view.coffee +41 -0
  4. data/frank-skeleton/frank_static_resources.bundle/js/accessible_views_view.js +46 -0
  5. data/frank-skeleton/frank_static_resources.bundle/js/controller.coffee +129 -0
  6. data/frank-skeleton/frank_static_resources.bundle/js/controller.js +142 -0
  7. data/frank-skeleton/frank_static_resources.bundle/js/details_view.coffee +42 -0
  8. data/frank-skeleton/frank_static_resources.bundle/js/details_view.js +51 -0
  9. data/frank-skeleton/frank_static_resources.bundle/js/dropdown_control.coffee +64 -0
  10. data/frank-skeleton/frank_static_resources.bundle/js/dropdown_control.js +73 -0
  11. data/frank-skeleton/frank_static_resources.bundle/js/ersatz_model.coffee +46 -0
  12. data/frank-skeleton/frank_static_resources.bundle/js/ersatz_model.js +59 -0
  13. data/frank-skeleton/frank_static_resources.bundle/js/ersatz_view.coffee +167 -0
  14. data/frank-skeleton/frank_static_resources.bundle/js/ersatz_view.js +198 -0
  15. data/frank-skeleton/frank_static_resources.bundle/js/experiment_bar_model.coffee +10 -0
  16. data/frank-skeleton/frank_static_resources.bundle/js/experiment_bar_model.js +17 -0
  17. data/frank-skeleton/frank_static_resources.bundle/js/experiment_bar_view.coffee +43 -0
  18. data/frank-skeleton/frank_static_resources.bundle/js/experiment_bar_view.js +60 -0
  19. data/frank-skeleton/frank_static_resources.bundle/js/frank.coffee +96 -0
  20. data/frank-skeleton/frank_static_resources.bundle/js/frank.js +118 -0
  21. data/frank-skeleton/frank_static_resources.bundle/js/lib/backbone.js +1431 -0
  22. data/frank-skeleton/frank_static_resources.bundle/{coffee-script.js → js/lib/coffee-script.js} +0 -0
  23. data/frank-skeleton/frank_static_resources.bundle/{jquery-ui.min.js → js/lib/jquery-ui.min.js} +0 -0
  24. data/frank-skeleton/frank_static_resources.bundle/{jquery.min.js → js/lib/jquery.min.js} +0 -0
  25. data/frank-skeleton/frank_static_resources.bundle/{jquery.treeview.js → js/lib/jquery.treeview.js} +0 -0
  26. data/frank-skeleton/frank_static_resources.bundle/{json2.js → js/lib/json2.js} +0 -0
  27. data/frank-skeleton/frank_static_resources.bundle/js/lib/raphael.js +5815 -0
  28. data/frank-skeleton/frank_static_resources.bundle/js/lib/require.js +2053 -0
  29. data/frank-skeleton/frank_static_resources.bundle/{underscore.js → js/lib/underscore.js} +466 -177
  30. data/frank-skeleton/frank_static_resources.bundle/js/main.coffee +27 -0
  31. data/frank-skeleton/frank_static_resources.bundle/js/main.js +29 -0
  32. data/frank-skeleton/frank_static_resources.bundle/js/tabs_controller.coffee +13 -0
  33. data/frank-skeleton/frank_static_resources.bundle/js/tabs_controller.js +22 -0
  34. data/frank-skeleton/frank_static_resources.bundle/js/toast_controller.coffee +15 -0
  35. data/frank-skeleton/frank_static_resources.bundle/js/toast_controller.js +28 -0
  36. data/frank-skeleton/frank_static_resources.bundle/js/transform_stack.coffee +59 -0
  37. data/frank-skeleton/frank_static_resources.bundle/js/transform_stack.js +78 -0
  38. data/frank-skeleton/frank_static_resources.bundle/js/tree_view.coffee +53 -0
  39. data/frank-skeleton/frank_static_resources.bundle/js/tree_view.js +64 -0
  40. data/frank-skeleton/frank_static_resources.bundle/js/view_heir_model.coffee +37 -0
  41. data/frank-skeleton/frank_static_resources.bundle/js/view_heir_model.js +48 -0
  42. data/frank-skeleton/frank_static_resources.bundle/js/view_model.coffee +39 -0
  43. data/frank-skeleton/frank_static_resources.bundle/js/view_model.js +62 -0
  44. data/frank-skeleton/frank_static_resources.bundle/symbiote.css +116 -84
  45. data/lib/frank-cucumber/frankifier.rb +20 -2
  46. data/lib/frank-cucumber/version.rb +1 -1
  47. metadata +70 -38
  48. data/frank-skeleton/frank_static_resources.bundle/raphael-min.js +0 -7
  49. data/frank-skeleton/frank_static_resources.bundle/symbiote.js +0 -585
  50. data/frank-skeleton/frank_static_resources.bundle/symbiote_ui.coffee +0 -39
@@ -0,0 +1,39 @@
1
+ define ["frank"], (frank)->
2
+
3
+ ViewModel = Backbone.Model.extend
4
+ defaults:
5
+ parent: undefined
6
+ depth: 0
7
+
8
+ initialize: (attributes)->
9
+ childDepth = attributes.depth + 1
10
+ childModels = for subview in attributes.subviews
11
+ new ViewModel( _.extend( subview, {parent:@,depth:childDepth} ) )
12
+
13
+ @set( children: childModels )
14
+
15
+ getDesc: ->
16
+ viewClass = @get('class')
17
+ if label = @get('accessibilityLabel')
18
+ "#{viewClass}: #{label}"
19
+ else
20
+ viewClass
21
+
22
+ getShelleySelector: ->
23
+ if @has('accessibilityLabel')
24
+ "view:'#{@get('class')}' marked:'#{@get('accessibilityLabel')}'"
25
+ else
26
+ false
27
+
28
+ getSnapshotUrl: ->
29
+ frank.snapshotUrlForViewWithUid(@get('uid'))
30
+
31
+ setActive: ->
32
+ @collection.each (viewModel)=>
33
+ viewModel.set( 'active', viewModel == @ )
34
+
35
+ unsetActive: ->
36
+ @set( 'active', false )
37
+
38
+
39
+ ViewModel
@@ -0,0 +1,62 @@
1
+ (function() {
2
+
3
+ define(["frank"], function(frank) {
4
+ var ViewModel;
5
+ ViewModel = Backbone.Model.extend({
6
+ defaults: {
7
+ parent: void 0,
8
+ depth: 0
9
+ },
10
+ initialize: function(attributes) {
11
+ var childDepth, childModels, subview;
12
+ childDepth = attributes.depth + 1;
13
+ childModels = (function() {
14
+ var _i, _len, _ref, _results;
15
+ _ref = attributes.subviews;
16
+ _results = [];
17
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
18
+ subview = _ref[_i];
19
+ _results.push(new ViewModel(_.extend(subview, {
20
+ parent: this,
21
+ depth: childDepth
22
+ })));
23
+ }
24
+ return _results;
25
+ }).call(this);
26
+ return this.set({
27
+ children: childModels
28
+ });
29
+ },
30
+ getDesc: function() {
31
+ var label, viewClass;
32
+ viewClass = this.get('class');
33
+ if (label = this.get('accessibilityLabel')) {
34
+ return "" + viewClass + ": " + label;
35
+ } else {
36
+ return viewClass;
37
+ }
38
+ },
39
+ getShelleySelector: function() {
40
+ if (this.has('accessibilityLabel')) {
41
+ return "view:'" + (this.get('class')) + "' marked:'" + (this.get('accessibilityLabel')) + "'";
42
+ } else {
43
+ return false;
44
+ }
45
+ },
46
+ getSnapshotUrl: function() {
47
+ return frank.snapshotUrlForViewWithUid(this.get('uid'));
48
+ },
49
+ setActive: function() {
50
+ var _this = this;
51
+ return this.collection.each(function(viewModel) {
52
+ return viewModel.set('active', viewModel === _this);
53
+ });
54
+ },
55
+ unsetActive: function() {
56
+ return this.set('active', false);
57
+ }
58
+ });
59
+ return ViewModel;
60
+ });
61
+
62
+ }).call(this);
@@ -11,8 +11,7 @@ html {
11
11
  }
12
12
 
13
13
  input, button {
14
- height: 30px;
15
- padding: 0 10px;
14
+ padding: 8px 2em 8px 0.5em;
16
15
  -webkit-border-radius: 3px;
17
16
  -moz-border-radius: 3px;
18
17
  border-radius: 3px;
@@ -46,6 +45,7 @@ button:active { background: #999; }
46
45
  position: relative;
47
46
  height: 40px;
48
47
  padding-left: 10px;
48
+ overflow: hidden;
49
49
  color: #fff;
50
50
  text-shadow: 0 -1px rgba(0,0,0, .4);
51
51
  background-image: -webkit-linear-gradient(top, rgba(102,102,102, 1), rgba(51,51,51, 1) );
@@ -64,8 +64,25 @@ button:active { background: #999; }
64
64
  float: left;
65
65
  }
66
66
 
67
- #header i {
68
- display: none;
67
+ .toast {
68
+ padding-left: 40px;
69
+ padding-top: 8px;
70
+ float: left;
71
+ height: 40px;
72
+ color: hotpink;
73
+ font-size: 1.1em;
74
+ font-style: italic;
75
+
76
+ -moz-transition:all 0.2s linear;
77
+ -webkit-transition:all 0.2s linear;
78
+ -o-transition:all 0.2s linear;
79
+ }
80
+
81
+ .toast {
82
+ padding-top: 40px;
83
+ }
84
+ .toast.show {
85
+ padding-top: 8px;
69
86
  }
70
87
 
71
88
  #refresh {
@@ -98,7 +115,7 @@ button:active { background: #999; }
98
115
 
99
116
  #selector-test {
100
117
  position: relative;
101
- top: -60px;
118
+ /*top: -60px;*/
102
119
  padding: 10px;
103
120
  /*text-align: center;*/
104
121
  }
@@ -115,82 +132,26 @@ button:active { background: #999; }
115
132
  width: 13em;
116
133
  }
117
134
 
118
- div.selector_engine {
119
- position: relative;
120
- display: inline-block;
121
- }
122
-
123
- /*
124
- * CSS transition jujitsu courtesy of
125
- * http://www.greywyvern.com/?post=337
126
- */
127
-
128
- ul#selector_engine_options {
129
- position: absolute;
130
- top: 30px;
131
- width: 15em;
132
- padding: 0 10px;
133
- background: #ccc;
134
- z-index: 1;
135
-
136
- -webkit-border-radius: 3px;
137
- -moz-border-radius: 3px;
138
- border-radius: 3px;
139
- -webkit-box-shadow: 0 1px 3px 0 rgba(0,0,0, .7);
140
- -moz-box-shadow: 0 1px 3px 0 rgba(0,0,0, .7);
141
- box-shadow: 0 1px 3px 0 rgba(0,0,0, .7);
142
-
143
- opacity: 0;
144
- visibility:hidden;
145
- -webkit-transition: visibility 0s linear 0.2s,opacity 0.2s linear;
146
- -moz-transition: visibility 0s linear 0.2s,opacity 0.2s linear;
147
- -o-transition: visibility 0s linear 0.2s,opacity 0.2s linear;
148
- transition: visibility 0s linear 0.2s,opacity 0.2s linear;
149
- }
150
- ul#selector_engine_options.shown {
151
- opacity: 1;
152
- visibility:visible;
153
- transition-delay:0s;
154
- -webkit-transition-delay:0s;
155
- -moz-transition-delay:0s;
156
- -o-transition-delay:0s;
157
- }
158
- #selector_engine_options li {
159
- padding: 5px 0;
160
- cursor: pointer;
161
- position: relative;
162
- text-align: left;
163
- }
164
- #selector_engine_options li:not(:first-of-type){ border-top: 2px solid rgba(255,255,255, .2); }
165
- #selector_engine_options li:not(:last-of-type){ border-bottom: 1px solid rgba(0,0,0, .3); }
166
-
167
-
168
-
169
-
170
- .action-buttons {
135
+ .dropdown {
171
136
  position: relative;
172
137
  display: inline-block;
173
- width: 9em;
174
- top: 60px;
175
138
  }
176
139
 
177
- .action-buttons button {
140
+ .dropdown button {
178
141
  position: relative;
179
142
  width: 100%;
180
143
  }
181
- .action-buttons .drop-indicator {
182
- color: #eee;
144
+ .dropdown ul {
183
145
  position: absolute;
184
- width: 1.5em;
185
- right: 0;
186
- top: 0;
187
- padding: 5px;
146
+ top: 100%;
147
+ float: left;
148
+ list-style: none;
188
149
  }
189
150
 
190
- .action-buttons * {
151
+ .dropdown * {
191
152
  z-index: 1;
192
153
  }
193
- .action-buttons .extra-actions {
154
+ .dropdown ul {
194
155
  z-index: 1;
195
156
  opacity: 0;
196
157
  visibility:hidden;
@@ -199,7 +160,7 @@ ul#selector_engine_options.shown {
199
160
  -o-transition: visibility 0s linear 0.2s,opacity 0.2s linear;
200
161
  transition: visibility 0s linear 0.2s,opacity 0.2s linear;
201
162
  }
202
- .action-buttons .extra-actions.shown {
163
+ .dropdown ul.shown {
203
164
  opacity: 1;
204
165
  visibility:visible;
205
166
  transition-delay:0s;
@@ -208,6 +169,77 @@ ul#selector_engine_options.shown {
208
169
  -o-transition-delay:0s;
209
170
  }
210
171
 
172
+ .dropdown .drop-indicator {
173
+ color: #eee;
174
+ position: absolute;
175
+ width: 2em;
176
+ right: 0;
177
+ top: 6px;
178
+ bottom: 6px;
179
+ border-left: 1px solid white;
180
+ text-align: center;
181
+ cursor: pointer;
182
+ -webkit-user-select: none;
183
+ -moz-user-select: none;
184
+ user-select: none;
185
+ }
186
+
187
+ .dropdown button {
188
+ padding: 8px 2em 8px 0.8em;
189
+ }
190
+
191
+ .action-buttons button {
192
+ width: 9.2em;
193
+ }
194
+ .selector-engine button {
195
+ width: 7.2em;
196
+ }
197
+
198
+ .selector-engine-label {
199
+ padding-left: 1em;
200
+ }
201
+
202
+ /*.action-buttons {*/
203
+ /*position: relative;*/
204
+ /*display: inline-block;*/
205
+ /*width: 9em;*/
206
+ /*top: 60px;*/
207
+ /*}*/
208
+
209
+ /*.action-buttons button {*/
210
+ /*position: relative;*/
211
+ /*width: 100%;*/
212
+ /*}*/
213
+ /*.action-buttons .drop-indicator {*/
214
+ /*color: #eee;*/
215
+ /*position: absolute;*/
216
+ /*width: 1.5em;*/
217
+ /*right: 0;*/
218
+ /*top: 0;*/
219
+ /*padding: 5px;*/
220
+ /*}*/
221
+
222
+ /*.action-buttons * {*/
223
+ /*z-index: 1;*/
224
+ /*}*/
225
+ /*.action-buttons .extra-actions {*/
226
+ /*z-index: 1;*/
227
+ /*opacity: 0;*/
228
+ /*visibility:hidden;*/
229
+ /*-webkit-transition: visibility 0s linear 0.2s,opacity 0.2s linear;*/
230
+ /*-moz-transition: visibility 0s linear 0.2s,opacity 0.2s linear;*/
231
+ /*-o-transition: visibility 0s linear 0.2s,opacity 0.2s linear;*/
232
+ /*transition: visibility 0s linear 0.2s,opacity 0.2s linear;*/
233
+ /*}*/
234
+ /*.action-buttons .extra-actions.shown {*/
235
+ /*opacity: 1;*/
236
+ /*visibility:visible;*/
237
+ /*transition-delay:0s;*/
238
+ /*-webkit-transition-delay:0s;*/
239
+ /*-moz-transition-delay:0s;*/
240
+ /*-o-transition-delay:0s;*/
241
+ /*}*/
242
+
211
243
  .the-columns {
212
244
  position: absolute;
213
245
  top: 90px;
@@ -257,7 +289,7 @@ ul#selector_engine_options.shown {
257
289
  .landscape #list-tabs { right: 50%; }
258
290
 
259
291
 
260
- #list-tabs > div, #dom_detail {
292
+ #list-tabs > div, #dom-detail {
261
293
  position: absolute;
262
294
  top: 40px;
263
295
  right: 0;
@@ -332,22 +364,22 @@ a#dump_button {
332
364
  vertical-align: middle;
333
365
  }
334
366
 
335
- #dom_dump {
367
+ #dom-dump {
336
368
  padding: 0 10px 10px 10px;
337
369
  }
338
370
 
339
- div#dom_dump .treeview .hovered-in-locator {
371
+ div#dom-dump .treeview .hovered-in-locator {
340
372
  color: #2aa198;
341
373
  }
342
374
 
343
- #dom_detail, #accessible-views-tab { padding: 10px; }
375
+ #dom-detail, #accessible-views-tab { padding: 10px; }
344
376
 
345
- #dom_detail {
377
+ #dom-detail {
346
378
  font-size:0.8em;
347
379
  word-break: break-word;
348
380
  }
349
381
 
350
- #dom_detail li {
382
+ #dom-detail li {
351
383
  padding: 6px 0;
352
384
  border-top: 2px solid rgba(255,255,255, .7);
353
385
  border-bottom: 1px solid rgba(0, 0, 0, .2);
@@ -355,24 +387,24 @@ div#dom_dump .treeview .hovered-in-locator {
355
387
  -moz-transition: background-color .1s;
356
388
  transition: background-color .1s;
357
389
  }
358
- #dom_detail li:first-child { border-top: none; }
359
- #dom_detail li:last-child { border-bottom: none; }
390
+ #dom-detail li:first-child { border-top: none; }
391
+ #dom-detail li:last-child { border-bottom: none; }
360
392
 
361
- #dom_detail li:hover {
393
+ #dom-detail li:hover {
362
394
  background-color: rgba(255,255,255, .4);
363
395
  }
364
396
 
365
- #dom_detail .key {
397
+ #dom-detail .key {
366
398
  font-size: 1.5em;
367
399
  }
368
400
 
369
- #dom_detail .value:before {
401
+ #dom-detail .value:before {
370
402
  content: "\21b3";
371
403
  padding-left: 2px;
372
404
  color: #999;
373
405
  }
374
406
 
375
- #dom_detail .interesting {
407
+ #dom-detail .interesting {
376
408
  font-weight: bold;
377
409
  }
378
410
 
@@ -405,7 +437,7 @@ div#dom_dump .treeview .hovered-in-locator {
405
437
  padding: 0;
406
438
  }
407
439
 
408
- #live-view, #ui-live-view-rotator {
440
+ #live-view, #asploder, #ui-live-view-rotator {
409
441
  text-align: center;
410
442
  display: inline-block;
411
443
  float: right;
@@ -417,7 +449,7 @@ div#dom_dump .treeview .hovered-in-locator {
417
449
  border-radius: 0;
418
450
  }
419
451
 
420
- #live-view button.down {
452
+ #live-view button.down,#asploder button.down {
421
453
  background-image: -webkit-linear-gradient(top, #2380CC, #154E7C);
422
454
  background-image: -moz-linear-gradient(top, #2380CC, #154E7C);
423
455
  background-image: linear-gradient(top, #2380CC, #154E7C);
@@ -19,10 +19,15 @@ class Frankifier
19
19
  decide_on_project
20
20
  decide_on_target
21
21
  report_project_and_target
22
+
23
+ check_target_build_configuration_is_valid!
24
+
22
25
  say ''
23
26
  add_linker_flag
27
+
24
28
  say ''
25
29
  add_library_search_path
30
+
26
31
  save_changes
27
32
  end
28
33
 
@@ -78,11 +83,11 @@ class Frankifier
78
83
  setting_array = Array( build_settings_to_edit[build_setting] )
79
84
 
80
85
  if setting_array.find{ |flag| flag.start_with? "$(FRANK_" }
81
- say "It appears that your Debug configuration's #{build_setting} build setting already include some FRANK setup. Namely: #{setting_array.inspect}. I won't change anything here."
86
+ say "It appears that your '#{@target_build_configuration}' configuration's #{build_setting} build setting already include some FRANK setup. Namely: #{setting_array.inspect}. I won't change anything here."
82
87
  return
83
88
  end
84
89
 
85
- say "Adding $(inherited) and $(#{entry_to_add}) to your Debug configuration's #{build_setting} build setting ..."
90
+ say "Adding $(inherited) and $(#{entry_to_add}) to your '#{@target_build_configuration}' configuration's #{build_setting} build setting ..."
86
91
  setting_array.unshift "$(inherited)"
87
92
  setting_array << "$(#{entry_to_add})"
88
93
  setting_array.uniq! # mainly to avoid duplicate $(inherited) entries
@@ -91,6 +96,19 @@ class Frankifier
91
96
  build_settings_to_edit[build_setting] = setting_array
92
97
  end
93
98
 
99
+ def check_target_build_configuration_is_valid!
100
+ unless @target.build_configuration_list.build_configurations.object_named @target_build_configuration
101
+ say %Q|I'm trying to Frankify the '#{@target_build_configuration}' build configuration, but I don't see it that build configuration in your XCode target. Here's a list of the build configurations I see:|
102
+ @target.build_configuration_list.build_configurations.each do |bc|
103
+ say " '#{bc.name}'"
104
+ end
105
+ say ''
106
+ say %Q|Please specify one of those build configurations using the --build_configuration flag|
107
+ exit
108
+ end
109
+
110
+ end
111
+
94
112
  def build_settings_to_edit
95
113
  @_build_settings_to_edit ||= @target.build_configuration_list.build_settings(@target_build_configuration)
96
114
  end