graffle 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. data/History.txt +5 -0
  2. data/Manifest.txt +22 -11
  3. data/README.txt +2 -2
  4. data/Rakefile.hoe +2 -1
  5. data/design-notes/graphical-tests-for-rails-objects.graffle +644 -0
  6. data/examples/objects with notes.expected +5 -0
  7. data/examples/objects with notes.graffle +338 -0
  8. data/examples/objects with notes.rb +42 -0
  9. data/examples/rails-workflow-test.expected +1 -1
  10. data/examples/rails-workflow-test.graffle/data.plist +86 -7
  11. data/examples/rails-workflow-test.rb +11 -9
  12. data/graffle.tmproj +82 -190
  13. data/lib/graffle.rb +19 -2
  14. data/lib/graffle/point.rb +1 -2
  15. data/lib/graffle/stereotypes.rb +62 -16
  16. data/lib/graffle/version.rb +1 -1
  17. data/lib/graphical_tests_for_rails.rb +8 -5
  18. data/lib/graphical_tests_for_rails/graphic-volunteers.rb +75 -0
  19. data/lib/graphical_tests_for_rails/orderings.rb +90 -84
  20. data/lib/graphical_tests_for_rails/picture-appliers.rb +225 -0
  21. data/lib/graphical_tests_for_rails/text-appliers.rb +135 -0
  22. data/lib/graphical_tests_for_rails/volunteer-pool.rb +115 -0
  23. data/test/abstract-graphic-tests.rb +48 -0
  24. data/test/document-tests.rb +5 -5
  25. data/test/examples-tests.rb +42 -0
  26. data/test/graphical_tests_for_rails/{graphic-interpreter-tests.rb → deprecated-graphic-interpreter-tests.rb} +11 -21
  27. data/test/graphical_tests_for_rails/graphic-volunteer-tests.rb +218 -0
  28. data/test/graphical_tests_for_rails/in-workflow-order-tests.rb +1 -1
  29. data/test/graphical_tests_for_rails/picture-applier-tests.rb +215 -0
  30. data/test/graphical_tests_for_rails/{text-interpreter-tests.rb → text-applier-tests.rb} +17 -3
  31. data/test/graphical_tests_for_rails/util.rb +16 -0
  32. data/test/line-graphic-tests.rb +9 -1
  33. data/test/note-tests.rb +62 -0
  34. data/test/{graffle-file-types → sample-files}/as-a-package.graffle/data.plist +0 -0
  35. data/test/{graffle-file-types → sample-files}/as-a-package.graffle/image1.png +0 -0
  36. data/test/{graffle-file-types → sample-files}/as-a-package.graffle/image2.png +0 -0
  37. data/test/{graffle-file-types → sample-files}/as-a-package.graffle/image3.png +0 -0
  38. data/test/{graffle-file-types → sample-files}/multiple-canvases.graffle +0 -0
  39. data/test/{graffle-file-types → sample-files}/opening-tests.rb +9 -4
  40. data/test/{graffle-file-types → sample-files}/two-boxes-and-a-line.graffle +0 -0
  41. data/test/shaped-graphic-tests.rb +2 -3
  42. metadata +42 -18
  43. data/lib/graphical_tests_for_rails/interpreters.rb +0 -147
  44. data/test/tests-of-examples/workflow-slowtests.rb +0 -19
@@ -28,13 +28,15 @@ end
28
28
 
29
29
  if $0 == __FILE__
30
30
  with_pleasant_exceptions do
31
- test = File.dirname(__FILE__) + '/rails-workflow-test.graffle'
32
- doc = Graffle.parse(test)
33
- graphics = InWorkflowOrder.new(doc.first_sheet).graphics
34
- interpreter = GraphicInterpreter.new(graphics,
35
- 'line labels' => ArgsFromQuotedText.new,
36
- 'shaped graphic text' => TextIsNameOfPage.new('assert_on_page'),
37
- 'text...' => ArgsFromQuotedText.new)
38
- interpreter.run_against(ImaginaryRailsUniverse.new)
39
- end
31
+ test = File.dirname(__FILE__) + '/rails-workflow-test.graffle'
32
+ doc = Graffle.parse_file(test)
33
+ workhorse = PictureApplier.new {
34
+ given('note').matching('ignore').skip
35
+ given('shaped graphic content').matching('text...').use(PrefixNameAndArgsFromQuotedText.new)
36
+ given('shaped graphic content').use(TextAsNameOfPage.new('assert_on_page'))
37
+ given('line label content').use(ArgsFromQuotedText.new)
38
+ }
39
+ graphics = InWorkflowOrder.new(doc.first_sheet).graphics
40
+ workhorse.apply(graphics, ImaginaryRailsUniverse.new)
41
+ end
40
42
  end
