surveyor 0.18.0 → 0.18.1

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.
Files changed (40) hide show
  1. data/.gitignore +21 -4
  2. data/CHANGELOG +19 -0
  3. data/README.md +2 -3
  4. data/Rakefile +6 -93
  5. data/VERSION +1 -1
  6. data/ci-env.sh +29 -0
  7. data/features/step_definitions/surveyor_steps.rb +11 -1
  8. data/features/step_definitions/web_steps.rb +62 -54
  9. data/features/support/env.rb +40 -2
  10. data/features/support/paths.rb +12 -4
  11. data/features/surveyor.feature +34 -0
  12. data/generators/surveyor/surveyor_generator.rb +1 -1
  13. data/hudson.rakefile +33 -0
  14. data/init_testbed.rakefile +55 -0
  15. data/lib/surveyor/models/answer_methods.rb +9 -5
  16. data/lib/surveyor/models/dependency_condition_methods.rb +12 -7
  17. data/lib/surveyor/models/dependency_methods.rb +12 -7
  18. data/lib/surveyor/models/question_methods.rb +11 -6
  19. data/lib/surveyor/models/response_methods.rb +9 -4
  20. data/lib/surveyor/models/response_set_methods.rb +11 -6
  21. data/lib/surveyor/models/survey_methods.rb +9 -4
  22. data/lib/surveyor/models/survey_section_methods.rb +10 -5
  23. data/lib/surveyor/models/validation_condition_methods.rb +13 -8
  24. data/lib/surveyor/models/validation_methods.rb +11 -6
  25. data/lib/surveyor/parser.rb +7 -10
  26. data/lib/surveyor/redcap_parser.rb +2 -9
  27. data/lib/surveyor/unparser.rb +10 -9
  28. data/rails/init.rb +1 -0
  29. data/spec/rcov.opts +1 -1
  30. data/spec/spec_helper.rb +50 -15
  31. data/surveyor.gemspec +9 -54
  32. data/testbed/Gemfile +13 -0
  33. metadata +22 -99
  34. data/Gemfile +0 -17
  35. data/Gemfile.lock +0 -86
  36. data/init.rb +0 -1
  37. data/install.rb +0 -1
  38. data/spec/test_Gemfile +0 -15
  39. data/spec/test_boot.rb +0 -128
  40. data/spec/test_preinitializer.rb +0 -21
@@ -1,3 +1,4 @@
1
+ %w(survey survey_section question_group question dependency dependency_condition answer validation validation_condition).each {|model| require model }
1
2
  module Surveyor
2
3
  class Parser
3
4
  # Attributes
@@ -66,7 +67,6 @@ end
66
67
  # Surveyor models with extra parsing methods
67
68
  class Survey < ActiveRecord::Base
68
69
  # block
69
- include Surveyor::Models::SurveyMethods
70
70
 
71
71
  def self.parse_and_build(context, args, original_method, reference_identifier)
72
72
  # clear context
@@ -87,7 +87,6 @@ class Survey < ActiveRecord::Base
87
87
  end
88
88
  class SurveySection < ActiveRecord::Base
89
89
  # block
90
- include Surveyor::Models::SurveySectionMethods
91
90
 
92
91
  def self.parse_and_build(context, args, original_method, reference_identifier)
93
92
  # clear context
@@ -103,7 +102,6 @@ class SurveySection < ActiveRecord::Base
103
102
  end
104
103
  class QuestionGroup < ActiveRecord::Base
105
104
  # block
106
- include Surveyor::Models::QuestionGroupMethods
107
105
 
108
106
  def self.parse_and_build(context, args, original_method, reference_identifier)
109
107
  # clear context
@@ -120,7 +118,6 @@ class QuestionGroup < ActiveRecord::Base
120
118
  end
121
119
  class Question < ActiveRecord::Base
122
120
  # nonblock
123
- include Surveyor::Models::QuestionMethods
124
121
 
125
122
  def self.parse_and_build(context, args, original_method, reference_identifier)
126
123
  # clear context
@@ -141,6 +138,7 @@ class Question < ActiveRecord::Base
141
138
  if context[:question_group] && context[:question_group].display_type == "grid"
142
139
  (context[:grid_answers] || []).each do |grid_answer|
143
140
  a = context[:question].answers.build(grid_answer.attributes)
