breakpointer-surveyor 0.2.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.
- data/.gitignore +6 -0
- data/MIT-LICENSE +20 -0
- data/README.md +20 -0
- data/Rakefile +57 -0
- data/VERSION +1 -0
- data/app/controllers/answers_controller.rb +87 -0
- data/app/controllers/dependencies_controller.rb +87 -0
- data/app/controllers/dependency_conditions_controller.rb +87 -0
- data/app/controllers/questions_controller.rb +85 -0
- data/app/controllers/sections_controller.rb +87 -0
- data/app/controllers/surveying_controller.rb +139 -0
- data/app/controllers/surveys_controller.rb +87 -0
- data/app/helpers/answers_helper.rb +2 -0
- data/app/helpers/application_helper.rb +3 -0
- data/app/helpers/questions_helper.rb +2 -0
- data/app/helpers/sections_helper.rb +2 -0
- data/app/helpers/survey_form_builder.rb +38 -0
- data/app/helpers/survey_importer_helper.rb +2 -0
- data/app/helpers/surveying_helper.rb +91 -0
- data/app/helpers/surveys_helper.rb +2 -0
- data/app/models/answer.rb +18 -0
- data/app/models/dependency.rb +43 -0
- data/app/models/dependency_condition.rb +76 -0
- data/app/models/question.rb +44 -0
- data/app/models/question_group.rb +5 -0
- data/app/models/response.rb +58 -0
- data/app/models/response_set.rb +174 -0
- data/app/models/survey.rb +54 -0
- data/app/models/survey_section.rb +19 -0
- data/app/models/user.rb +5 -0
- data/app/views/answer_display_types/_any_answer.html.haml +3 -0
- data/app/views/answer_display_types/_any_other_and_string.html.haml +5 -0
- data/app/views/answer_display_types/_any_string.html.haml +4 -0
- data/app/views/answer_display_types/_date.html.haml +3 -0
- data/app/views/answer_display_types/_datetime.html.haml +2 -0
- data/app/views/answer_display_types/_default.html.haml +1 -0
- data/app/views/answer_display_types/_float.html.haml +5 -0
- data/app/views/answer_display_types/_grid_any_answer.html.haml +2 -0
- data/app/views/answer_display_types/_grid_default.html.haml +2 -0
- data/app/views/answer_display_types/_grid_float.html.haml +2 -0
- data/app/views/answer_display_types/_grid_integer.html.haml +2 -0
- data/app/views/answer_display_types/_grid_one_answer.html.haml +2 -0
- data/app/views/answer_display_types/_grid_string.html.haml +2 -0
- data/app/views/answer_display_types/_integer.html.haml +6 -0
- data/app/views/answer_display_types/_one_answer.html.haml +3 -0
- data/app/views/answer_display_types/_one_string.html.haml +6 -0
- data/app/views/answer_display_types/_repeater_integer.html.haml +6 -0
- data/app/views/answer_display_types/_repeater_string.html.haml +7 -0
- data/app/views/answer_display_types/_string.html.haml +7 -0
- data/app/views/answer_display_types/_text.html.haml +6 -0
- data/app/views/answer_display_types/_time.html.haml +2 -0
- data/app/views/layouts/surveys.html.erb +17 -0
- data/app/views/question_display_types/_default.html.haml +12 -0
- data/app/views/question_display_types/_dropdown.html.haml +12 -0
- data/app/views/question_display_types/_grid_default.html.haml +14 -0
- data/app/views/question_display_types/_grid_dropdown.html.haml +15 -0
- data/app/views/question_display_types/_group_default.html.haml +8 -0
- data/app/views/question_display_types/_group_dropdown.html.haml +6 -0
- data/app/views/question_display_types/_image.html.haml +2 -0
- data/app/views/question_display_types/_inline.html.haml +12 -0
- data/app/views/question_display_types/_label.html.haml +4 -0
- data/app/views/question_display_types/_repeater_default.html.haml +10 -0
- data/app/views/question_display_types/_repeater_dropdown.html.haml +8 -0
- data/app/views/question_display_types/_slider.html.haml +17 -0
- data/app/views/question_group_display_types/_default.html.haml +13 -0
- data/app/views/question_group_display_types/_grid.html.haml +24 -0
- data/app/views/question_group_display_types/_repeater.html.haml +20 -0
- data/app/views/surveying/edit.html.haml +38 -0
- data/app/views/surveying/finish.html.haml +1 -0
- data/app/views/surveying/index.html.erb +19 -0
- data/app/views/surveying/new.html.haml +17 -0
- data/app/views/surveying/show.html.haml +8 -0
- data/config/routes.rb +10 -0
- data/generators/surveyor/surveyor_generator.rb +38 -0
- data/generators/surveyor/templates/README +9 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_leftright.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_updown.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_close.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_doc.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_folder_closed.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_folder_open.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_minus.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_plus.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_11x11_icon_resize_se.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_35x9_colorpicker_indicator.gif.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_7x7_arrow_down.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_7x7_arrow_left.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_7x7_arrow_right.gif +0 -0
- data/generators/surveyor/templates/assets/images/222222_7x7_arrow_up.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_leftright.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_updown.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_close.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_doc.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_folder_closed.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_folder_open.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_minus.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_11x11_icon_plus.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_7x7_arrow_down.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_7x7_arrow_left.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_7x7_arrow_right.gif +0 -0
- data/generators/surveyor/templates/assets/images/454545_7x7_arrow_up.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_leftright.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_updown.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_close.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_doc.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_folder_closed.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_folder_open.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_minus.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_11x11_icon_plus.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_7x7_arrow_down.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_7x7_arrow_left.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_7x7_arrow_right.gif +0 -0
- data/generators/surveyor/templates/assets/images/888888_7x7_arrow_up.gif +0 -0
- data/generators/surveyor/templates/assets/images/dadada_40x100_textures_02_glass_75.png +0 -0
- data/generators/surveyor/templates/assets/images/e6e6e6_40x100_textures_02_glass_75.png +0 -0
- data/generators/surveyor/templates/assets/images/ffffff_40x100_textures_01_flat_0.png +0 -0
- data/generators/surveyor/templates/assets/images/ffffff_40x100_textures_02_glass_65.png +0 -0
- data/generators/surveyor/templates/assets/javascripts/accessibleUISlider.jQuery.js +201 -0
- data/generators/surveyor/templates/assets/javascripts/jquery-1.2.6.js +3549 -0
- data/generators/surveyor/templates/assets/javascripts/jquery-ui-personalized-1.5.3.js +7616 -0
- data/generators/surveyor/templates/assets/javascripts/jquery.form.js +637 -0
- data/generators/surveyor/templates/assets/javascripts/surveyor.js +35 -0
- data/generators/surveyor/templates/assets/stylesheets/jquery-ui-slider-additions.css +71 -0
- data/generators/surveyor/templates/assets/stylesheets/reset.css +46 -0
- data/generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass +321 -0
- data/generators/surveyor/templates/assets/stylesheets/surveyor.css +245 -0
- data/generators/surveyor/templates/assets/stylesheets/ui.theme.css +851 -0
- data/generators/surveyor/templates/migrate/create_answers.rb +46 -0
- data/generators/surveyor/templates/migrate/create_dependencies.rb +21 -0
- data/generators/surveyor/templates/migrate/create_dependency_conditions.rb +29 -0
- data/generators/surveyor/templates/migrate/create_question_groups.rb +18 -0
- data/generators/surveyor/templates/migrate/create_questions.rb +33 -0
- data/generators/surveyor/templates/migrate/create_response_sets.rb +22 -0
- data/generators/surveyor/templates/migrate/create_responses.rb +33 -0
- data/generators/surveyor/templates/migrate/create_survey_sections.rb +25 -0
- data/generators/surveyor/templates/migrate/create_surveys.rb +25 -0
- data/generators/surveyor/templates/surveys/kitchen_sink_survey.rb +201 -0
- data/init.rb +1 -0
- data/install.rb +1 -0
- data/lib/tasks/surveyor_tasks.rake +29 -0
- data/lib/tiny_code.rb +58 -0
- data/lib/user_manager.rb +9 -0
- data/lib/xml_formatter.rb +12 -0
- data/script/surveyor/answer.rb +84 -0
- data/script/surveyor/columnizer.rb +36 -0
- data/script/surveyor/dependency.rb +43 -0
- data/script/surveyor/dependency_condition.rb +74 -0
- data/script/surveyor/dslparse.rb +66 -0
- data/script/surveyor/question.rb +76 -0
- data/script/surveyor/question_group.rb +33 -0
- data/script/surveyor/specs/answer_spec.rb +66 -0
- data/script/surveyor/specs/question_dependency_spec.rb +46 -0
- data/script/surveyor/specs/question_group_spec.rb +9 -0
- data/script/surveyor/specs/question_spec.rb +111 -0
- data/script/surveyor/specs/section_spec.rb +58 -0
- data/script/surveyor/survey.rb +108 -0
- data/script/surveyor/survey_section.rb +153 -0
- data/script/surveyor/whr_dsl.tmproj +244 -0
- data/spec/controllers/answers_controller_spec.rb +64 -0
- data/spec/controllers/dependencies_controller_spec.rb +63 -0
- data/spec/controllers/dependency_conditions_controller_spec.rb +64 -0
- data/spec/controllers/questions_controller_spec.rb +64 -0
- data/spec/controllers/sections_controller_spec.rb +64 -0
- data/spec/controllers/surveying_controller_spec.rb +328 -0
- data/spec/controllers/surveying_routing_spec.rb +45 -0
- data/spec/controllers/surveys_controller_spec.rb +64 -0
- data/spec/fixtures/answers.yml +9 -0
- data/spec/fixtures/dependencies.yml +7 -0
- data/spec/fixtures/dependency_conditions.yml +27 -0
- data/spec/fixtures/question_groups.yml +7 -0
- data/spec/fixtures/questions.yml +15 -0
- data/spec/fixtures/response_sets.yml +13 -0
- data/spec/fixtures/responses.yml +9 -0
- data/spec/fixtures/survey_sections.yml +11 -0
- data/spec/fixtures/surveys.yml +9 -0
- data/spec/fixtures/users.yml +7 -0
- data/spec/helpers/survey_importer_helper_spec.rb +11 -0
- data/spec/helpers/surveying_helper_spec.rb +11 -0
- data/spec/models/answer_spec.rb +62 -0
- data/spec/models/dependency_condition_spec.rb +347 -0
- data/spec/models/dependency_spec.rb +82 -0
- data/spec/models/question_group_spec.rb +11 -0
- data/spec/models/question_spec.rb +70 -0
- data/spec/models/response_set_spec.rb +172 -0
- data/spec/models/response_spec.rb +94 -0
- data/spec/models/survey_section_spec.rb +34 -0
- data/spec/models/survey_spec.rb +72 -0
- data/spec/models/user_spec.rb +11 -0
- data/spec/rcov.opts +2 -0
- data/spec/spec.opts +4 -0
- data/spec/spec_helper.rb +72 -0
- data/spec/views/app/edit.html.erb_spec.rb +20 -0
- data/spec/views/app/index.html.erb_spec.rb +19 -0
- data/spec/views/app/new.html.erb_spec.rb +21 -0
- data/spec/views/app/show.html.erb_spec.rb +17 -0
- data/surveyor.gemspec +258 -0
- data/uninstall.rb +1 -0
- metadata +286 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>currentDocument</key>
|
|
6
|
+
<string>whrparse.rb</string>
|
|
7
|
+
<key>documents</key>
|
|
8
|
+
<array>
|
|
9
|
+
<dict>
|
|
10
|
+
<key>expanded</key>
|
|
11
|
+
<true/>
|
|
12
|
+
<key>name</key>
|
|
13
|
+
<string>whr_dsl</string>
|
|
14
|
+
<key>regexFolderFilter</key>
|
|
15
|
+
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
|
|
16
|
+
<key>sourceDirectory</key>
|
|
17
|
+
<string></string>
|
|
18
|
+
</dict>
|
|
19
|
+
</array>
|
|
20
|
+
<key>fileHierarchyDrawerWidth</key>
|
|
21
|
+
<integer>261</integer>
|
|
22
|
+
<key>metaData</key>
|
|
23
|
+
<dict>
|
|
24
|
+
<key>answer.rb</key>
|
|
25
|
+
<dict>
|
|
26
|
+
<key>caret</key>
|
|
27
|
+
<dict>
|
|
28
|
+
<key>column</key>
|
|
29
|
+
<integer>5</integer>
|
|
30
|
+
<key>line</key>
|
|
31
|
+
<integer>54</integer>
|
|
32
|
+
</dict>
|
|
33
|
+
<key>firstVisibleColumn</key>
|
|
34
|
+
<integer>0</integer>
|
|
35
|
+
<key>firstVisibleLine</key>
|
|
36
|
+
<integer>13</integer>
|
|
37
|
+
</dict>
|
|
38
|
+
<key>columnizer.rb</key>
|
|
39
|
+
<dict>
|
|
40
|
+
<key>caret</key>
|
|
41
|
+
<dict>
|
|
42
|
+
<key>column</key>
|
|
43
|
+
<integer>112</integer>
|
|
44
|
+
<key>line</key>
|
|
45
|
+
<integer>3</integer>
|
|
46
|
+
</dict>
|
|
47
|
+
<key>firstVisibleColumn</key>
|
|
48
|
+
<integer>0</integer>
|
|
49
|
+
<key>firstVisibleLine</key>
|
|
50
|
+
<integer>0</integer>
|
|
51
|
+
</dict>
|
|
52
|
+
<key>partials/_checkboxes.rhtml</key>
|
|
53
|
+
<dict>
|
|
54
|
+
<key>caret</key>
|
|
55
|
+
<dict>
|
|
56
|
+
<key>column</key>
|
|
57
|
+
<integer>0</integer>
|
|
58
|
+
<key>line</key>
|
|
59
|
+
<integer>0</integer>
|
|
60
|
+
</dict>
|
|
61
|
+
<key>firstVisibleColumn</key>
|
|
62
|
+
<integer>0</integer>
|
|
63
|
+
<key>firstVisibleLine</key>
|
|
64
|
+
<integer>0</integer>
|
|
65
|
+
</dict>
|
|
66
|
+
<key>partials/_date.rhtml</key>
|
|
67
|
+
<dict>
|
|
68
|
+
<key>caret</key>
|
|
69
|
+
<dict>
|
|
70
|
+
<key>column</key>
|
|
71
|
+
<integer>0</integer>
|
|
72
|
+
<key>line</key>
|
|
73
|
+
<integer>0</integer>
|
|
74
|
+
</dict>
|
|
75
|
+
<key>firstVisibleColumn</key>
|
|
76
|
+
<integer>0</integer>
|
|
77
|
+
<key>firstVisibleLine</key>
|
|
78
|
+
<integer>0</integer>
|
|
79
|
+
</dict>
|
|
80
|
+
<key>question.rb</key>
|
|
81
|
+
<dict>
|
|
82
|
+
<key>caret</key>
|
|
83
|
+
<dict>
|
|
84
|
+
<key>column</key>
|
|
85
|
+
<integer>68</integer>
|
|
86
|
+
<key>line</key>
|
|
87
|
+
<integer>68</integer>
|
|
88
|
+
</dict>
|
|
89
|
+
<key>firstVisibleColumn</key>
|
|
90
|
+
<integer>0</integer>
|
|
91
|
+
<key>firstVisibleLine</key>
|
|
92
|
+
<integer>46</integer>
|
|
93
|
+
</dict>
|
|
94
|
+
<key>registry_code.rb</key>
|
|
95
|
+
<dict>
|
|
96
|
+
<key>caret</key>
|
|
97
|
+
<dict>
|
|
98
|
+
<key>column</key>
|
|
99
|
+
<integer>49</integer>
|
|
100
|
+
<key>line</key>
|
|
101
|
+
<integer>19</integer>
|
|
102
|
+
</dict>
|
|
103
|
+
<key>firstVisibleColumn</key>
|
|
104
|
+
<integer>0</integer>
|
|
105
|
+
<key>firstVisibleLine</key>
|
|
106
|
+
<integer>0</integer>
|
|
107
|
+
</dict>
|
|
108
|
+
<key>section.rb</key>
|
|
109
|
+
<dict>
|
|
110
|
+
<key>caret</key>
|
|
111
|
+
<dict>
|
|
112
|
+
<key>column</key>
|
|
113
|
+
<integer>9</integer>
|
|
114
|
+
<key>line</key>
|
|
115
|
+
<integer>98</integer>
|
|
116
|
+
</dict>
|
|
117
|
+
<key>firstVisibleColumn</key>
|
|
118
|
+
<integer>0</integer>
|
|
119
|
+
<key>firstVisibleLine</key>
|
|
120
|
+
<integer>59</integer>
|
|
121
|
+
</dict>
|
|
122
|
+
<key>section_template.rhtml</key>
|
|
123
|
+
<dict>
|
|
124
|
+
<key>caret</key>
|
|
125
|
+
<dict>
|
|
126
|
+
<key>column</key>
|
|
127
|
+
<integer>134</integer>
|
|
128
|
+
<key>line</key>
|
|
129
|
+
<integer>3</integer>
|
|
130
|
+
</dict>
|
|
131
|
+
<key>firstVisibleColumn</key>
|
|
132
|
+
<integer>0</integer>
|
|
133
|
+
<key>firstVisibleLine</key>
|
|
134
|
+
<integer>0</integer>
|
|
135
|
+
</dict>
|
|
136
|
+
<key>specs/answer_spec.rb</key>
|
|
137
|
+
<dict>
|
|
138
|
+
<key>caret</key>
|
|
139
|
+
<dict>
|
|
140
|
+
<key>column</key>
|
|
141
|
+
<integer>50</integer>
|
|
142
|
+
<key>line</key>
|
|
143
|
+
<integer>24</integer>
|
|
144
|
+
</dict>
|
|
145
|
+
<key>columnSelection</key>
|
|
146
|
+
<false/>
|
|
147
|
+
<key>firstVisibleColumn</key>
|
|
148
|
+
<integer>0</integer>
|
|
149
|
+
<key>firstVisibleLine</key>
|
|
150
|
+
<integer>3</integer>
|
|
151
|
+
<key>selectFrom</key>
|
|
152
|
+
<dict>
|
|
153
|
+
<key>column</key>
|
|
154
|
+
<integer>60</integer>
|
|
155
|
+
<key>line</key>
|
|
156
|
+
<integer>24</integer>
|
|
157
|
+
</dict>
|
|
158
|
+
<key>selectTo</key>
|
|
159
|
+
<dict>
|
|
160
|
+
<key>column</key>
|
|
161
|
+
<integer>50</integer>
|
|
162
|
+
<key>line</key>
|
|
163
|
+
<integer>24</integer>
|
|
164
|
+
</dict>
|
|
165
|
+
</dict>
|
|
166
|
+
<key>specs/question_spec.rb</key>
|
|
167
|
+
<dict>
|
|
168
|
+
<key>caret</key>
|
|
169
|
+
<dict>
|
|
170
|
+
<key>column</key>
|
|
171
|
+
<integer>21</integer>
|
|
172
|
+
<key>line</key>
|
|
173
|
+
<integer>5</integer>
|
|
174
|
+
</dict>
|
|
175
|
+
<key>firstVisibleColumn</key>
|
|
176
|
+
<integer>0</integer>
|
|
177
|
+
<key>firstVisibleLine</key>
|
|
178
|
+
<integer>0</integer>
|
|
179
|
+
</dict>
|
|
180
|
+
<key>specs/section_spec.rb</key>
|
|
181
|
+
<dict>
|
|
182
|
+
<key>caret</key>
|
|
183
|
+
<dict>
|
|
184
|
+
<key>column</key>
|
|
185
|
+
<integer>43</integer>
|
|
186
|
+
<key>line</key>
|
|
187
|
+
<integer>43</integer>
|
|
188
|
+
</dict>
|
|
189
|
+
<key>firstVisibleColumn</key>
|
|
190
|
+
<integer>0</integer>
|
|
191
|
+
<key>firstVisibleLine</key>
|
|
192
|
+
<integer>0</integer>
|
|
193
|
+
</dict>
|
|
194
|
+
<key>specs/whrparse_spec.rb</key>
|
|
195
|
+
<dict>
|
|
196
|
+
<key>caret</key>
|
|
197
|
+
<dict>
|
|
198
|
+
<key>column</key>
|
|
199
|
+
<integer>5</integer>
|
|
200
|
+
<key>line</key>
|
|
201
|
+
<integer>6</integer>
|
|
202
|
+
</dict>
|
|
203
|
+
<key>firstVisibleColumn</key>
|
|
204
|
+
<integer>0</integer>
|
|
205
|
+
<key>firstVisibleLine</key>
|
|
206
|
+
<integer>0</integer>
|
|
207
|
+
</dict>
|
|
208
|
+
<key>whrparse.rb</key>
|
|
209
|
+
<dict>
|
|
210
|
+
<key>caret</key>
|
|
211
|
+
<dict>
|
|
212
|
+
<key>column</key>
|
|
213
|
+
<integer>9</integer>
|
|
214
|
+
<key>line</key>
|
|
215
|
+
<integer>20</integer>
|
|
216
|
+
</dict>
|
|
217
|
+
<key>firstVisibleColumn</key>
|
|
218
|
+
<integer>0</integer>
|
|
219
|
+
<key>firstVisibleLine</key>
|
|
220
|
+
<integer>0</integer>
|
|
221
|
+
</dict>
|
|
222
|
+
</dict>
|
|
223
|
+
<key>openDocuments</key>
|
|
224
|
+
<array>
|
|
225
|
+
<string>registry_code.rb</string>
|
|
226
|
+
<string>whrparse.rb</string>
|
|
227
|
+
<string>specs/answer_spec.rb</string>
|
|
228
|
+
<string>specs/question_spec.rb</string>
|
|
229
|
+
<string>specs/section_spec.rb</string>
|
|
230
|
+
<string>section.rb</string>
|
|
231
|
+
<string>section_template.rhtml</string>
|
|
232
|
+
<string>partials/_date.rhtml</string>
|
|
233
|
+
<string>partials/_checkboxes.rhtml</string>
|
|
234
|
+
<string>columnizer.rb</string>
|
|
235
|
+
<string>specs/whrparse_spec.rb</string>
|
|
236
|
+
<string>question.rb</string>
|
|
237
|
+
<string>answer.rb</string>
|
|
238
|
+
</array>
|
|
239
|
+
<key>showFileHierarchyDrawer</key>
|
|
240
|
+
<true/>
|
|
241
|
+
<key>windowFrame</key>
|
|
242
|
+
<string>{{282, 61}, {1119, 816}}</string>
|
|
243
|
+
</dict>
|
|
244
|
+
</plist>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe AnswersController do
|
|
4
|
+
|
|
5
|
+
describe "REST actions"do
|
|
6
|
+
|
|
7
|
+
it "GETs all answers" do
|
|
8
|
+
@answers = [mock(Answer)]
|
|
9
|
+
Answer.should_receive(:find).and_return(@answers)
|
|
10
|
+
get "index"
|
|
11
|
+
assigns[:answers].should_not be_empty
|
|
12
|
+
assigns[:answers].should == @answers
|
|
13
|
+
response.should be_success
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "GETs one answer" do
|
|
17
|
+
@answer = mock(Answer)
|
|
18
|
+
Answer.should_receive(:find).and_return(@answer)
|
|
19
|
+
get 'show', :id => @answer
|
|
20
|
+
assigns[:answer].should == @answer
|
|
21
|
+
response.should be_success
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "GETs a new answer" do
|
|
25
|
+
get 'new'
|
|
26
|
+
assigns[:answer].should_not be_nil
|
|
27
|
+
response.should be_success
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "POSTs a new answer" do
|
|
31
|
+
@answer = Answer.new()
|
|
32
|
+
@answer.stub!(:new).and_return(true)
|
|
33
|
+
Answer.should_receive(:new).with(@answer.attributes).and_return(@answer)
|
|
34
|
+
post 'create', {:answer => @answer.attributes}
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it "GETs an editable answer" do
|
|
39
|
+
@answer = mock(Answer)
|
|
40
|
+
Answer.should_receive(:find).and_return(@answer)
|
|
41
|
+
|
|
42
|
+
get 'edit', :id => @answer
|
|
43
|
+
assigns[:answer].should == @answer
|
|
44
|
+
response.should be_success
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it "PUTs an editiable answer" do
|
|
48
|
+
@answer = mock(Answer, :title => "test")
|
|
49
|
+
Answer.should_receive(:find).and_return(@answer)
|
|
50
|
+
@answer.stub!(:update_attributes)
|
|
51
|
+
put 'update', :id => @answer
|
|
52
|
+
response.should be_success
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it "DELETEs an existing answer" do
|
|
56
|
+
@answer = mock(Answer)
|
|
57
|
+
@answer.stub!(:destroy)
|
|
58
|
+
Answer.should_receive(:find).with(@answer).and_return(@answer)
|
|
59
|
+
delete 'destroy', :id => @answer
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe DependenciesController do
|
|
4
|
+
|
|
5
|
+
describe "REST actions"do
|
|
6
|
+
|
|
7
|
+
it "GETs all dependencies" do
|
|
8
|
+
@dependencies = [mock(Dependency)]
|
|
9
|
+
Dependency.should_receive(:find).and_return(@dependencies)
|
|
10
|
+
get "index"
|
|
11
|
+
assigns[:dependencies].should_not be_empty
|
|
12
|
+
assigns[:dependencies].should == @dependencies
|
|
13
|
+
response.should be_success
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "GETs one survey" do
|
|
17
|
+
@dependency = mock(Survey)
|
|
18
|
+
Dependency.should_receive(:find).and_return(@dependency)
|
|
19
|
+
get 'show', :id => @dependency
|
|
20
|
+
assigns[:dependency].should == @dependency
|
|
21
|
+
response.should be_success
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "GETs a new survey" do
|
|
25
|
+
get 'new'
|
|
26
|
+
assigns[:dependency].should_not be_nil
|
|
27
|
+
response.should be_success
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "POSTs a new survey" do
|
|
31
|
+
@dependency = Dependency.new()
|
|
32
|
+
@dependency.stub!(:new).and_return(true)
|
|
33
|
+
Dependency.should_receive(:new).with(@dependency.attributes).and_return(@dependency)
|
|
34
|
+
post 'create', {:dependency => @dependency.attributes}
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it "GETs an editable survey" do
|
|
39
|
+
@dependency = mock(Dependency)
|
|
40
|
+
Dependency.should_receive(:find).and_return(@dependency)
|
|
41
|
+
|
|
42
|
+
get 'edit', :id => @dependency
|
|
43
|
+
assigns[:dependency].should == @dependency
|
|
44
|
+
response.should be_success
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it "PUTs an editiable survey" do
|
|
48
|
+
@dependency = mock(Dependency, :title => "test")
|
|
49
|
+
Dependency.should_receive(:find).and_return(@dependency)
|
|
50
|
+
@dependency.stub!(:update_attributes)
|
|
51
|
+
put 'update', :id => @dependency
|
|
52
|
+
response.should be_success
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it "DELETEs an existing survey" do
|
|
56
|
+
@dependency = mock(Dependency)
|
|
57
|
+
@dependency.stub!(:destroy)
|
|
58
|
+
Dependency.should_receive(:find).with(@dependency).and_return(@dependency)
|
|
59
|
+
delete 'destroy', :id => @dependency
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe DependencyConditionsController do
|
|
4
|
+
|
|
5
|
+
describe "REST actions"do
|
|
6
|
+
|
|
7
|
+
it "GETs all dependency_conditions" do
|
|
8
|
+
@dependency_conditions = [mock(DependencyCondition)]
|
|
9
|
+
DependencyCondition.should_receive(:find).and_return(@dependency_conditions)
|
|
10
|
+
get "index"
|
|
11
|
+
assigns[:dependency_conditions].should_not be_empty
|
|
12
|
+
assigns[:dependency_conditions].should == @dependency_conditions
|
|
13
|
+
response.should be_success
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "GETs one dependency_condition" do
|
|
17
|
+
@dependency_condition = mock(DependencyCondition)
|
|
18
|
+
DependencyCondition.should_receive(:find).and_return(@dependency_condition)
|
|
19
|
+
get 'show', :id => @dependency_condition
|
|
20
|
+
assigns[:dependency_condition].should == @dependency_condition
|
|
21
|
+
response.should be_success
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "GETs a new dependency_condition" do
|
|
25
|
+
get 'new'
|
|
26
|
+
assigns[:dependency_condition].should_not be_nil
|
|
27
|
+
response.should be_success
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "POSTs a new dependency_condition" do
|
|
31
|
+
@dependency_condition = DependencyCondition.new()
|
|
32
|
+
@dependency_condition.stub!(:new).and_return(true)
|
|
33
|
+
DependencyCondition.should_receive(:new).with(@dependency_condition.attributes).and_return(@dependency_condition)
|
|
34
|
+
post 'create', {:dependency_condition => @dependency_condition.attributes}
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it "GETs an editable dependency_condition" do
|
|
39
|
+
@dependency_condition = mock(DependencyCondition)
|
|
40
|
+
DependencyCondition.should_receive(:find).and_return(@dependency_condition)
|
|
41
|
+
|
|
42
|
+
get 'edit', :id => @dependency_condition
|
|
43
|
+
assigns[:dependency_condition].should == @dependency_condition
|
|
44
|
+
response.should be_success
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it "PUTs an editiable dependency_condition" do
|
|
48
|
+
@dependency_condition = mock(DependencyCondition, :title => "test")
|
|
49
|
+
DependencyCondition.should_receive(:find).and_return(@dependency_condition)
|
|
50
|
+
@dependency_condition.stub!(:update_attributes)
|
|
51
|
+
put 'update', :id => @dependency_condition
|
|
52
|
+
response.should be_success
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it "DELETEs an existing dependency_condition" do
|
|
56
|
+
@dependency_condition = mock(DependencyCondition)
|
|
57
|
+
@dependency_condition.stub!(:destroy)
|
|
58
|
+
DependencyCondition.should_receive(:find).with(@dependency_condition).and_return(@dependency_condition)
|
|
59
|
+
delete 'destroy', :id => @dependency_condition
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
|
2
|
+
|
|
3
|
+
describe QuestionsController do
|
|
4
|
+
|
|
5
|
+
describe "REST actions"do
|
|
6
|
+
|
|
7
|
+
it "GETs all questions" do
|
|
8
|
+
@questions = [mock(Question)]
|
|
9
|
+
Question.should_receive(:find).and_return(@questions)
|
|
10
|
+
get "index"
|
|
11
|
+
assigns[:questions].should_not be_empty
|
|
12
|
+
assigns[:questions].should == @questions
|
|
13
|
+
response.should be_success
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "GETs one question" do
|
|
17
|
+
@question = mock(Question)
|
|
18
|
+
Question.should_receive(:find).and_return(@question)
|
|
19
|
+
get 'show', :id => @question
|
|
20
|
+
assigns[:question].should == @question
|
|
21
|
+
response.should be_success
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "GETs a new question" do
|
|
25
|
+
get 'new'
|
|
26
|
+
assigns[:question].should_not be_nil
|
|
27
|
+
response.should be_success
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
it "POSTs a new question" do
|
|
31
|
+
@question = Question.new()
|
|
32
|
+
@question.stub!(:new).and_return(true)
|
|
33
|
+
Question.should_receive(:new).with(@question.attributes).and_return(@question)
|
|
34
|
+
post 'create', {:question => @question.attributes}
|
|
35
|
+
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
it "GETs an editable question" do
|
|
39
|
+
@question = mock(Question)
|
|
40
|
+
Question.should_receive(:find).and_return(@question)
|
|
41
|
+
|
|
42
|
+
get 'edit', :id => @question
|
|
43
|
+
assigns[:question].should == @question
|
|
44
|
+
response.should be_success
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
it "PUTs an editiable question" do
|
|
48
|
+
@question = mock(Question, :title => "test")
|
|
49
|
+
Question.should_receive(:find).and_return(@question)
|
|
50
|
+
@question.stub!(:update_attributes)
|
|
51
|
+
put 'update', :id => @question
|
|
52
|
+
response.should be_success
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it "DELETEs an existing question" do
|
|
56
|
+
@question = mock(Question)
|
|
57
|
+
@question.stub!(:destroy)
|
|
58
|
+
Question.should_receive(:find).with(@question).and_return(@question)
|
|
59
|
+
delete 'destroy', :id => @question
|
|
60
|
+
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
end
|
|
64
|
+
end
|