data/graffle.tmproj CHANGED
@@ -18,401 +18,297 @@
18
18
  </dict>
19
19
  </array>
20
20
  <key>fileHierarchyDrawerWidth</key>
21
- <integer>252</integer>
21
+ <integer>246</integer>
22
22
  <key>metaData</key>
23
23
  <dict>
24
- <key>LICENSE.txt</key>
25
- <dict>
26
- <key>caret</key>
27
- <dict>
28
- <key>column</key>
29
- <integer>8</integer>
30
- <key>line</key>
31
- <integer>14</integer>
32
- </dict>
33
- <key>firstVisibleColumn</key>
34
- <integer>78</integer>
35
- <key>firstVisibleLine</key>
36
- <integer>0</integer>
37
- </dict>
38
24
  <key>Manifest.txt</key>
39
25
  <dict>
40
26
  <key>caret</key>
41
27
  <dict>
42
28
  <key>column</key>
43
- <integer>0</integer>
29
+ <integer>38</integer>
44
30
  <key>line</key>
45
- <integer>45</integer>
31
+ <integer>38</integer>
46
32
  </dict>
47
33
  <key>firstVisibleColumn</key>
48
34
  <integer>0</integer>
49
35
  <key>firstVisibleLine</key>
50
- <integer>14</integer>
36
+ <integer>25</integer>
51
37
  </dict>
52
- <key>README.txt</key>
38
+ <key>Rakefile.hoe</key>
53
39
  <dict>
54
40
  <key>caret</key>
55
41
  <dict>
56
42
  <key>column</key>
57
- <integer>26</integer>
43
+ <integer>0</integer>
58
44
  <key>line</key>
59
- <integer>3</integer>
45
+ <integer>12</integer>
60
46
  </dict>
61
47
  <key>firstVisibleColumn</key>
62
48
  <integer>0</integer>
63
49
  <key>firstVisibleLine</key>
64
50
  <integer>0</integer>
65
51
  </dict>
66
- <key>Rakefile</key>
52
+ <key>examples/rails-workflow-test.expected</key>
67
53
  <dict>
68
54
  <key>caret</key>
69
55
  <dict>
70
56
  <key>column</key>
71
- <integer>5</integer>
57
+ <integer>32</integer>
72
58
  <key>line</key>
73
- <integer>2</integer>
59
+ <integer>5</integer>
74
60
  </dict>
75
- <key>columnSelection</key>
76
- <false/>
77
61
  <key>firstVisibleColumn</key>
78
62
  <integer>0</integer>
79
63
  <key>firstVisibleLine</key>
80
64
  <integer>0</integer>
81
- <key>selectFrom</key>
82
- <dict>
83
- <key>column</key>
84
- <integer>0</integer>
85
- <key>line</key>
86
- <integer>2</integer>
87
- </dict>
88
- <key>selectTo</key>
89
- <dict>
90
- <key>column</key>
91
- <integer>12</integer>
92
- <key>line</key>
93
- <integer>2</integer>
94
- </dict>
95
65
  </dict>
96
- <key>Rakefile.hoe</key>
66
+ <key>examples/rails-workflow-test.rb</key>
97
67
  <dict>
98
68
  <key>caret</key>
99
69
  <dict>
100
70
  <key>column</key>
101
71
  <integer>0</integer>
102
72
  <key>line</key>
103
- <integer>0</integer>
73
+ <integer>27</integer>
104
74
  </dict>
105
75
  <key>firstVisibleColumn</key>
106
76
  <integer>0</integer>
107
77
  <key>firstVisibleLine</key>
