surveyor 0.18.2 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. data/.gitignore +2 -1
  2. data/CHANGELOG +12 -0
  3. data/Rakefile +1 -0
  4. data/VERSION +1 -1
  5. data/app/helpers/surveyor_helper.rb +40 -22
  6. data/app/views/layouts/surveyor_default.html.erb +0 -1
  7. data/app/views/partials/_answer.html.haml +19 -58
  8. data/app/views/partials/_dependents.html.haml +5 -0
  9. data/app/views/partials/_question.html.haml +24 -72
  10. data/app/views/partials/_question_group.html.haml +30 -39
  11. data/app/views/partials/_section.html.haml +10 -11
  12. data/app/views/partials/_section_menu.html.haml +5 -0
  13. data/app/views/surveyor/edit.html.haml +13 -25
  14. data/app/views/surveyor/new.html.haml +6 -3
  15. data/features/{redcap.feature → redcap_parser.feature} +0 -0
  16. data/features/step_definitions/parser_steps.rb +71 -0
  17. data/features/step_definitions/surveyor_steps.rb +8 -78
  18. data/features/support/paths.rb +2 -0
  19. data/features/surveyor.feature +30 -168
  20. data/features/surveyor_parser.feature +157 -0
  21. data/generators/surveyor/surveyor_generator.rb +2 -1
  22. data/generators/surveyor/templates/assets/images/next.gif +0 -0
  23. data/generators/surveyor/templates/assets/images/prev.gif +0 -0
  24. data/generators/surveyor/templates/assets/javascripts/jquery.surveyor.js +46 -0
  25. data/generators/surveyor/templates/assets/javascripts/jquery.tools.min.js +204 -0
  26. data/generators/surveyor/templates/assets/stylesheets/dateinput.css +149 -0
  27. data/generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass +84 -226
  28. data/generators/surveyor/templates/migrate/add_default_value_to_answers.rb +9 -0
  29. data/lib/formtastic/surveyor_builder.rb +83 -0
  30. data/lib/surveyor.rb +5 -0
  31. data/lib/surveyor/models/answer_methods.rb +8 -3
  32. data/lib/surveyor/models/question_group_methods.rb +1 -1
  33. data/lib/surveyor/models/question_methods.rb +6 -2
  34. data/lib/surveyor/models/response_methods.rb +2 -12
  35. data/lib/surveyor/models/response_set_methods.rb +25 -71
  36. data/lib/surveyor/surveyor_controller_methods.rb +29 -28
  37. data/lib/tasks/surveyor_tasks.rake +1 -15
  38. data/spec/controllers/surveyor_controller_spec.rb +40 -8
  39. data/spec/helpers/surveyor_helper_spec.rb +53 -0
  40. data/spec/models/answer_spec.rb +14 -9
  41. data/spec/models/dependency_condition_spec.rb +56 -61
  42. data/spec/models/question_group_spec.rb +3 -3
  43. data/spec/models/question_spec.rb +10 -0
  44. data/spec/models/response_set_spec.rb +72 -62
  45. data/surveyor.gemspec +21 -58
  46. data/testbed/Gemfile +1 -0
  47. metadata +34 -60
  48. data/app/helpers/survey_form_builder.rb +0 -37
  49. data/generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_leftright.gif +0 -0
  50. data/generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_updown.gif +0 -0
  51. data/generators/surveyor/templates/assets/images/222222_11x11_icon_close.gif +0 -0
  52. data/generators/surveyor/templates/assets/images/222222_11x11_icon_doc.gif +0 -0
  53. data/generators/surveyor/templates/assets/images/222222_11x11_icon_folder_closed.gif +0 -0
  54. data/generators/surveyor/templates/assets/images/222222_11x11_icon_folder_open.gif +0 -0
  55. data/generators/surveyor/templates/assets/images/222222_11x11_icon_minus.gif +0 -0
  56. data/generators/surveyor/templates/assets/images/222222_11x11_icon_plus.gif +0 -0
  57. data/generators/surveyor/templates/assets/images/222222_11x11_icon_resize_se.gif +0 -0
  58. data/generators/surveyor/templates/assets/images/222222_35x9_colorpicker_indicator.gif.gif +0 -0
  59. data/generators/surveyor/templates/assets/images/222222_7x7_arrow_down.gif +0 -0
  60. data/generators/surveyor/templates/assets/images/222222_7x7_arrow_left.gif +0 -0
  61. data/generators/surveyor/templates/assets/images/222222_7x7_arrow_right.gif +0 -0
  62. data/generators/surveyor/templates/assets/images/222222_7x7_arrow_up.gif +0 -0
  63. data/generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_leftright.gif +0 -0
  64. data/generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_updown.gif +0 -0
  65. data/generators/surveyor/templates/assets/images/454545_11x11_icon_close.gif +0 -0
  66. data/generators/surveyor/templates/assets/images/454545_11x11_icon_doc.gif +0 -0
  67. data/generators/surveyor/templates/assets/images/454545_11x11_icon_folder_closed.gif +0 -0
  68. data/generators/surveyor/templates/assets/images/454545_11x11_icon_folder_open.gif +0 -0
  69. data/generators/surveyor/templates/assets/images/454545_11x11_icon_minus.gif +0 -0
  70. data/generators/surveyor/templates/assets/images/454545_11x11_icon_plus.gif +0 -0
  71. data/generators/surveyor/templates/assets/images/454545_7x7_arrow_down.gif +0 -0
  72. data/generators/surveyor/templates/assets/images/454545_7x7_arrow_left.gif +0 -0
  73. data/generators/surveyor/templates/assets/images/454545_7x7_arrow_right.gif +0 -0
  74. data/generators/surveyor/templates/assets/images/454545_7x7_arrow_up.gif +0 -0
  75. data/generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_leftright.gif +0 -0
  76. data/generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_updown.gif +0 -0
  77. data/generators/surveyor/templates/assets/images/888888_11x11_icon_close.gif +0 -0
  78. data/generators/surveyor/templates/assets/images/888888_11x11_icon_doc.gif +0 -0
  79. data/generators/surveyor/templates/assets/images/888888_11x11_icon_folder_closed.gif +0 -0
  80. data/generators/surveyor/templates/assets/images/888888_11x11_icon_folder_open.gif +0 -0
  81. data/generators/surveyor/templates/assets/images/888888_11x11_icon_minus.gif +0 -0
  82. data/generators/surveyor/templates/assets/images/888888_11x11_icon_plus.gif +0 -0
  83. data/generators/surveyor/templates/assets/images/888888_7x7_arrow_down.gif +0 -0
  84. data/generators/surveyor/templates/assets/images/888888_7x7_arrow_left.gif +0 -0
  85. data/generators/surveyor/templates/assets/images/888888_7x7_arrow_right.gif +0 -0
  86. data/generators/surveyor/templates/assets/images/888888_7x7_arrow_up.gif +0 -0
  87. data/generators/surveyor/templates/assets/images/dadada_40x100_textures_02_glass_75.png +0 -0
  88. data/generators/surveyor/templates/assets/images/e6e6e6_40x100_textures_02_glass_75.png +0 -0
  89. data/generators/surveyor/templates/assets/images/ffffff_40x100_textures_01_flat_0.png +0 -0
  90. data/generators/surveyor/templates/assets/images/ffffff_40x100_textures_02_glass_65.png +0 -0
  91. data/generators/surveyor/templates/assets/javascripts/accessibleUISlider.jQuery.js +0 -201
  92. data/generators/surveyor/templates/assets/javascripts/jquery-1.2.6.js +0 -3549
  93. data/generators/surveyor/templates/assets/javascripts/jquery-ui-personalized-1.5.3.js +0 -7616
  94. data/generators/surveyor/templates/assets/javascripts/jquery.form.js +0 -637
  95. data/generators/surveyor/templates/assets/javascripts/surveyor.js +0 -40
  96. data/generators/surveyor/templates/assets/stylesheets/jquery-ui-slider-additions.css +0 -71
  97. data/generators/surveyor/templates/assets/stylesheets/ui.theme.css +0 -851
  98. data/spec/views/surveyor/show.html.haml_spec.rb +0 -32
  99. data/uninstall.rb +0 -1
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.18.2"
8
+ s.version = "0.19.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{2011-01-20}
12
+ s.date = %q{2011-01-31}
13
13
  s.email = %q{yoon@northwestern.edu}