141
+ context[:answer_references][reference_identifier] ||= {} unless reference_identifier.blank?
144
142
  context[:answer_references][reference_identifier][grid_answer.reference_identifier] = a unless reference_identifier.blank? or grid_answer.reference_identifier.blank?
145
143
  end
146
144
  end
@@ -148,19 +146,21 @@ class Question < ActiveRecord::Base
148
146
  end
149
147
  class Dependency < ActiveRecord::Base
150
148
  # nonblock
151
- include Surveyor::Models::DependencyMethods
152
149
 
153
150
  def self.parse_and_build(context, args, original_method, reference_identifier)
154
151
  # clear context
155
152
  context.delete_if{|k,v| %w(dependency dependency_condition).map(&:to_sym).include? k}
156
153
 
157
154
  # build and set context
158
- context[:dependency] = context[:question].build_dependency({ :question_group => context[:question_group]}.merge(args[0] || {}))
155
+ if context[:question]
156
+ context[:dependency] = context[:question].build_dependency({:question_group => context[:question_group]}.merge(args[0] || {}))
157
+ elsif context[:question_group]
158
+ context[:dependency] = context[:question_group].build_dependency(args[0] || {})
159
+ end
159
160
  end
160
161
  end
161
162
  class DependencyCondition < ActiveRecord::Base
162
163
  # nonblock
163
- include Surveyor::Models::DependencyConditionMethods
164
164
 
165
165
  attr_accessor :question_reference, :answer_reference, :context_reference
166
166
  before_save :resolve_references
@@ -197,7 +197,6 @@ end
197
197
 
198
198
  class Answer < ActiveRecord::Base
199
199
  # nonblock
200
- include Surveyor::Models::AnswerMethods
201
200
 
202
201
  def self.parse_and_build(context, args, original_method, reference_identifier)
203
202
  # clear context
@@ -249,7 +248,6 @@ class Answer < ActiveRecord::Base
249
248
  end
250
249
  class Validation < ActiveRecord::Base
251
250
  # nonblock
252
- include Surveyor::Models::ValidationMethods
253
251
 
254
252
  def self.parse_and_build(context, args, original_method, reference_identifier)
255
253
  # clear context
@@ -261,7 +259,6 @@ class Validation < ActiveRecord::Base
261
259
  end
262
260
  class ValidationCondition < ActiveRecord::Base
263
261
  # nonblock
264
- include Surveyor::Models::ValidationConditionMethods
265
262
 
266
263
  def self.parse_and_build(context, args, original_method, reference_identifier)
267
264
  # clear context
@@ -1,3 +1,4 @@
1
+ %w(survey survey_section question_group question dependency dependency_condition answer validation validation_condition).each {|model| require model }
1
2
  require 'fastercsv'
2
3
  require 'active_support' # for humanize
3
4
  module Surveyor
@@ -50,10 +51,8 @@ end
50
51
 
51
52
  # Surveyor models with extra parsing methods
52
53
  class Survey < ActiveRecord::Base
53
- include Surveyor::Models::SurveyMethods
54
54
  end
55
55
  class SurveySection < ActiveRecord::Base
56
- include Surveyor::Models::SurveySectionMethods
57
56
  def self.build_or_set(context, r)
58
57
  unless context[:survey_section] && context[:survey_section].reference_identifier == r[:form_name]
59
58
  if match = context[:survey].sections.detect{|ss| ss.reference_identifier == r[:form_name]}
@@ -66,10 +65,8 @@ class SurveySection < ActiveRecord::Base
66
65
  end
67
66
  end
68
67
  class QuestionGroup < ActiveRecord::Base
69
- include Surveyor::Models::QuestionGroupMethods
70
68
  end
71
69
  class Question < ActiveRecord::Base
72
- include Surveyor::Models::QuestionMethods
73
70
  def self.build_and_set(context, r)
74
71
  if !r[:section_header].blank?
75
72
  context[:survey_section].questions.build({:display_type => "label", :text => r[:section_header]})
@@ -93,7 +90,6 @@ class Question < ActiveRecord::Base
93
90
  end
94
91
  end
95
92
  class Dependency < ActiveRecord::Base
96
- include Surveyor::Models::DependencyMethods
97
93
  def self.build_and_set(context, r)
98
94
  unless (bl = r[:branching_logic_show_field_only_if]).blank?
99
95
  # TODO: forgot to tie rule key to component, counting on the sequence of components
@@ -150,10 +146,10 @@ class Dependency < ActiveRecord::Base
150
146
  end