108
- <integer>0</integer>
78
+ <integer>8</integer>
109
79
  </dict>
110
- <key>examples/rails-workflow-test.expected</key>
80
+ <key>homepage/index.html</key>
111
81
  <dict>
112
82
  <key>caret</key>
113
83
  <dict>
114
84
  <key>column</key>
115
- <integer>0</integer>
85
+ <integer>1</integer>
116
86
  <key>line</key>
117
- <integer>10</integer>
87
+ <integer>17</integer>
118
88
  </dict>
119
89
  <key>firstVisibleColumn</key>
120
90
  <integer>0</integer>
121
91
  <key>firstVisibleLine</key>
122
92
  <integer>0</integer>
123
93
  </dict>
124
- <key>examples/rails-workflow-test.graffle/data.plist</key>
94
+ <key>lib/graffle.rb</key>
125
95
  <dict>
126
96
  <key>caret</key>
127
97
  <dict>
128
98
  <key>column</key>
129
99
  <integer>0</integer>
130
100
  <key>line</key>
131
- <integer>0</integer>
101
+ <integer>40</integer>
132
102
  </dict>
133
103
  <key>firstVisibleColumn</key>
134
104
  <integer>0</integer>
135
105
  <key>firstVisibleLine</key>
136
- <integer>195</integer>
106
+ <integer>23</integer>
137
107
  </dict>
138
- <key>examples/rails-workflow-test.rb</key>
108
+ <key>lib/graphical_tests_for_rails.rb</key>
139
109
  <dict>
140
110
  <key>caret</key>
141
111
  <dict>
142
112
  <key>column</key>
143
113
  <integer>0</integer>
144
114
  <key>line</key>
145
- <integer>37</integer>
115
+ <integer>27</integer>
146
116
  </dict>
147
- <key>columnSelection</key>
148
- <false/>
149
117
  <key>firstVisibleColumn</key>
150
118
  <integer>0</integer>
151
119
  <key>firstVisibleLine</key>
152
- <integer>6</integer>
153
- <key>selectFrom</key>
154
- <dict>
155
- <key>column</key>
156
- <integer>0</integer>
157
- <key>line</key>
158
- <integer>34</integer>
159
- </dict>
160
- <key>selectTo</key>
161
- <dict>
162
- <key>column</key>
163
- <integer>0</integer>
164
- <key>line</key>
165
- <integer>37</integer>
166
- </dict>
120
+ <integer>0</integer>
167
121
  </dict>
168
- <key>lib/graffle/point.rb</key>
122
+ <key>lib/graphical_tests_for_rails/graphic-volunteers.rb</key>
169
123
  <dict>
170
124
  <key>caret</key>
171
125
  <dict>
172
126
  <key>column</key>
173
- <integer>14</integer>
127
+ <integer>0</integer>
174
128
  <key>line</key>
175
- <integer>6</integer>
129
+ <integer>7</integer>
176
130
  </dict>
177
131
  <key>firstVisibleColumn</key>
178
132
  <integer>0</integer>
179
133
  <key>firstVisibleLine</key>
180
134
  <integer>0</integer>
181
135
  </dict>
182
- <key>lib/graffle/stereotypes.rb</key>
136
+ <key>lib/graphical_tests_for_rails/orderings.rb</key>
183
137
  <dict>
184
138
  <key>caret</key>
185
139
  <dict>
186
140
  <key>column</key>
187
- <integer>35</integer>
141
+ <integer>0</integer>
188
142
  <key>line</key>
189
- <integer>322</integer>
143
+ <integer>6</integer>
190
144
  </dict>
191
145
  <key>firstVisibleColumn</key>
192
146
  <integer>0</integer>
193
147
  <key>firstVisibleLine</key>
194
- <integer>314</integer>
148
+ <integer>0</integer>
195
149
  </dict>
196
- <key>lib/graffle/styled-text-reader.rb</key>
150
+ <key>lib/graphical_tests_for_rails/picture-appliers.rb</key>
197
151
  <dict>
198
152
  <key>caret</key>
199
153
  <dict>
200
154
  <key>column</key>
201
- <integer>39</integer>
155
+ <integer>48</integer>
202
156
  <key>line</key>