14
14
  s.extra_rdoc_files = [
15
15
  "README.md"
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
25
25
  "app/controllers/results_controller.rb",
26
26
  "app/controllers/surveyor_controller.rb",
27
27
  "app/helpers/results_helper.rb",
28
- "app/helpers/survey_form_builder.rb",
29
28
  "app/helpers/surveyor_helper.rb",
30
29
  "app/models/answer.rb",
31
30
  "app/models/dependency.rb",
@@ -42,9 +41,11 @@ Gem::Specification.new do |s|
42
41
  "app/views/layouts/results.html.erb",
43
42
  "app/views/layouts/surveyor_default.html.erb",
44
43
  "app/views/partials/_answer.html.haml",
44
+ "app/views/partials/_dependents.html.haml",
45
45
  "app/views/partials/_question.html.haml",
46
46
  "app/views/partials/_question_group.html.haml",
47
47
  "app/views/partials/_section.html.haml",
48
+ "app/views/partials/_section_menu.html.haml",
48
49
  "app/views/results/index.html.erb",
49
50
  "app/views/results/show.html.erb",
50
51
  "app/views/surveyor/edit.html.haml",
@@ -52,75 +53,34 @@ Gem::Specification.new do |s|
52
53
  "app/views/surveyor/show.html.haml",
53
54
  "ci-env.sh",
54
55
  "config/routes.rb",
55
- "features/redcap.feature",
56
+ "features/redcap_parser.feature",
57
+ "features/step_definitions/parser_steps.rb",
56
58
  "features/step_definitions/surveyor_steps.rb",
57
59
  "features/step_definitions/web_steps.rb",
58
60
  "features/support/REDCapDemoDatabase_DataDictionary.csv",
59
61
  "features/support/env.rb",
60
62
  "features/support/paths.rb",
61
63
  "features/surveyor.feature",
64
+ "features/surveyor_parser.feature",
62
65
  "generators/extend_surveyor/extend_surveyor_generator.rb",
63
66
  "generators/extend_surveyor/templates/EXTENDING_SURVEYOR",
64
67
  "generators/extend_surveyor/templates/extensions/surveyor_controller.rb",
65
68
  "generators/extend_surveyor/templates/extensions/surveyor_custom.html.erb",
66
69
  "generators/surveyor/surveyor_generator.rb",
67
70
  "generators/surveyor/templates/README",
68
- "generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_leftright.gif",
69
- "generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_updown.gif",
70
- "generators/surveyor/templates/assets/images/222222_11x11_icon_close.gif",
71
- "generators/surveyor/templates/assets/images/222222_11x11_icon_doc.gif",
72
- "generators/surveyor/templates/assets/images/222222_11x11_icon_folder_closed.gif",
73
- "generators/surveyor/templates/assets/images/222222_11x11_icon_folder_open.gif",
74
- "generators/surveyor/templates/assets/images/222222_11x11_icon_minus.gif",
75
- "generators/surveyor/templates/assets/images/222222_11x11_icon_plus.gif",
76
- "generators/surveyor/templates/assets/images/222222_11x11_icon_resize_se.gif",
77
- "generators/surveyor/templates/assets/images/222222_35x9_colorpicker_indicator.gif.gif",
78
- "generators/surveyor/templates/assets/images/222222_7x7_arrow_down.gif",
79
- "generators/surveyor/templates/assets/images/222222_7x7_arrow_left.gif",
80
- "generators/surveyor/templates/assets/images/222222_7x7_arrow_right.gif",
81
- "generators/surveyor/templates/assets/images/222222_7x7_arrow_up.gif",
82
- "generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_leftright.gif",
83
- "generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_updown.gif",
84
- "generators/surveyor/templates/assets/images/454545_11x11_icon_close.gif",
85
- "generators/surveyor/templates/assets/images/454545_11x11_icon_doc.gif",
86
- "generators/surveyor/templates/assets/images/454545_11x11_icon_folder_closed.gif",
87
- "generators/surveyor/templates/assets/images/454545_11x11_icon_folder_open.gif",
88
- "generators/surveyor/templates/assets/images/454545_11x11_icon_minus.gif",
89
- "generators/surveyor/templates/assets/images/454545_11x11_icon_plus.gif",
90
- "generators/surveyor/templates/assets/images/454545_7x7_arrow_down.gif",
91
- "generators/surveyor/templates/assets/images/454545_7x7_arrow_left.gif",
92
- "generators/surveyor/templates/assets/images/454545_7x7_arrow_right.gif",
93
- "generators/surveyor/templates/assets/images/454545_7x7_arrow_up.gif",
94
- "generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_leftright.gif",
95
- "generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_updown.gif",
96
- "generators/surveyor/templates/assets/images/888888_11x11_icon_close.gif",
97
- "generators/surveyor/templates/assets/images/888888_11x11_icon_doc.gif",
98
- "generators/surveyor/templates/assets/images/888888_11x11_icon_folder_closed.gif",
99
- "generators/surveyor/templates/assets/images/888888_11x11_icon_folder_open.gif",
100
- "generators/surveyor/templates/assets/images/888888_11x11_icon_minus.gif",
101
- "generators/surveyor/templates/assets/images/888888_11x11_icon_plus.gif",
102
- "generators/surveyor/templates/assets/images/888888_7x7_arrow_down.gif",
103
- "generators/surveyor/templates/assets/images/888888_7x7_arrow_left.gif",
104
- "generators/surveyor/templates/assets/images/888888_7x7_arrow_right.gif",
105
- "generators/surveyor/templates/assets/images/888888_7x7_arrow_up.gif",
106
- "generators/surveyor/templates/assets/images/dadada_40x100_textures_02_glass_75.png",
107
- "generators/surveyor/templates/assets/images/e6e6e6_40x100_textures_02_glass_75.png",
108
- "generators/surveyor/templates/assets/images/ffffff_40x100_textures_01_flat_0.png",
109
- "generators/surveyor/templates/assets/images/ffffff_40x100_textures_02_glass_65.png",
110
- "generators/surveyor/templates/assets/javascripts/accessibleUISlider.jQuery.js",
111
- "generators/surveyor/templates/assets/javascripts/jquery-1.2.6.js",
112
- "generators/surveyor/templates/assets/javascripts/jquery-ui-personalized-1.5.3.js",
113
- "generators/surveyor/templates/assets/javascripts/jquery.form.js",
114
- "generators/surveyor/templates/assets/javascripts/surveyor.js",
115
- "generators/surveyor/templates/assets/stylesheets/jquery-ui-slider-additions.css",
71
+ "generators/surveyor/templates/assets/images/next.gif",
72
+ "generators/surveyor/templates/assets/images/prev.gif",
73
+ "generators/surveyor/templates/assets/javascripts/jquery.surveyor.js",
74
+ "generators/surveyor/templates/assets/javascripts/jquery.tools.min.js",
75
+ "generators/surveyor/templates/assets/stylesheets/dateinput.css",
116
76
  "generators/surveyor/templates/assets/stylesheets/reset.css",
117
77
  "generators/surveyor/templates/assets/stylesheets/results.css",
118
78
  "generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass",
119
- "generators/surveyor/templates/assets/stylesheets/ui.theme.css",
120
79
  "generators/surveyor/templates/locales/surveyor_en.yml",
121
80
  "generators/surveyor/templates/locales/surveyor_es.yml",
122
81
  "generators/surveyor/templates/locales/surveyor_he.yml",
123
82
  "generators/surveyor/templates/migrate/add_correct_answer_id_to_questions.rb",
83
+ "generators/surveyor/templates/migrate/add_default_value_to_answers.rb",
124
84
  "generators/surveyor/templates/migrate/add_display_order_to_surveys.rb",
125
85
  "generators/surveyor/templates/migrate/add_index_to_response_sets.rb",
126
86
  "generators/surveyor/templates/migrate/add_index_to_surveys.rb",
@@ -141,6 +101,7 @@ Gem::Specification.new do |s|
141
101
  "generators/surveyor/templates/tasks/surveyor.rb",
142
102
  "hudson.rakefile",
143
103
  "init_testbed.rakefile",
104
+ "lib/formtastic/surveyor_builder.rb",
144
105
  "lib/surveyor.rb",
145
106
  "lib/surveyor/acts_as_response.rb",
146
107
  "lib/surveyor/common.rb",
@@ -163,6 +124,7 @@ Gem::Specification.new do |s|
163
124
  "rails/init.rb",
164
125
  "spec/controllers/surveyor_controller_spec.rb",
165
126
  "spec/factories.rb",
127
+ "spec/helpers/surveyor_helper_spec.rb",
166
128
  "spec/lib/common_spec.rb",
167
129
  "spec/lib/parser_spec.rb",
168
130
  "spec/lib/redcap_parser_spec.rb",
@@ -181,10 +143,8 @@ Gem::Specification.new do |s|
181
143
  "spec/rcov.opts",
182
144
  "spec/spec.opts",
183
145
  "spec/spec_helper.rb",
184
- "spec/views/surveyor/show.html.haml_spec.rb",
185
146
  "surveyor.gemspec",
186
- "testbed/Gemfile",
187
- "uninstall.rb"
147
+ "testbed/Gemfile"
188
148
  ]