151
147
  end
152
148
  class DependencyCondition < ActiveRecord::Base
153
- include Surveyor::Models::DependencyConditionMethods
154
149
  attr_accessor :question_reference, :answer_reference, :lookup_reference
155
150
  before_save :resolve_references
156
151
  def resolve_references
152
+ return unless lookup_reference
157
153
  print "resolve(#{question_reference},#{answer_reference})"
158
154
  if row = lookup_reference.find{|r| r[0] == question_reference and r[1] == answer_reference}
159
155
  print "...found "
@@ -165,7 +161,6 @@ class DependencyCondition < ActiveRecord::Base
165
161
  end
166
162
  end
167
163
  class Answer < ActiveRecord::Base
168
- include Surveyor::Models::AnswerMethods
169
164
  def self.build_and_set(context, r)
170
165
  r[:choices_or_calculations].to_s.split("|").each do |pair|
171
166
  aref, atext = pair.strip.split(", ")
@@ -184,7 +179,6 @@ class Answer < ActiveRecord::Base
184
179
  end
185
180
  end
186
181
  class Validation < ActiveRecord::Base
187
- include Surveyor::Models::ValidationMethods
188
182
  def self.build_and_set(context, r)
189
183
  # text_validation_type text_validation_min text_validation_max
190
184
  min = r[:text_validation_min].to_s.blank? ? nil : r[:text_validation_min].to_s
@@ -229,5 +223,4 @@ class Validation < ActiveRecord::Base
229
223
 
230
224
  end
231
225
  class ValidationCondition < ActiveRecord::Base
232
- include Surveyor::Models::ValidationConditionMethods
233
226
  end
@@ -1,3 +1,4 @@
1
+ %w(survey survey_section question_group question dependency dependency_condition answer validation validation_condition).each {|model| require model }
1
2
  module Surveyor
2
3
  class Unparser
3
4
  # Class methods
@@ -11,7 +12,7 @@ end
11
12
  # Surveyor models with extra parsing methods
12
13
  class Survey < ActiveRecord::Base
13
14
  # block
14
- include Surveyor::Models::SurveyMethods
15
+
15
16
  def unparse(dsl)
16
17
  attrs = (self.attributes.diff Survey.new(:title => title).attributes).delete_if{|k,v| %w(created_at updated_at inactive_at id title access_code).include? k}.symbolize_keys!
17
18
  dsl << "survey \"#{title}\""
@@ -22,7 +23,7 @@ class Survey < ActiveRecord::Base
22
23
  end
23
24
  class SurveySection < ActiveRecord::Base
24
25
  # block
25
- include Surveyor::Models::SurveySectionMethods
26
+
26
27
  def unparse(dsl)
27
28
  attrs = (self.attributes.diff SurveySection.new(:title => title).attributes).delete_if{|k,v| %w(created_at updated_at id survey_id).include? k}.symbolize_keys!
28
29
  group_questions = []
@@ -45,7 +46,7 @@ class SurveySection < ActiveRecord::Base
45
46
  end
46
47
  class QuestionGroup < ActiveRecord::Base
47
48
  # block
48
- include Surveyor::Models::QuestionGroupMethods
49
+
49
50
  def unparse(dsl)
50
51
  attrs = (self.attributes.diff QuestionGroup.new(:text => text).attributes).delete_if{|k,v| %w(created_at updated_at id).include?(k) or (k == "display_type" && %w(grid repeater default).include?(v))}.symbolize_keys!
51
52
  method = (%w(grid repeater).include?(display_type) ? display_type : "group")
@@ -59,7 +60,7 @@ class QuestionGroup < ActiveRecord::Base
59
60
  end
60
61
  class Question < ActiveRecord::Base
61
62
  # nonblock
62
- include Surveyor::Models::QuestionMethods
63
+
63
64
  def unparse(dsl)
64
65
  attrs = (self.attributes.diff Question.new(:text => text).attributes).delete_if{|k,v| %w(created_at updated_at reference_identifier id survey_section_id question_group_id).include?(k) or (k == "display_type" && v == "label")}.symbolize_keys!
65
66
  dsl << (solo? ? "\n" : " ")
@@ -79,7 +80,7 @@ class Question < ActiveRecord::Base
79
80
  end
80
81
  class Dependency < ActiveRecord::Base
81
82
  # nonblock