203
- <integer>6</integer>
157
+ <integer>24</integer>
204
158
  </dict>
205
159
  <key>firstVisibleColumn</key>
206
160
  <integer>0</integer>
207
161
  <key>firstVisibleLine</key>
208
- <integer>15</integer>
162
+ <integer>0</integer>
209
163
  </dict>
210
- <key>lib/graphical_tests_for_rails.rb</key>
164
+ <key>lib/graphical_tests_for_rails/text-appliers.rb</key>
211
165
  <dict>
212
166
  <key>caret</key>
213
167
  <dict>
214
168
  <key>column</key>
215
- <integer>35</integer>
169
+ <integer>0</integer>
216
170
  <key>line</key>
217
- <integer>9</integer>
171
+ <integer>4</integer>
218
172
  </dict>
219
173
  <key>firstVisibleColumn</key>
220
174
  <integer>0</integer>
221
175
  <key>firstVisibleLine</key>
222
176
  <integer>0</integer>
223
177
  </dict>
224
- <key>lib/graphical_tests_for_rails/interpreters.rb</key>
178
+ <key>lib/graphical_tests_for_rails/volunteer-pool.rb</key>
225
179
  <dict>
226
180
  <key>caret</key>
227
181
  <dict>
228
182
  <key>column</key>
229
183
  <integer>29</integer>
230
184
  <key>line</key>
231
- <integer>59</integer>
185
+ <integer>6</integer>
232
186
  </dict>
233
187
  <key>firstVisibleColumn</key>
234
188
  <integer>0</integer>
235
189
  <key>firstVisibleLine</key>
236
- <integer>39</integer>
237
- </dict>
238
- <key>lib/graphical_tests_for_rails/orderings.rb</key>
239
- <dict>
240
- <key>caret</key>
241
- <dict>
242
- <key>column</key>
243
- <integer>67</integer>
244
- <key>line</key>
245
- <integer>23</integer>
246
- </dict>
247
- <key>columnSelection</key>
248
- <false/>
249
- <key>firstVisibleColumn</key>
250
190
  <integer>0</integer>
251
- <key>firstVisibleLine</key>
252
- <integer>6</integer>
253
- <key>selectFrom</key>
254
- <dict>
255
- <key>column</key>
256
- <integer>65</integer>
257
- <key>line</key>
258
- <integer>23</integer>
259
- </dict>
260
- <key>selectTo</key>
261
- <dict>
262
- <key>column</key>
263
- <integer>67</integer>
264
- <key>line</key>
265
- <integer>23</integer>
266
- </dict>
267
191
  </dict>
268
- <key>setup.rb</key>
192
+ <key>test/abstract-graphic-tests.rb</key>
269
193
  <dict>
270
194
  <key>caret</key>
271
195
  <dict>
272
196
  <key>column</key>
273
- <integer>22</integer>
197
+ <integer>45</integer>
274
198
  <key>line</key>
275
- <integer>1356</integer>
199
+ <integer>13</integer>
276
200
  </dict>
277
201
  <key>firstVisibleColumn</key>
278
202
  <integer>0</integer>
279
203
  <key>firstVisibleLine</key>
280
- <integer>1167</integer>
204
+ <integer>0</integer>
281
205
  </dict>
282
- <key>test/abstract-graphic-tests.rb</key>
206
+ <key>test/document-tests.rb</key>
283
207
  <dict>
284
208
  <key>caret</key>
285
209
  <dict>
286
210
  <key>column</key>
287
- <integer>0</integer>
211
+ <integer>31</integer>
288
212
  <key>line</key>
289
- <integer>34</integer>
213
+ <integer>112</integer>
290
214
  </dict>
291
215
  <key>firstVisibleColumn</key>
292
216
  <integer>0</integer>
293
217
  <key>firstVisibleLine</key>
294
- <integer>17</integer>
218
+ <integer>83</integer>
295
219
  </dict>
296
- <key>test/array-and-hash-stereotyping-tests.rb</key>
220
+ <key>test/examples-tests.rb</key>
297
221
  <dict>
298
222
  <key>caret</key>
299
223
  <dict>
300
224
  <key>column</key>