189
149
  s.homepage = %q{http://github.com/breakpointer/surveyor}
190
150
  s.rdoc_options = ["--charset=UTF-8"]
@@ -194,6 +154,7 @@ Gem::Specification.new do |s|
194
154
  s.test_files = [
195
155
  "spec/controllers/surveyor_controller_spec.rb",
196
156
  "spec/factories.rb",
157
+ "spec/helpers/surveyor_helper_spec.rb",
197
158
  "spec/lib/common_spec.rb",
198
159
  "spec/lib/parser_spec.rb",
199
160
  "spec/lib/redcap_parser_spec.rb",
@@ -209,8 +170,7 @@ Gem::Specification.new do |s|
209
170
  "spec/models/survey_spec.rb",
210
171
  "spec/models/validation_condition_spec.rb",
211
172
  "spec/models/validation_spec.rb",
212
- "spec/spec_helper.rb",
213
- "spec/views/surveyor/show.html.haml_spec.rb"
173
+ "spec/spec_helper.rb"
214
174
  ]
215
175
 
216
176
  if s.respond_to? :specification_version then
@@ -220,15 +180,18 @@ Gem::Specification.new do |s|
220
180
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
221
181
  s.add_runtime_dependency(%q<haml>, [">= 0"])
222
182
  s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
183
+ s.add_runtime_dependency(%q<formtastic>, [">= 0"])
223
184
  s.add_development_dependency(%q<yard>, [">= 0"])
224
185
  else
225
186
  s.add_dependency(%q<haml>, [">= 0"])
226
187
  s.add_dependency(%q<fastercsv>, [">= 0"])
188
+ s.add_dependency(%q<formtastic>, [">= 0"])
227
189
  s.add_dependency(%q<yard>, [">= 0"])
228
190
  end
229
191
  else
230
192
  s.add_dependency(%q<haml>, [">= 0"])
231
193
  s.add_dependency(%q<fastercsv>, [">= 0"])
194
+ s.add_dependency(%q<formtastic>, [">= 0"])
232
195
  s.add_dependency(%q<yard>, [">= 0"])
233
196
  end
234
197
  end
data/testbed/Gemfile CHANGED
@@ -9,5 +9,6 @@ gem 'cucumber', '~> 0.8.0'
9
9
  gem 'cucumber-rails'
10
10
  gem 'database_cleaner'
11
11
  gem 'factory_girl'
12
+ gem 'formtastic'
12
13
 
13
14
  gem 'surveyor', :path => ".."
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 18
9
- - 2
10
- version: 0.18.2
8
+ - 19
9
+ - 0
10
+ version: 0.19.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Brian Chamberlain
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-01-20 00:00:00 -06:00
19
+ date: 2011-01-31 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -48,7 +48,7 @@ dependencies:
48
48
  type: :runtime
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
51
- name: yard
51
+ name: formtastic
52
52
  prerelease: false
53
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
54
  none: false
@@ -59,8 +59,22 @@ dependencies:
59
59
  segments:
60
60
  - 0
61
61
  version: "0"
62
- type: :development
62
+ type: :runtime
63
63
  version_requirements: *id003
64
+ - !ruby/object:Gem::Dependency
65
+ name: yard
66
+ prerelease: false
67
+ requirement: &id004 !ruby/object:Gem::Requirement
68
+ none: false
69
+ requirements:
70
+ - - ">="
71
+ - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
75
+ version: "0"
76
+ type: :development
77
+ version_requirements: *id004
64
78
  description:
65
79
  email: yoon@northwestern.edu
66
80
  executables: []
@@ -80,7 +94,6 @@ files:
80
94
  - app/controllers/results_controller.rb
81
95
  - app/controllers/surveyor_controller.rb
82
96
  - app/helpers/results_helper.rb
83
- - app/helpers/survey_form_builder.rb
84
97
  - app/helpers/surveyor_helper.rb
85
98
  - app/models/answer.rb
86
99
  - app/models/dependency.rb
@@ -97,9 +110,11 @@ files:
97
110
  - app/views/layouts/results.html.erb
98
111
  - app/views/layouts/surveyor_default.html.erb
99
112
  - app/views/partials/_answer.html.haml
113
+ - app/views/partials/_dependents.html.haml
100
114
  - app/views/partials/_question.html.haml
101
115
  - app/views/partials/_question_group.html.haml
102
116
  - app/views/partials/_section.html.haml
117
+ - app/views/partials/_section_menu.html.haml
103
118
  - app/views/results/index.html.erb
104
119
  - app/views/results/show.html.erb
105
120
  - app/views/surveyor/edit.html.haml
@@ -107,75 +122,34 @@ files:
107
122
  - app/views/surveyor/show.html.haml
108
123
  - ci-env.sh
109
124
  - config/routes.rb
110
- - features/redcap.feature
125
+ - features/redcap_parser.feature
126
+ - features/step_definitions/parser_steps.rb
111
127
  - features/step_definitions/surveyor_steps.rb
112
128
  - features/step_definitions/web_steps.rb
113
129
  - features/support/REDCapDemoDatabase_DataDictionary.csv
114
130
  - features/support/env.rb
115
131
  - features/support/paths.rb
116
132
  - features/surveyor.feature
133
+ - features/surveyor_parser.feature
117
134
  - generators/extend_surveyor/extend_surveyor_generator.rb
118
135
  - generators/extend_surveyor/templates/EXTENDING_SURVEYOR
119
136
  - generators/extend_surveyor/templates/extensions/surveyor_controller.rb
120
137
  - generators/extend_surveyor/templates/extensions/surveyor_custom.html.erb
121
138
  - generators/surveyor/surveyor_generator.rb
122
139
  - generators/surveyor/templates/README
123
- - generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_leftright.gif
124
- - generators/surveyor/templates/assets/images/222222_11x11_icon_arrows_updown.gif
125
- - generators/surveyor/templates/assets/images/222222_11x11_icon_close.gif
126
- - generators/surveyor/templates/assets/images/222222_11x11_icon_doc.gif
127
- - generators/surveyor/templates/assets/images/222222_11x11_icon_folder_closed.gif
128
- - generators/surveyor/templates/assets/images/222222_11x11_icon_folder_open.gif
129
- - generators/surveyor/templates/assets/images/222222_11x11_icon_minus.gif
130
- - generators/surveyor/templates/assets/images/222222_11x11_icon_plus.gif
131
- - generators/surveyor/templates/assets/images/222222_11x11_icon_resize_se.gif
132
- - generators/surveyor/templates/assets/images/222222_35x9_colorpicker_indicator.gif.gif
133
- - generators/surveyor/templates/assets/images/222222_7x7_arrow_down.gif
134
- - generators/surveyor/templates/assets/images/222222_7x7_arrow_left.gif
135
- - generators/surveyor/templates/assets/images/222222_7x7_arrow_right.gif
136
- - generators/surveyor/templates/assets/images/222222_7x7_arrow_up.gif
137
- - generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_leftright.gif
138
- - generators/surveyor/templates/assets/images/454545_11x11_icon_arrows_updown.gif
139
- - generators/surveyor/templates/assets/images/454545_11x11_icon_close.gif
140
- - generators/surveyor/templates/assets/images/454545_11x11_icon_doc.gif
141
- - generators/surveyor/templates/assets/images/454545_11x11_icon_folder_closed.gif
142
- - generators/surveyor/templates/assets/images/454545_11x11_icon_folder_open.gif
143
- - generators/surveyor/templates/assets/images/454545_11x11_icon_minus.gif
144
- - generators/surveyor/templates/assets/images/454545_11x11_icon_plus.gif
145
- - generators/surveyor/templates/assets/images/454545_7x7_arrow_down.gif
146
- - generators/surveyor/templates/assets/images/454545_7x7_arrow_left.gif
147
- - generators/surveyor/templates/assets/images/454545_7x7_arrow_right.gif
148
- - generators/surveyor/templates/assets/images/454545_7x7_arrow_up.gif
149
- - generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_leftright.gif
150
- - generators/surveyor/templates/assets/images/888888_11x11_icon_arrows_updown.gif
151
- - generators/surveyor/templates/assets/images/888888_11x11_icon_close.gif
152
- - generators/surveyor/templates/assets/images/888888_11x11_icon_doc.gif
153
- - generators/surveyor/templates/assets/images/888888_11x11_icon_folder_closed.gif
154
- - generators/surveyor/templates/assets/images/888888_11x11_icon_folder_open.gif
155
- - generators/surveyor/templates/assets/images/888888_11x11_icon_minus.gif
156
- - generators/surveyor/templates/assets/images/888888_11x11_icon_plus.gif
157
- - generators/surveyor/templates/assets/images/888888_7x7_arrow_down.gif
158
- - generators/surveyor/templates/assets/images/888888_7x7_arrow_left.gif
159
- - generators/surveyor/templates/assets/images/888888_7x7_arrow_right.gif
160
- - generators/surveyor/templates/assets/images/888888_7x7_arrow_up.gif
161
- - generators/surveyor/templates/assets/images/dadada_40x100_textures_02_glass_75.png
162
- - generators/surveyor/templates/assets/images/e6e6e6_40x100_textures_02_glass_75.png
163
- - generators/surveyor/templates/assets/images/ffffff_40x100_textures_01_flat_0.png
164
- - generators/surveyor/templates/assets/images/ffffff_40x100_textures_02_glass_65.png
165
- - generators/surveyor/templates/assets/javascripts/accessibleUISlider.jQuery.js
166
- - generators/surveyor/templates/assets/javascripts/jquery-1.2.6.js
167
- - generators/surveyor/templates/assets/javascripts/jquery-ui-personalized-1.5.3.js
168
- - generators/surveyor/templates/assets/javascripts/jquery.form.js
169
- - generators/surveyor/templates/assets/javascripts/surveyor.js
170
- - generators/surveyor/templates/assets/stylesheets/jquery-ui-slider-additions.css
140
+ - generators/surveyor/templates/assets/images/next.gif
141
+ - generators/surveyor/templates/assets/images/prev.gif
142
+ - generators/surveyor/templates/assets/javascripts/jquery.surveyor.js
143
+ - generators/surveyor/templates/assets/javascripts/jquery.tools.min.js
144
+ - generators/surveyor/templates/assets/stylesheets/dateinput.css
171
145
  - generators/surveyor/templates/assets/stylesheets/reset.css
172
146
  - generators/surveyor/templates/assets/stylesheets/results.css
173
147
  - generators/surveyor/templates/assets/stylesheets/sass/surveyor.sass
174
- - generators/surveyor/templates/assets/stylesheets/ui.theme.css
175
148
  - generators/surveyor/templates/locales/surveyor_en.yml
176
149
  - generators/surveyor/templates/locales/surveyor_es.yml
177
150
  - generators/surveyor/templates/locales/surveyor_he.yml
178
151
  - generators/surveyor/templates/migrate/add_correct_answer_id_to_questions.rb
152
+ - generators/surveyor/templates/migrate/add_default_value_to_answers.rb
179
153
  - generators/surveyor/templates/migrate/add_display_order_to_surveys.rb
180
154
  - generators/surveyor/templates/migrate/add_index_to_response_sets.rb
181
155
  - generators/surveyor/templates/migrate/add_index_to_surveys.rb
@@ -196,6 +170,7 @@ files:
196
170
  - generators/surveyor/templates/tasks/surveyor.rb
197
171
  - hudson.rakefile
198
172
  - init_testbed.rakefile
173
+ - lib/formtastic/surveyor_builder.rb
199
174
  - lib/surveyor.rb
200
175
  - lib/surveyor/acts_as_response.rb
201
176
  - lib/surveyor/common.rb
@@ -218,6 +193,7 @@ files:
218
193
  - rails/init.rb
219
194
  - spec/controllers/surveyor_controller_spec.rb
220
195
  - spec/factories.rb
196
+ - spec/helpers/surveyor_helper_spec.rb
221
197
  - spec/lib/common_spec.rb
222
198
  - spec/lib/parser_spec.rb
223
199
  - spec/lib/redcap_parser_spec.rb
@@ -236,10 +212,8 @@ files:
236
212
  - spec/rcov.opts
237
213
  - spec/spec.opts
238
214
  - spec/spec_helper.rb
239
- - spec/views/surveyor/show.html.haml_spec.rb
240
215
  - surveyor.gemspec
241
216
  - testbed/Gemfile
242
- - uninstall.rb
243
217
  has_rdoc: true
244
218
  homepage: http://github.com/breakpointer/surveyor
245
219
  licenses: []
@@ -277,6 +251,7 @@ summary: A rails (gem) plugin to enable surveys in your application
277
251
  test_files:
278
252
  - spec/controllers/surveyor_controller_spec.rb
279
253
  - spec/factories.rb
254
+ - spec/helpers/surveyor_helper_spec.rb
280
255
  - spec/lib/common_spec.rb
281
256
  - spec/lib/parser_spec.rb
282
257
  - spec/lib/redcap_parser_spec.rb
@@ -293,4 +268,3 @@ test_files:
293
268
  - spec/models/validation_condition_spec.rb
294
269
  - spec/models/validation_spec.rb
295
270
  - spec/spec_helper.rb
296
- - spec/views/surveyor/show.html.haml_spec.rb
@@ -1,37 +0,0 @@
1
- class SurveyFormBuilder < ActionView::Helpers::FormBuilder
2
- def survey_check_box(method, options = {}, checked_value = "1", unchecked_value = "0")
3
- fields = @template.survey_check_box(@object_name, method, options.merge(:object => @object), checked_value, unchecked_value)
4
- fields[1]
5
- end
6
- end
7
-
8
- module ActionView
9
- module Helpers
10
- module FormHelper
11
- def survey_check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
12
- if (Rails::VERSION::STRING.to_f > 2.1)
13
- InstanceTag.new(object_name, method, self, options.delete(:object)).to_survey_check_box_tag(options, checked_value, unchecked_value)
14
- else
15
- InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_survey_check_box_tag(options, checked_value, unchecked_value)
16
- end
17
- end
18
- end
19
-
20
- class InstanceTag
21
- def to_survey_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0")
22
- options = options.stringify_keys
23
- options["type"] = "checkbox"
24
- options["value"] = checked_value
25
- if options.has_key?("checked")
26
- cv = options.delete "checked"
27
- checked = cv == true || cv == "checked"
28
- else
29
- checked = self.class.check_box_checked?(value(object), checked_value)
30
- end
31
- options["checked"] = "checked" if checked
32
- add_default_name_and_id(options)
33
- [tag("input", "name" => options["name"], "type" => "hidden", "value" => unchecked_value), tag("input", options)]
34
- end
35
- end
36
- end
37
- end