82
- include Surveyor::Models::DependencyMethods
83
+
83
84
  def unparse(dsl)
84
85
  attrs = (self.attributes.diff Dependency.new.attributes).delete_if{|k,v| %w(created_at updated_at id question_id).include?(k) }.symbolize_keys!
85
86
  dsl << " " if question.part_of_group?
@@ -90,7 +91,7 @@ class Dependency < ActiveRecord::Base
90
91
  end
91
92
  class DependencyCondition < ActiveRecord::Base
92
93
  # nonblock
93
- include Surveyor::Models::DependencyConditionMethods
94
+
94
95
  def unparse(dsl)
95
96
  attrs = (self.attributes.diff Dependency.new.attributes).delete_if{|k,v| %w(created_at updated_at question_id question_group_id rule_key rule operator id dependency_id answer_id).include? k}.symbolize_keys!
96
97
  dsl << " " if dependency.question.part_of_group?
@@ -102,7 +103,7 @@ class DependencyCondition < ActiveRecord::Base
102
103
  end
103
104
  class Answer < ActiveRecord::Base
104
105
  # nonblock
105
- include Surveyor::Models::AnswerMethods
106
+
106
107
  def unparse(dsl)
107
108
  attrs = (self.attributes.diff Answer.new(:text => text).attributes).delete_if{|k,v| %w(created_at updated_at reference_identifier response_class id question_id).include? k}.symbolize_keys!
108
109
  attrs.delete(:is_exclusive) if text == "Omit" && is_exclusive == true
@@ -123,7 +124,7 @@ class Answer < ActiveRecord::Base
123
124
  end
124
125
  class Validation < ActiveRecord::Base
125
126
  # nonblock
126
- include Surveyor::Models::ValidationMethods
127
+
127
128
  def unparse(dsl)
128
129
  attrs = (self.attributes.diff Validation.new.attributes).delete_if{|k,v| %w(created_at updated_at id answer_id).include?(k) }.symbolize_keys!
129
130
  dsl << " " if answer.question.part_of_group?
@@ -134,7 +135,7 @@ class Validation < ActiveRecord::Base
134
135
  end
135
136
  class ValidationCondition < ActiveRecord::Base
136
137
  # nonblock
137
- include Surveyor::Models::ValidationConditionMethods
138
+
138
139
  def unparse(dsl)
139
140
  attrs = (self.attributes.diff ValidationCondition.new.attributes).delete_if{|k,v| %w(created_at updated_at operator rule_key id validation_id).include? k}.symbolize_keys!
140
141
  dsl << " " if validation.answer.question.part_of_group?
data/rails/init.rb CHANGED
@@ -1 +1,2 @@
1
+ # For Rails 2.3 gem engine to work
1
2
  require 'surveyor'
data/spec/rcov.opts CHANGED
@@ -1,2 +1,2 @@
1
- --exclude "spec/*,gems/*"
1
+ --exclude "spec/*,gems/*"
2
2
  --rails
data/spec/spec_helper.rb CHANGED
@@ -1,20 +1,55 @@
1
+ # This file is copied to ~/spec when you run 'ruby script/generate rspec'
2
+ # from the project root directory.
3
+ ENV["RAILS_ENV"] ||= 'test'
4
+ require File.expand_path(File.join(File.dirname(__FILE__),'..','testbed','config','environment'))
5
+ require 'spec/autorun'
6
+ require 'spec/rails'
7
+ require 'factories'
1
8
 
2
- require 'rubygems'
3
- require 'bundler'
4
- Bundler.setup
9
+ # Uncomment the next line to use webrat's matchers
10
+ #require 'webrat/integrations/rspec-rails'
5
11
 
6
- require "spec"
7
-
8
- $LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
9
-
10
-
11
- this_dir = File.dirname(__FILE__)
12
- raise "Alert! Run the rake task to install the test Rails app. It seems to be missing." unless File.directory?(File.join(this_dir,'test_app/spec'))
13
- require File.join(this_dir, 'test_app/spec/spec_helper')
14
- require File.join(this_dir, '/factories')
15
-
16
- require 'surveyor'
17
- require 'surveyor/parser'
12
+ # Requires supporting files with custom matchers and macros, etc,
13
+ # in ./support/ and its subdirectories.
14
+ Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
18
15
 
19
16
  Spec::Runner.configure do |config|
