kinney 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. data/README.markdown +2 -2
  2. data/Rakefile +4 -0
  3. data/app/admin/clips.rb +40 -1
  4. data/app/assets/javascripts/kinney/admin/video_preview.js +1 -1
  5. data/app/controllers/kinney/tracker_controller.rb +0 -34
  6. data/app/helpers/kinney/general_helper.rb +1 -1
  7. data/app/models/kinney/clip.rb +5 -2
  8. data/app/models/kinney/person.rb +11 -11
  9. data/app/views/{kinney/tracker → admin/kinney_clips}/_video_engagement_chart.html.erb +15 -0
  10. data/app/views/{kinney/tracker/analyze.html.erb → admin/kinney_clips/analyze_tracker.html.erb} +5 -3
  11. data/app/views/kinney/clips/show.html.erb +1 -1
  12. data/app/views/kinney/people/index.html.erb +4 -3
  13. data/app/views/kinney/sitemap/index.xml.builder +1 -1
  14. data/config/routes.rb +1 -1
  15. data/lib/kinney/version.rb +1 -1
  16. data/test/dummy/db/development.sqlite3 +0 -0
  17. data/test/dummy/db/test.sqlite3 +0 -0
  18. data/test/dummy/log/development.log +33694 -0
  19. data/test/dummy/log/test.log +29895 -0
  20. data/test/dummy/tmp/cache/assets/CBF/9B0/sprockets%2Fe283548d3ef4505c82279198e09b53fa +0 -0
  21. data/test/dummy/tmp/cache/assets/D0B/560/sprockets%2F33db47d8bb65ee7457b03336420a55fd +0 -0
  22. data/test/functional/kinney/admin_clips_controller_test.rb +24 -0
  23. data/test/functional/kinney/clips_controller_test.rb +5 -3
  24. data/test/functional/kinney/people_controller_test.rb +5 -3
  25. data/test/functional/kinney/tracker_controller_test.rb +0 -6
  26. data/test/integration/admin_clip_test.rb +14 -11
  27. data/test/integration/admin_images_test.rb +8 -7
  28. data/test/integration/clips_index_test.rb +9 -6
  29. data/test/integration/clips_show_test.rb +11 -8
  30. data/test/integration/microdata_test.rb +40 -0
  31. data/test/integration/navigation_test.rb +7 -5
  32. data/test/integration/people_index_test.rb +7 -4
  33. data/test/integration/people_show_test.rb +14 -12
  34. data/test/support/test_with_cassette.rb +38 -0
  35. data/test/test_helper.rb +18 -2
  36. data/test/unit/clip_test.rb +5 -0
  37. data/test/vcr_cassettes/admin_clip/add_a_description_for_a_clip.yml +272 -0
  38. data/test/vcr_cassettes/admin_clip/admin_user_can_create_new_clip.yml +114 -0
  39. data/test/vcr_cassettes/admin_clip/display_whether_there_is_a_VTT_file_for_a_clip.yml +613 -0
  40. data/test/vcr_cassettes/admin_clip/do_not_allow_submission_of_clip_if_there_is_no_webvtt_file.yml +567 -0
  41. data/test/vcr_cassettes/admin_images/user_should_not_be_able_to_create_slug.yml +967 -0
  42. data/test/vcr_cassettes/admin_images/user_should_see_associated_name_for_image_on_index_view.yml +561 -0
  43. data/test/vcr_cassettes/admin_images/user_should_see_associated_name_for_image_on_show_view.yml +162 -0
  44. data/test/vcr_cassettes/admin_images/user_should_see_image_for_valid_image_on_edit_page.yml +186 -0
  45. data/test/vcr_cassettes/admin_images/user_should_see_image_for_valid_image_on_new_image_page.yml +374 -0
  46. data/test/vcr_cassettes/admin_images/user_should_see_image_for_valid_image_on_show_page.yml +193 -0
  47. data/test/vcr_cassettes/clips_controller/should_assign_a_webvtt_variable.yml +154 -0
  48. data/test/vcr_cassettes/clips_controller/should_assign_title_for_a_show_view.yml +136 -0
  49. data/test/vcr_cassettes/clips_controller/should_get_show.yml +136 -0
  50. data/test/vcr_cassettes/clips_index/clicking_on_a_video_thumbnail_should_go_to_a_video_clip.yml +154 -0
  51. data/test/vcr_cassettes/clips_show/should_expand/collapse_the_transcript.yml +154 -0
  52. data/test/vcr_cassettes/clips_show/should_have_link_to_other_videos_by_the_same_person.yml +136 -0
  53. data/test/vcr_cassettes/clips_show/should_have_link_to_profile.yml +136 -0
  54. data/test/vcr_cassettes/clips_show/should_not_see_More_videos_on_topics_with_link_under_video.yml +136 -0
  55. data/test/vcr_cassettes/clips_show/should_not_see_Video_Topics_section_on_page.yml +136 -0
  56. data/test/vcr_cassettes/clips_show/should_show_basic_information_about_a_clip.yml +136 -0
  57. data/test/vcr_cassettes/clips_show/should_show_other_clips_related_by_topic.yml +136 -0
  58. data/test/vcr_cassettes/clips_show/should_show_the_transcript.yml +154 -0
  59. data/test/vcr_cassettes/microdata/clip_show_view_should_have_microdata.yml +136 -0
  60. data/test/vcr_cassettes/microdata/person_show_view_should_have_microdata.yml +399 -0
  61. data/test/vcr_cassettes/navigation/there_should_be_a_link_to_People_in_the_global_navigation.yml +267 -0
  62. data/test/vcr_cassettes/people_controller/should_get_index.yml +267 -0
  63. data/test/vcr_cassettes/people_controller/should_get_show.yml +399 -0
  64. data/test/vcr_cassettes/people_controller/show_view_should_have_a_title.yml +399 -0
  65. data/test/vcr_cassettes/people_index/links_to_show_view_for_person_with_video.yml +663 -0
  66. data/test/vcr_cassettes/people_index/links_to_show_view_for_person_without_video.yml +267 -0
  67. data/test/vcr_cassettes/people_index/shows_people.yml +267 -0
  68. data/test/vcr_cassettes/people_index/sort_profile_images.yml +267 -0
  69. data/test/vcr_cassettes/people_show/if_there_is_only_one_image_and_it_is_a_top_pick_then_do_not_show_the_image_section_of_the_page.yml +135 -0
  70. data/test/vcr_cassettes/people_show/should_display_a_map_if_the_location_the_person_grew_up_is_known.yml +399 -0
  71. data/test/vcr_cassettes/people_show/should_display_the_information_like_description__interview_date_and_time_below_video_clip.yml +136 -0
  72. data/test/vcr_cassettes/people_show/should_give_a_link_to_other_videos_with_the_same_person.yml +534 -0
  73. data/test/vcr_cassettes/people_show/should_not_display_a_map_if_the_location_the_person_grew_up_is_not_known.yml +135 -0
  74. data/test/vcr_cassettes/people_show/should_not_see_the_top_pick_image_with_the_other_images.yml +399 -0
  75. data/test/vcr_cassettes/people_show/should_provide_a_link_to_a_video_as_an_image_and_make_it_a_top_pick.yml +399 -0
  76. data/test/vcr_cassettes/people_show/should_provide_a_link_to_other_videos_as_text_links.yml +399 -0
  77. data/test/vcr_cassettes/people_show/should_show_a_top_pick_image_near_the_biography.yml +399 -0
  78. data/test/vcr_cassettes/people_show/should_show_name_suffix_if_present.yml +135 -0
  79. data/test/vcr_cassettes/people_show/shows_person_content.yml +399 -0
  80. metadata +180 -59
  81. checksums.yaml +0 -7
  82. data/test/dummy/tmp/cache/assets/D36/B10/sprockets%2F3a3013990e54d3e944c21c6a9ed0b5de +0 -0
  83. data/test/dummy/tmp/cache/assets/D55/830/sprockets%2Fbd750c0ba01430d321ae77fbc2b238f9 +0 -0
  84. data/test/dummy/tmp/capybara/capybara-201209271510033933274391.html +0 -13
  85. data/test/dummy/tmp/capybara/capybara-201209271512386994415403.html +0 -13
  86. data/test/dummy/tmp/capybara/capybara-201209271515157873796042.html +0 -165
  87. data/test/dummy/tmp/capybara/capybara-201209271517053504547394.html +0 -165
  88. data/test/dummy/tmp/capybara/capybara-201209271520578220954785.html +0 -165
  89. data/test/dummy/tmp/capybara/capybara-201209271522457231789910.html +0 -165
  90. data/test/dummy/tmp/capybara/capybara-201209271524374294425819.html +0 -165
  91. data/test/dummy/tmp/capybara/capybara-201209271526597280429369.html +0 -165
  92. data/test/dummy/tmp/capybara/capybara-201209271529595570902080.html +0 -165