301
225
  <integer>0</integer>
302
226
  <key>line</key>
303
- <integer>5</integer>
227
+ <integer>10</integer>
304
228
  </dict>
305
229
  <key>firstVisibleColumn</key>
306
230
  <integer>0</integer>
307
231
  <key>firstVisibleLine</key>
308
232
  <integer>0</integer>
309
233
  </dict>
310
- <key>test/graffle-file-types/opening-tests.rb</key>
234
+ <key>test/graphical_tests_for_rails/deprecated-graphic-interpreter-tests.rb</key>
311
235
  <dict>
312
236
  <key>caret</key>
313
237
  <dict>
314
238
  <key>column</key>
315
239
  <integer>0</integer>
316
240
  <key>line</key>
317
- <integer>9</integer>
241
+ <integer>0</integer>
318
242
  </dict>
319
243
  <key>firstVisibleColumn</key>
320
244
  <integer>0</integer>
321
245
  <key>firstVisibleLine</key>
322
246
  <integer>0</integer>
323
247
  </dict>
324
- <key>test/graphical_tests_for_rails/graphic-interpreter-tests.rb</key>
248
+ <key>test/graphical_tests_for_rails/graphic-volunteer-tests.rb</key>
325
249
  <dict>
326
250
  <key>caret</key>
327
251
  <dict>
328
252
  <key>column</key>
329
- <integer>25</integer>
253
+ <integer>49</integer>
330
254
  <key>line</key>
331
- <integer>83</integer>
255
+ <integer>12</integer>
332
256
  </dict>
333
257
  <key>firstVisibleColumn</key>
334
258
  <integer>0</integer>
335
259
  <key>firstVisibleLine</key>
336
- <integer>69</integer>
260
+ <integer>0</integer>
337
261
  </dict>
338
262
  <key>test/graphical_tests_for_rails/in-workflow-order-tests.rb</key>
339
263
  <dict>
340
264
  <key>caret</key>
341
265
  <dict>
342
266
  <key>column</key>
343
- <integer>0</integer>
267
+ <integer>41</integer>
344
268
  <key>line</key>
345
- <integer>0</integer>
269
+ <integer>16</integer>
346
270
  </dict>
347
271
  <key>firstVisibleColumn</key>
348
272
  <integer>0</integer>
349
273
  <key>firstVisibleLine</key>
350
274
  <integer>0</integer>
351
275
  </dict>
352
- <key>test/graphical_tests_for_rails/text-interpreter-tests.rb</key>
276
+ <key>test/graphical_tests_for_rails/picture-applier-tests.rb</key>
353
277
  <dict>
354
278
  <key>caret</key>
355
279
  <dict>
356
280
  <key>column</key>
357
- <integer>0</integer>
281
+ <integer>17</integer>
358
282
  <key>line</key>
359
- <integer>0</integer>
283
+ <integer>17</integer>
360
284
  </dict>
361
285
  <key>firstVisibleColumn</key>
362
286
  <integer>0</integer>
363
287
  <key>firstVisibleLine</key>
364
- <integer>54</integer>
365
- </dict>
366
- <key>test/line-graphic-tests.rb</key>
367
- <dict>
368
- <key>caret</key>
369
- <dict>
370
- <key>column</key>
371
- <integer>0</integer>
372
- <key>line</key>
373
- <integer>0</integer>
374
- </dict>
375
- <key>firstVisibleColumn</key>
376
288
  <integer>0</integer>
377
- <key>firstVisibleLine</key>
378
- <integer>88</integer>
379
289
  </dict>
380
- <key>test/set-standalone-test-paths.rb</key>
290
+ <key>test/graphical_tests_for_rails/text-applier-tests.rb</key>
381
291
  <dict>
382
292
  <key>caret</key>
383
293
  <dict>
384
294
  <key>column</key>
385
- <integer>0</integer>
295
+ <integer>55</integer>
386
296
  <key>line</key>
387
- <integer>5</integer>
297
+ <integer>84</integer>
388
298
  </dict>
389
299
  <key>firstVisibleColumn</key>
390
300
  <integer>0</integer>
391
301
  <key>firstVisibleLine</key>