17
+ # If you're not using ActiveRecord you should remove these
18
+ # lines, delete config/database.yml and disable :active_record
19
+ # in your config/boot.rb
20
+ config.use_transactional_fixtures = true
21
+ config.use_instantiated_fixtures = false
22
+ config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
23
+
24
+ # == Fixtures
25
+ #
26
+ # You can declare fixtures for each example_group like this:
27
+ # describe "...." do
28
+ # fixtures :table_a, :table_b
29
+ #
30
+ # Alternatively, if you prefer to declare them only once, you can
31
+ # do so right here. Just uncomment the next line and replace the fixture
32
+ # names with your fixtures.
33
+ #
34
+ # config.global_fixtures = :table_a, :table_b
35
+ #
36
+ # If you declare global fixtures, be aware that they will be declared
37
+ # for all of your examples, even those that don't use them.
38
+ #
39
+ # You can also declare which fixtures to use (for example fixtures for test/fixtures):
40
+ #
41
+ # config.fixture_path = RAILS_ROOT + '/spec/fixtures/'
42
+ #
43
+ # == Mock Framework
44
+ #
45
+ # RSpec uses its own mocking framework by default. If you prefer to
46
+ # use mocha, flexmock or RR, uncomment the appropriate line:
47
+ #
48
+ # config.mock_with :mocha
49
+ # config.mock_with :flexmock
50
+ # config.mock_with :rr
51
+ #
52
+ # == Notes
53
+ #
54
+ # For more information take a look at Spec::Runner::Configuration and Spec::Runner
20
55
  end
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.0"
8
+ s.version = "0.18.1"
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{2010-12-01}
12
+ s.date = %q{2011-01-17}
13
13
  s.email = %q{yoon@northwestern.edu}
14
14
  s.extra_rdoc_files = [
15
15
  "README.md"
@@ -18,8 +18,6 @@ Gem::Specification.new do |s|
18
18
  ".gitignore",
19
19
  ".rvmrc",
20
20
  "CHANGELOG",
21
- "Gemfile",
22
- "Gemfile.lock",
23
21
  "MIT-LICENSE",
24
22
  "README.md",
25
23
  "Rakefile",
@@ -52,6 +50,7 @@ Gem::Specification.new do |s|
52
50
  "app/views/surveyor/edit.html.haml",
53
51
  "app/views/surveyor/new.html.haml",
54
52
  "app/views/surveyor/show.html.haml",
53
+ "ci-env.sh",
55
54
  "config/routes.rb",
56
55
  "features/redcap.feature",
57
56
  "features/step_definitions/surveyor_steps.rb",
@@ -140,8 +139,8 @@ Gem::Specification.new do |s|
140
139
  "generators/surveyor/templates/migrate/create_validations.rb",
141
140
  "generators/surveyor/templates/surveys/kitchen_sink_survey.rb",
142
141
  "generators/surveyor/templates/tasks/surveyor.rb",
143
- "init.rb",
144
- "install.rb",
142
+ "hudson.rakefile",
143
+ "init_testbed.rakefile",
145
144
  "lib/surveyor.rb",
146
145
  "lib/surveyor/acts_as_response.rb",
147
146
  "lib/surveyor/common.rb",
@@ -182,11 +181,9 @@ Gem::Specification.new do |s|
182
181
  "spec/rcov.opts",
183
182
  "spec/spec.opts",
184
183
  "spec/spec_helper.rb",
185
- "spec/test_Gemfile",
186
- "spec/test_boot.rb",
187
- "spec/test_preinitializer.rb",
188
184
  "spec/views/surveyor/show.html.haml_spec.rb",
189
185
  "surveyor.gemspec",
186
+ "testbed/Gemfile",
190
187
  "uninstall.rb"
191
188
  ]