@@ -0,0 +1,272 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/url
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"url":"http://127.0.0.1:60316/admin/kinney_clips/new"}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json; charset=utf-8
14
+ Content-Length:
15
+ - '55'
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Connection:
28
+ - close
29
+ Content-Length:
30
+ - '87'
31
+ Server:
32
+ - httpd.js
33
+ Date:
34
+ - Fri, 29 Mar 2013 16:33:03 GMT
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"name":"get","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":""}'
38
+ http_version:
39
+ recorded_at: Fri, 29 Mar 2013 16:33:03 GMT
40
+ - request:
41
+ method: post
42
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/elements
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"using":"xpath","value":".//*[self::input | self::textarea | self::select][not(./@type
46
+ = ''submit'' or ./@type = ''image'' or ./@type = ''hidden'')][(((./@id = ''kinney_clip_description''
47
+ or ./@name = ''kinney_clip_description'') or ./@placeholder = ''kinney_clip_description'')
48
+ or ./@id = //label[contains(normalize-space(string(.)), ''kinney_clip_description'')]/@for)][not(./@disabled)]
49
+ | .//label[contains(normalize-space(string(.)), ''kinney_clip_description'')]//.//*[self::input
50
+ | self::textarea | self::select][not(./@type = ''submit'' or ./@type = ''image''
51
+ or ./@type = ''hidden'')][not(./@disabled)]"}'
52
+ headers:
53
+ Accept:
54
+ - application/json
55
+ Content-Type:
56
+ - application/json; charset=utf-8
57
+ Content-Length:
58
+ - '591'
59
+ Accept-Encoding:
60
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
61
+ User-Agent:
62
+ - Ruby
63
+ response:
64
+ status:
65
+ code: 200
66
+ message: OK
67
+ headers:
68
+ Content-Type:
69
+ - application/json; charset=UTF-8
70
+ Connection:
71
+ - close
72
+ Content-Length:
73
+ - '148'
74
+ Server:
75
+ - httpd.js
76
+ Date:
77
+ - Fri, 29 Mar 2013 16:33:04 GMT
78
+ body:
79
+ encoding: UTF-8
80
+ string: '{"name":"findElements","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":[{"ELEMENT":"{315605e6-f92e-4599-be89-fd0e52b89183}"}]}'
81
+ http_version:
82
+ recorded_at: Fri, 29 Mar 2013 16:33:04 GMT
83
+ - request:
84
+ method: post
85
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/elements
86
+ body:
87
+ encoding: UTF-8
88
+ string: '{"using":"xpath","value":".//*[self::input | self::textarea][not(./@type
89
+ = ''submit'' or ./@type = ''image'' or ./@type = ''radio'' or ./@type = ''checkbox''
90
+ or ./@type = ''hidden'' or ./@type = ''file'')][(((./@id = ''Description''
91
+ or ./@name = ''Description'') or ./@placeholder = ''Description'') or ./@id
92
+ = //label[contains(normalize-space(string(.)), ''Description'')]/@for)][not(./@disabled)]
93
+ | .//label[contains(normalize-space(string(.)), ''Description'')]//.//*[self::input
94
+ | self::textarea][not(./@type = ''submit'' or ./@type = ''image'' or ./@type
95
+ = ''radio'' or ./@type = ''checkbox'' or ./@type = ''hidden'' or ./@type =
96
+ ''file'')][not(./@disabled)]"}'
97
+ headers:
98
+ Accept:
99
+ - application/json
100
+ Content-Type:
101
+ - application/json; charset=utf-8
102
+ Content-Length:
103
+ - '631'
104
+ Accept-Encoding:
105
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
106
+ User-Agent:
107
+ - Ruby
108
+ response:
109
+ status:
110
+ code: 200
111
+ message: OK
112
+ headers:
113
+ Content-Type:
114
+ - application/json; charset=UTF-8
115
+ Connection:
116
+ - close
117
+ Content-Length:
118
+ - '148'
119
+ Server:
120
+ - httpd.js
121
+ Date:
122
+ - Fri, 29 Mar 2013 16:33:04 GMT
123
+ body:
124
+ encoding: UTF-8
125
+ string: '{"name":"findElements","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":[{"ELEMENT":"{315605e6-f92e-4599-be89-fd0e52b89183}"}]}'
126
+ http_version:
127
+ recorded_at: Fri, 29 Mar 2013 16:33:04 GMT
128
+ - request:
129
+ method: get
130
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/element/%7B315605e6-f92e-4599-be89-fd0e52b89183%7D/name
131
+ body:
132
+ encoding: US-ASCII
133
+ string: ''
134
+ headers:
135
+ Accept:
136
+ - application/json
137
+ Cache-Control:
138
+ - no-cache
139
+ Accept-Encoding:
140
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
141
+ User-Agent:
142
+ - Ruby
143
+ response:
144
+ status:
145
+ code: 200
146
+ message: OK
147
+ headers:
148
+ Content-Type:
149
+ - application/json; charset=UTF-8
150
+ Connection:
151
+ - close
152
+ Content-Length:
153
+ - '109'
154
+ Server:
155
+ - httpd.js
156
+ Date:
157
+ - Fri, 29 Mar 2013 16:33:04 GMT
158
+ body:
159
+ encoding: UTF-8
160
+ string: '{"name":"getElementTagName","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":"textarea"}'
161
+ http_version:
162
+ recorded_at: Fri, 29 Mar 2013 16:33:04 GMT
163
+ - request:
164
+ method: get
165
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/element/%7B315605e6-f92e-4599-be89-fd0e52b89183%7D/attribute/type
166
+ body:
167
+ encoding: US-ASCII
168
+ string: ''
169
+ headers:
170
+ Accept:
171
+ - application/json
172
+ Cache-Control:
173
+ - no-cache
174
+ Accept-Encoding:
175
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
176
+ User-Agent:
177
+ - Ruby
178
+ response:
179
+ status:
180
+ code: 200
181
+ message: OK
182
+ headers:
183
+ Content-Type:
184
+ - application/json; charset=UTF-8
185
+ Connection:
186
+ - close
187
+ Content-Length:
188
+ - '111'
189
+ Server:
190
+ - httpd.js
191
+ Date:
192
+ - Fri, 29 Mar 2013 16:33:04 GMT
193
+ body:
194
+ encoding: UTF-8
195
+ string: '{"name":"getElementAttribute","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":"textarea"}'
196
+ http_version:
197
+ recorded_at: Fri, 29 Mar 2013 16:33:04 GMT
198
+ - request:
199
+ method: post
200
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/execute
201
+ body:
202
+ encoding: UTF-8
203
+ string: '{"script":"arguments[0].value = ''''","args":[{"ELEMENT":"{315605e6-f92e-4599-be89-fd0e52b89183}"}]}'
204
+ headers:
205
+ Accept:
206
+ - application/json
207
+ Content-Type:
208
+ - application/json; charset=utf-8
209
+ Content-Length:
210
+ - '98'
211
+ Accept-Encoding:
212
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
213
+ User-Agent:
214
+ - Ruby
215
+ response:
216
+ status:
217
+ code: 200
218
+ message: OK
219
+ headers:
220
+ Content-Type:
221
+ - application/json; charset=UTF-8
222
+ Connection:
223
+ - close
224
+ Content-Length:
225
+ - '99'
226
+ Server:
227
+ - httpd.js
228
+ Date:
229
+ - Fri, 29 Mar 2013 16:33:04 GMT
230
+ body:
231
+ encoding: UTF-8
232
+ string: '{"name":"executeScript","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":null}'
233
+ http_version:
234
+ recorded_at: Fri, 29 Mar 2013 16:33:04 GMT
235
+ - request:
236
+ method: post
237
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/element/%7B315605e6-f92e-4599-be89-fd0e52b89183%7D/value
238
+ body:
239
+ encoding: UTF-8
240
+ string: '{"value":["This is a description of a new clip."]}'
241
+ headers:
242
+ Accept:
243
+ - application/json
244
+ Content-Type:
245
+ - application/json; charset=utf-8
246
+ Content-Length:
247
+ - '50'
248
+ Accept-Encoding:
249
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
250
+ User-Agent:
251
+ - Ruby
252
+ response:
253
+ status:
254
+ code: 200
255
+ message: OK
256
+ headers:
257
+ Content-Type:
258
+ - application/json; charset=UTF-8
259
+ Connection:
260
+ - close
261
+ Content-Length:
262
+ - '101'
263
+ Server:
264
+ - httpd.js
265
+ Date:
266
+ - Fri, 29 Mar 2013 16:33:04 GMT
267
+ body:
268
+ encoding: UTF-8
269
+ string: '{"name":"sendKeysToElement","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":""}'
270
+ http_version:
271
+ recorded_at: Fri, 29 Mar 2013 16:33:04 GMT
272
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,114 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/url
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"url":"http://127.0.0.1:60316/admin/kinney_clips"}'
9
+ headers:
10
+ Accept:
11
+ - application/json
12
+ Content-Type:
13
+ - application/json; charset=utf-8
14
+ Content-Length:
15
+ - '51'
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Content-Type:
26
+ - application/json; charset=UTF-8
27
+ Connection:
28
+ - close
29
+ Content-Length:
30
+ - '87'
31
+ Server:
32
+ - httpd.js
33
+ Date:
34
+ - Fri, 29 Mar 2013 16:33:09 GMT
35
+ body:
36
+ encoding: UTF-8
37
+ string: '{"name":"get","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":""}'
38
+ http_version:
39
+ recorded_at: Fri, 29 Mar 2013 16:33:09 GMT
40
+ - request:
41
+ method: post
42
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/elements
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"using":"xpath","value":".//a[./@href][(((./@id = ''New Kinney Clip''
46
+ or contains(normalize-space(string(.)), ''New Kinney Clip'')) or contains(./@title,
47
+ ''New Kinney Clip'')) or .//img[contains(./@alt, ''New Kinney Clip'')])]"}'
48
+ headers:
49
+ Accept:
50
+ - application/json
51
+ Content-Type:
52
+ - application/json; charset=utf-8
53
+ Content-Length:
54
+ - '221'
55
+ Accept-Encoding:
56
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
57
+ User-Agent:
58
+ - Ruby
59
+ response:
60
+ status:
61
+ code: 200
62
+ message: OK
63
+ headers:
64
+ Content-Type:
65
+ - application/json; charset=UTF-8
66
+ Connection:
67
+ - close
68
+ Content-Length:
69
+ - '148'
70
+ Server:
71
+ - httpd.js
72
+ Date:
73
+ - Fri, 29 Mar 2013 16:33:09 GMT
74
+ body:
75
+ encoding: UTF-8
76
+ string: '{"name":"findElements","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":[{"ELEMENT":"{aa9ff149-f9ce-4534-9ded-27de4227327b}"}]}'
77
+ http_version:
78
+ recorded_at: Fri, 29 Mar 2013 16:33:09 GMT
79
+ - request:
80
+ method: post
81
+ uri: http://127.0.0.1:7055/hub/session/5d9963fe-c796-46dd-82b9-86625109bd63/element/%7Baa9ff149-f9ce-4534-9ded-27de4227327b%7D/click
82
+ body:
83
+ encoding: UTF-8
84
+ string: '{}'
85
+ headers:
86
+ Accept:
87
+ - application/json
88
+ Content-Length:
89
+ - '2'
90
+ Accept-Encoding:
91
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
92
+ User-Agent:
93
+ - Ruby
94
+ response:
95
+ status:
96
+ code: 200
97
+ message: OK
98
+ headers:
99
+ Content-Type:
100
+ - application/json; charset=UTF-8
101
+ Connection:
102
+ - close
103
+ Content-Length:
104
+ - '98'
105
+ Server:
106
+ - httpd.js
107
+ Date:
108
+ - Fri, 29 Mar 2013 16:33:10 GMT
109
+ body:
110
+ encoding: UTF-8
111
+ string: '{"name":"clickElement","sessionId":"5d9963fe-c796-46dd-82b9-86625109bd63","status":0,"value":"ok"}'
112
+ http_version:
113
+ recorded_at: Fri, 29 Mar 2013 16:33:10 GMT
114
+ recorded_with: VCR 2.4.0