392
- <integer>0</integer>
302
+ <integer>69</integer>
393
303
  </dict>
394
- <key>test/shaped-graphic-tests.rb</key>
304
+ <key>test/text-tests.rb</key>
395
305
  <dict>
396
306
  <key>caret</key>
397
307
  <dict>
398
308
  <key>column</key>
399
309
  <integer>0</integer>
400
310
  <key>line</key>
401
- <integer>0</integer>
402
- </dict>
403
- <key>firstVisibleColumn</key>
404
- <integer>0</integer>
405
- <key>firstVisibleLine</key>
406
- <integer>0</integer>
407
- </dict>
408
- <key>test/tests-of-examples/workflow-slowtests.rb</key>
409
- <dict>
410
- <key>caret</key>
411
- <dict>
412
- <key>column</key>
413
- <integer>44</integer>
414
- <key>line</key>
415
- <integer>11</integer>
311
+ <integer>12</integer>
416
312
  </dict>
417
313
  <key>firstVisibleColumn</key>
418
314
  <integer>0</integer>
@@ -422,31 +318,27 @@
422
318
  </dict>
423
319
  <key>openDocuments</key>
424
320
  <array>
425
- <string>examples/rails-workflow-test.expected</string>
426
- <string>test/line-graphic-tests.rb</string>
427
- <string>lib/graffle/stereotypes.rb</string>
428
- <string>test/array-and-hash-stereotyping-tests.rb</string>
429
- <string>LICENSE.txt</string>
321
+ <string>test/graphical_tests_for_rails/picture-applier-tests.rb</string>
430
322
  <string>Manifest.txt</string>
431
- <string>lib/graphical_tests_for_rails/orderings.rb</string>
432
- <string>examples/rails-workflow-test.graffle/data.plist</string>
433
- <string>lib/graphical_tests_for_rails/interpreters.rb</string>
434
- <string>test/graffle-file-types/opening-tests.rb</string>
323
+ <string>homepage/index.html</string>
324
+ <string>Rakefile.hoe</string>
435
325
  <string>examples/rails-workflow-test.rb</string>
436
- <string>test/abstract-graphic-tests.rb</string>
437
- <string>lib/graffle/point.rb</string>
438
- <string>lib/graffle/styled-text-reader.rb</string>
439
- <string>test/graphical_tests_for_rails/text-interpreter-tests.rb</string>
440
- <string>test/graphical_tests_for_rails/graphic-interpreter-tests.rb</string>
441
- <string>test/tests-of-examples/workflow-slowtests.rb</string>
442
- <string>test/set-standalone-test-paths.rb</string>
443
- <string>test/shaped-graphic-tests.rb</string>
326
+ <string>examples/rails-workflow-test.expected</string>
327
+ <string>test/text-tests.rb</string>
328
+ <string>test/graphical_tests_for_rails/text-applier-tests.rb</string>
329
+ <string>lib/graphical_tests_for_rails/text-appliers.rb</string>
330
+ <string>lib/graphical_tests_for_rails/volunteer-pool.rb</string>
331
+ <string>lib/graphical_tests_for_rails/graphic-volunteers.rb</string>
332
+ <string>lib/graphical_tests_for_rails/orderings.rb</string>
333
+ <string>test/graphical_tests_for_rails/deprecated-graphic-interpreter-tests.rb</string>
444
334
  <string>test/graphical_tests_for_rails/in-workflow-order-tests.rb</string>
445
- <string>Rakefile</string>
446
- <string>Rakefile.hoe</string>
447
- <string>README.txt</string>
448
- <string>setup.rb</string>
335
+ <string>test/graphical_tests_for_rails/graphic-volunteer-tests.rb</string>
336
+ <string>test/document-tests.rb</string>
337
+ <string>test/examples-tests.rb</string>
338
+ <string>lib/graphical_tests_for_rails/picture-appliers.rb</string>
339
+ <string>lib/graffle.rb</string>
449
340
  <string>lib/graphical_tests_for_rails.rb</string>
341
+ <string>test/abstract-graphic-tests.rb</string>
450
342
  </array>
451
343
  <key>showFileHierarchyDrawer</key>
452
344
  <true/>