192
189
  s.homepage = %q{http://github.com/breakpointer/surveyor}
@@ -213,51 +210,6 @@ Gem::Specification.new do |s|
213
210
  "spec/models/validation_condition_spec.rb",
214
211
  "spec/models/validation_spec.rb",
215
212
  "spec/spec_helper.rb",
216
- "spec/test_app/app/controllers/application_controller.rb",
217
- "spec/test_app/app/helpers/application_helper.rb",
218
- "spec/test_app/config/boot.rb",
219
- "spec/test_app/config/environment.rb",
220
- "spec/test_app/config/environments/cucumber.rb",
221
- "spec/test_app/config/environments/development.rb",
222
- "spec/test_app/config/environments/production.rb",
223
- "spec/test_app/config/environments/test.rb",
224
- "spec/test_app/config/initializers/backtrace_silencers.rb",
225
- "spec/test_app/config/initializers/cookie_verification_secret.rb",
226
- "spec/test_app/config/initializers/inflections.rb",
227
- "spec/test_app/config/initializers/mime_types.rb",
228
- "spec/test_app/config/initializers/new_rails_defaults.rb",
229
- "spec/test_app/config/initializers/session_store.rb",
230
- "spec/test_app/config/preinitializer.rb",
231
- "spec/test_app/config/routes.rb",
232
- "spec/test_app/db/migrate/20101119172426_create_surveys.rb",
233
- "spec/test_app/db/migrate/20101119172427_create_survey_sections.rb",
234
- "spec/test_app/db/migrate/20101119172428_create_questions.rb",
235
- "spec/test_app/db/migrate/20101119172429_create_question_groups.rb",
236
- "spec/test_app/db/migrate/20101119172430_create_answers.rb",
237
- "spec/test_app/db/migrate/20101119172431_create_response_sets.rb",
238
- "spec/test_app/db/migrate/20101119172432_create_responses.rb",
239
- "spec/test_app/db/migrate/20101119172433_create_dependencies.rb",
240
- "spec/test_app/db/migrate/20101119172434_create_dependency_conditions.rb",
241
- "spec/test_app/db/migrate/20101119172435_create_validations.rb",
242
- "spec/test_app/db/migrate/20101119172436_create_validation_conditions.rb",
243
- "spec/test_app/db/migrate/20101119172437_add_display_order_to_surveys.rb",
244
- "spec/test_app/db/migrate/20101119172438_add_correct_answer_id_to_questions.rb",
245
- "spec/test_app/db/migrate/20101119172439_add_index_to_response_sets.rb",
246
- "spec/test_app/db/migrate/20101119172440_add_index_to_surveys.rb",
247
- "spec/test_app/db/migrate/20101119172441_add_unique_indicies.rb",
248
- "spec/test_app/db/migrate/20101119172442_add_section_id_to_responses.rb",
249
- "spec/test_app/db/schema.rb",
250
- "spec/test_app/db/seeds.rb",
251
- "spec/test_app/features/step_definitions/web_steps.rb",
252
- "spec/test_app/features/support/env.rb",
253
- "spec/test_app/features/support/paths.rb",
254
- "spec/test_app/lib/tasks/surveyor.rb",
255
- "spec/test_app/spec/spec_helper.rb",
256
- "spec/test_app/surveys/kitchen_sink_survey.rb",
257
- "spec/test_app/test/performance/browsing_test.rb",
258
- "spec/test_app/test/test_helper.rb",
259
- "spec/test_boot.rb",
260
- "spec/test_preinitializer.rb",
261
213
  "spec/views/surveyor/show.html.haml_spec.rb"
262
214
  ]
263
215
 
@@ -268,13 +220,16 @@ Gem::Specification.new do |s|
268
220
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
269
221
  s.add_runtime_dependency(%q<haml>, [">= 0"])
270
222
  s.add_runtime_dependency(%q<fastercsv>, [">= 0"])
223
+ s.add_development_dependency(%q<yard>, [">= 0"])
271
224
  else
272
225
  s.add_dependency(%q<haml>, [">= 0"])
273
226
  s.add_dependency(%q<fastercsv>, [">= 0"])
227
+ s.add_dependency(%q<yard>, [">= 0"])
274
228
  end
275
229
  else
276
230
  s.add_dependency(%q<haml>, [">= 0"])
277
231
  s.add_dependency(%q<fastercsv>, [">= 0"])
232
+ s.add_dependency(%q<yard>, [">= 0"])
278
233
  end
279
234
  end
280
235
 
data/testbed/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source :rubygems
2
+
3
+ gem 'rails', '2.3.10'
4
+ gem 'rspec', '~> 1.3'
5
+ gem 'rspec-rails', '1.3.3'
6
+ gem 'sqlite3-ruby', '1.2.5' # Using this version for ruby 1.8.7 compatibility reasons
7
+ gem 'webrat'
8
+ gem 'cucumber', '~> 0.8.0'
9
+ gem 'cucumber-rails'
10
+ gem 'database_cleaner'
11
+ gem 'factory_girl'
12
+
13
+ gem 'surveyor', :path => ".."