surveyor 0.7.1 → 0.8.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/VERSION +1 -1
- data/app/controllers/surveyor_controller.rb +3 -4
- data/app/models/answer.rb +1 -2
- data/app/models/dependency.rb +7 -6
- data/app/models/dependency_condition.rb +11 -48
- data/app/models/response.rb +2 -14
- data/app/models/response_set.rb +1 -1
- data/app/models/validation.rb +13 -0
- data/app/models/validation_condition.rb +39 -0
- data/config/routes.rb +3 -3
- data/generators/surveyor/surveyor_generator.rb +1 -1
- data/generators/surveyor/templates/migrate/create_validation_conditions.rb +32 -0
- data/generators/surveyor/templates/migrate/create_validations.rb +20 -0
- data/generators/surveyor/templates/surveys/kitchen_sink_survey.rb +19 -3
- data/lib/surveyor/acts_as_response.rb +33 -0
- data/lib/surveyor.rb +1 -0
- data/script/surveyor/question_group.rb +1 -0
- data/script/surveyor/survey.rb +3 -0
- data/spec/controllers/surveyor_controller_spec.rb +68 -203
- data/spec/factories.rb +58 -25
- data/spec/models/answer_spec.rb +1 -1
- data/spec/models/dependency_condition_spec.rb +47 -64
- data/spec/models/dependency_spec.rb +11 -5
- data/spec/models/question_group_spec.rb +25 -1
- data/spec/models/question_spec.rb +2 -2
- data/spec/models/response_set_spec.rb +10 -25
- data/spec/models/response_spec.rb +11 -46
- data/spec/models/survey_spec.rb +9 -10
- data/spec/models/validation_condition_spec.rb +53 -0
- data/spec/models/validation_spec.rb +32 -0
- data/surveyor.gemspec +11 -2
- metadata +11 -2
data/surveyor.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{surveyor}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.8.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Brian Chamberlain", "Mark Yoon"]
|
12
|
-
s.date = %q{2009-10-
|
12
|
+
s.date = %q{2009-10-23}
|
13
13
|
s.email = %q{yoon@northwestern.edu}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.md"
|
@@ -32,6 +32,8 @@ Gem::Specification.new do |s|
|
|
32
32
|
"app/models/response_set.rb",
|
33
33
|
"app/models/survey.rb",
|
34
34
|
"app/models/survey_section.rb",
|
35
|
+
"app/models/validation.rb",
|
36
|
+
"app/models/validation_condition.rb",
|
35
37
|
"app/views/layouts/surveyor_default.html.erb",
|
36
38
|
"app/views/partials/_answer.html.haml",
|
37
39
|
"app/views/partials/_question.html.haml",
|
@@ -116,6 +118,8 @@ Gem::Specification.new do |s|
|
|
116
118
|
"generators/surveyor/templates/migrate/create_responses.rb",
|
117
119
|
"generators/surveyor/templates/migrate/create_survey_sections.rb",
|
118
120
|
"generators/surveyor/templates/migrate/create_surveys.rb",
|
121
|
+
"generators/surveyor/templates/migrate/create_validation_conditions.rb",
|
122
|
+
"generators/surveyor/templates/migrate/create_validations.rb",
|
119
123
|
"generators/surveyor/templates/surveys/kitchen_sink_survey.rb",
|
120
124
|
"generators/surveyor/templates/tasks/surveyor.rb",
|
121
125
|
"generators/test_surveyor/templates/TESTING_SURVEYOR",
|
@@ -124,6 +128,7 @@ Gem::Specification.new do |s|
|
|
124
128
|
"init.rb",
|
125
129
|
"install.rb",
|
126
130
|
"lib/surveyor.rb",
|
131
|
+
"lib/surveyor/acts_as_response.rb",
|
127
132
|
"lib/surveyor/config.rb",
|
128
133
|
"lib/tasks/surveyor_tasks.rake",
|
129
134
|
"lib/tiny_code.rb",
|
@@ -154,6 +159,8 @@ Gem::Specification.new do |s|
|
|
154
159
|
"spec/models/response_spec.rb",
|
155
160
|
"spec/models/survey_section_spec.rb",
|
156
161
|
"spec/models/survey_spec.rb",
|
162
|
+
"spec/models/validation_condition_spec.rb",
|
163
|
+
"spec/models/validation_spec.rb",
|
157
164
|
"spec/rcov.opts",
|
158
165
|
"spec/spec.opts",
|
159
166
|
"spec/spec_helper.rb",
|
@@ -177,6 +184,8 @@ Gem::Specification.new do |s|
|
|
177
184
|
"spec/models/response_spec.rb",
|
178
185
|
"spec/models/survey_section_spec.rb",
|
179
186
|
"spec/models/survey_spec.rb",
|
187
|
+
"spec/models/validation_condition_spec.rb",
|
188
|
+
"spec/models/validation_spec.rb",
|
180
189
|
"spec/spec_helper.rb"
|
181
190
|
]
|
182
191
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: surveyor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Chamberlain
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2009-10-
|
13
|
+
date: 2009-10-23 00:00:00 -05:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -49,6 +49,8 @@ files:
|
|
49
49
|
- app/models/response_set.rb
|
50
50
|
- app/models/survey.rb
|
51
51
|
- app/models/survey_section.rb
|
52
|
+
- app/models/validation.rb
|
53
|
+
- app/models/validation_condition.rb
|
52
54
|
- app/views/layouts/surveyor_default.html.erb
|
53
55
|
- app/views/partials/_answer.html.haml
|
54
56
|
- app/views/partials/_question.html.haml
|
@@ -133,6 +135,8 @@ files:
|
|
133
135
|
- generators/surveyor/templates/migrate/create_responses.rb
|
134
136
|
- generators/surveyor/templates/migrate/create_survey_sections.rb
|
135
137
|
- generators/surveyor/templates/migrate/create_surveys.rb
|
138
|
+
- generators/surveyor/templates/migrate/create_validation_conditions.rb
|
139
|
+
- generators/surveyor/templates/migrate/create_validations.rb
|
136
140
|
- generators/surveyor/templates/surveys/kitchen_sink_survey.rb
|
137
141
|
- generators/surveyor/templates/tasks/surveyor.rb
|
138
142
|
- generators/test_surveyor/templates/TESTING_SURVEYOR
|
@@ -141,6 +145,7 @@ files:
|
|
141
145
|
- init.rb
|
142
146
|
- install.rb
|
143
147
|
- lib/surveyor.rb
|
148
|
+
- lib/surveyor/acts_as_response.rb
|
144
149
|
- lib/surveyor/config.rb
|
145
150
|
- lib/tasks/surveyor_tasks.rake
|
146
151
|
- lib/tiny_code.rb
|
@@ -171,6 +176,8 @@ files:
|
|
171
176
|
- spec/models/response_spec.rb
|
172
177
|
- spec/models/survey_section_spec.rb
|
173
178
|
- spec/models/survey_spec.rb
|
179
|
+
- spec/models/validation_condition_spec.rb
|
180
|
+
- spec/models/validation_spec.rb
|
174
181
|
- spec/rcov.opts
|
175
182
|
- spec/spec.opts
|
176
183
|
- spec/spec_helper.rb
|
@@ -216,4 +223,6 @@ test_files:
|
|
216
223
|
- spec/models/response_spec.rb
|
217
224
|
- spec/models/survey_section_spec.rb
|
218
225
|
- spec/models/survey_spec.rb
|
226
|
+
- spec/models/validation_condition_spec.rb
|
227
|
+
- spec/models/validation_spec.rb
|
219
228
|
- spec/spec_helper.rb
|