helena 1.1.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.rubocop.yml +4 -0
  4. data/.travis.yml +5 -4
  5. data/Appraisals +12 -0
  6. data/Gemfile +8 -11
  7. data/Gemfile.lock +217 -200
  8. data/README.md +2 -3
  9. data/Rakefile +2 -0
  10. data/app/controllers/helena/sessions_controller.rb +2 -2
  11. data/app/models/helena/answer.rb +5 -3
  12. data/app/models/helena/concerns/application_model.rb +1 -1
  13. data/app/models/helena/question.rb +1 -1
  14. data/app/models/helena/question_group.rb +1 -1
  15. data/app/models/helena/questions/checkbox_group.rb +1 -1
  16. data/app/models/helena/session.rb +3 -3
  17. data/app/models/helena/version.rb +1 -1
  18. data/config/initializers/simple_form_bootstrap.rb +1 -1
  19. data/db/seeds.rb +7 -6
  20. data/gemfiles/rails_4.2.gemfile +22 -0
  21. data/gemfiles/rails_4.2.gemfile.lock +295 -0
  22. data/gemfiles/rails_5.1.gemfile +24 -0
  23. data/gemfiles/rails_5.1.gemfile.lock +305 -0
  24. data/helena.gemspec +7 -7
  25. data/lib/helena/engine.rb +2 -2
  26. data/lib/helena/survey_importer.rb +1 -1
  27. data/lib/helena/version.rb +1 -1
  28. data/lib/helena/version_publisher.rb +2 -2
  29. data/spec/controllers/helena/sessions_controller_spec.rb +5 -5
  30. data/spec/dummy/app/views/layouts/application.html.haml +1 -3
  31. data/spec/dummy/bin/rails +1 -1
  32. data/spec/dummy/config/environments/development.rb +2 -0
  33. data/spec/dummy/config/environments/test.rb +0 -4
  34. data/spec/dummy/config.ru +1 -1
  35. data/spec/factories/helena/answers.rb +7 -7
  36. data/spec/factories/helena/labels.rb +3 -2
  37. data/spec/factories/helena/question_groups.rb +3 -2
  38. data/spec/factories/helena/questions.rb +3 -2
  39. data/spec/factories/helena/sessions.rb +6 -2
  40. data/spec/factories/helena/sub_questions.rb +3 -2
  41. data/spec/factories/helena/survey_details.rb +4 -3
  42. data/spec/factories/helena/surveys.rb +2 -2
  43. data/spec/factories/helena/versions.rb +3 -1
  44. data/spec/features/helena/manage_session_spec.rb +5 -5
  45. data/spec/lib/version_publisher_spec.rb +1 -1
  46. data/spec/models/helena/answer_spec.rb +1 -1
  47. data/spec/models/helena/label_spec.rb +1 -1
  48. data/spec/models/helena/question_group_spec.rb +1 -1
  49. data/spec/models/helena/question_spec.rb +1 -1
  50. data/spec/models/helena/questions/bipolar_radio_matrix_spec.rb +1 -1
  51. data/spec/models/helena/questions/checkbox_group_spec.rb +1 -1
  52. data/spec/models/helena/questions/radio_group_spec.rb +1 -1
  53. data/spec/models/helena/questions/radio_matrix_spec.rb +1 -1
  54. data/spec/models/helena/questions/short_text_spec.rb +1 -1
  55. data/spec/models/helena/session_spec.rb +3 -3
  56. data/spec/models/helena/sub_question_spec.rb +1 -1
  57. data/spec/models/helena/survey_spec.rb +1 -1
  58. data/spec/models/helena/version_spec.rb +1 -1
  59. data/spec/spec_helper.rb +4 -7
  60. data/spec/support/rails_compatibility.rb +4 -0
  61. metadata +38 -39
@@ -17,7 +17,7 @@ describe Helena::Question do
17
17
  end
18
18
 
19
19
  it 'has a valid factory' do
20
- expect(build :question, question_group: question_group).to be_valid
20
+ expect(build(:question, question_group: question_group)).to be_valid
21
21
  end
22
22
 
23
23
  it 'indicates that it does not include sub_questions or labels' do
@@ -6,7 +6,7 @@ describe Helena::Questions::BipolarRadioMatrix do
6
6
  let(:question_group) { build :question_group, version: version }
7
7
 
8
8
  it 'has a valid factory' do
9
- expect(build :bipolar_radio_matrix_question, question_group: question_group).to be_valid
9
+ expect(build(:bipolar_radio_matrix_question, question_group: question_group)).to be_valid
10
10
  end
11
11
 
12
12
  it 'validates uniquness of label preselection' do
@@ -6,7 +6,7 @@ describe Helena::Questions::CheckboxGroup do
6
6
  let(:question_group) { build :question_group, version: version }
7
7
 
8
8
  it 'has a valid factory' do
9
- expect(build :checkbox_group_question, question_group: question_group).to be_valid
9
+ expect(build(:checkbox_group_question, question_group: question_group)).to be_valid
10
10
  end
11
11
 
12
12
  it 'indicates that it includes sub_questions' do
@@ -6,7 +6,7 @@ describe Helena::Questions::RadioGroup do
6
6
  let(:question_group) { build :question_group, version: version }
7
7
 
8
8
  it 'has a valid factory' do
9
- expect(build :radio_group_question, question_group: question_group).to be_valid
9
+ expect(build(:radio_group_question, question_group: question_group)).to be_valid
10
10
  end
11
11
 
12
12
  it 'validates uniquness of label preselection' do
@@ -6,7 +6,7 @@ describe Helena::Questions::RadioMatrix do
6
6
  let(:question_group) { build :question_group, version: version }
7
7
 
8
8
  it 'has a valid factory' do
9
- expect(build :radio_matrix_question, question_group: question_group).to be_valid
9
+ expect(build(:radio_matrix_question, question_group: question_group)).to be_valid
10
10
  end
11
11
 
12
12
  it 'validates uniquness of label preselection' do
@@ -5,6 +5,6 @@ describe Helena::Questions::ShortText do
5
5
  let(:question_group) { build(:question_group, version: version) }
6
6
 
7
7
  it 'has a valid factory' do
8
- expect(build :short_text_question, question_group: question_group).to be_valid
8
+ expect(build(:short_text_question, question_group: question_group)).to be_valid
9
9
  end
10
10
  end
@@ -13,11 +13,11 @@ describe Helena::Session do
13
13
  it { expect(subject).to validate_uniqueness_of(:token) }
14
14
  it { expect(subject).to validate_uniqueness_of(:view_token) }
15
15
 
16
- it { expect(subject).to have_index_for(created_at: 1) }
17
- it { expect(subject).to have_index_for(updated_at: 1) }
16
+ it { is_expected.to have_index_for(created_at: 1) }
17
+ it { is_expected.to have_index_for(updated_at: 1) }
18
18
 
19
19
  it 'has a valid factory' do
20
- expect(build :session).to be_valid
20
+ expect(build(:session)).to be_valid
21
21
  end
22
22
 
23
23
  it 'assigns a token after when creating a session' do
@@ -23,7 +23,7 @@ describe Helena::SubQuestion do
23
23
  end
24
24
 
25
25
  it 'has a valid factory' do
26
- expect(build :sub_question, question: question).to be_valid
26
+ expect(build(:sub_question, question: question)).to be_valid
27
27
  end
28
28
 
29
29
  describe 'splitting the sub_question text with a vertical bar "|" i.e for pair comparisions' do
@@ -9,7 +9,7 @@ describe Helena::Survey do
9
9
  it { expect(subject).to validate_uniqueness_of(:name) }
10
10
 
11
11
  it 'has a valid factory' do
12
- expect(build :survey).to be_valid
12
+ expect(build(:survey)).to be_valid
13
13
  end
14
14
 
15
15
  it 'returns the newest version if there are any' do
@@ -10,7 +10,7 @@ describe Helena::Version do
10
10
  it { expect(subject).to validate_uniqueness_of(:version) }
11
11
 
12
12
  it 'has a valid factory' do
13
- expect(build :version, survey: create(:survey)).to be_valid
13
+ expect(build(:version, survey: create(:survey))).to be_valid
14
14
  end
15
15
 
16
16
  it 'scopes active versions' do
data/spec/spec_helper.rb CHANGED
@@ -1,14 +1,11 @@
1
1
  require 'faker'
2
- require 'coveralls'
3
-
4
- Coveralls.wear!
5
2
 
6
3
  # Configure Rails Envinronment
7
4
  ENV['RAILS_ENV'] = 'test'
8
- require File.expand_path('../dummy/config/environment.rb', __FILE__)
5
+ require File.expand_path('../dummy/config/environment.rb', __FILE__)
9
6
 
10
7
  require 'rspec/rails'
11
- require 'factory_girl_rails'
8
+ require 'factory_bot_rails'
12
9
  require 'mongoid-rspec'
13
10
  require 'capybara/rspec'
14
11
  require 'rspec/collection_matchers'
@@ -31,8 +28,8 @@ RSpec.configure do |config|
31
28
 
32
29
  config.include Mongoid::Matchers, type: :model
33
30
 
34
- # We don't want write FactoryGirl all the time
35
- config.include FactoryGirl::Syntax::Methods
31
+ # We don't want write FactoryBot all the time
32
+ config.include FactoryBot::Syntax::Methods
36
33
 
37
34
  config.infer_spec_type_from_file_location!
38
35
 
@@ -0,0 +1,4 @@
1
+ # As in rails 5.1 we can no longer accept direct hashes as parameters so we ned to cast it
2
+ def parametrize(params)
3
+ Rails.version.to_f >= 5 ? { params: params } : params
4
+ end
metadata CHANGED
@@ -1,36 +1,33 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helena
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Graf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-29 00:00:00.000000000 Z
11
+ date: 2017-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mongoid
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "<"
32
- - !ruby/object:Gem::Version
33
- version: '6.0'
34
31
  - - ">="
35
32
  - !ruby/object:Gem::Version
36
33
  version: '4.0'
@@ -38,9 +35,6 @@ dependencies:
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - "<"
42
- - !ruby/object:Gem::Version
43
- version: '6.0'
44
38
  - - ">="
45
39
  - !ruby/object:Gem::Version
46
40
  version: '4.0'
@@ -62,30 +56,30 @@ dependencies:
62
56
  name: mongoid-simple-tags
63
57
  requirement: !ruby/object:Gem::Requirement
64
58
  requirements:
65
- - - "~>"
59
+ - - ">="
66
60
  - !ruby/object:Gem::Version
67
- version: '0.1'
61
+ version: 0.1.3
68
62
  type: :runtime
69
63
  prerelease: false
70
64
  version_requirements: !ruby/object:Gem::Requirement
71
65
  requirements:
72
- - - "~>"
66
+ - - ">="
73
67
  - !ruby/object:Gem::Version
74
- version: '0.1'
68
+ version: 0.1.3
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: haml-rails
77
71
  requirement: !ruby/object:Gem::Requirement
78
72
  requirements:
79
73
  - - "~>"
80
74
  - !ruby/object:Gem::Version
81
- version: '0.9'
75
+ version: '1.0'
82
76
  type: :runtime
83
77
  prerelease: false
84
78
  version_requirements: !ruby/object:Gem::Requirement
85
79
  requirements:
86
80
  - - "~>"
87
81
  - !ruby/object:Gem::Version
88
- version: '0.9'
82
+ version: '1.0'
89
83
  - !ruby/object:Gem::Dependency
90
84
  name: slim
91
85
  requirement: !ruby/object:Gem::Requirement
@@ -156,32 +150,18 @@ dependencies:
156
150
  - - "~>"
157
151
  - !ruby/object:Gem::Version
158
152
  version: '3.2'
159
- - !ruby/object:Gem::Dependency
160
- name: breadcrumbs_on_rails
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - "~>"
164
- - !ruby/object:Gem::Version
165
- version: '2.3'
166
- type: :runtime
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - "~>"
171
- - !ruby/object:Gem::Version
172
- version: '2.3'
173
153
  - !ruby/object:Gem::Dependency
174
154
  name: rails-i18n
175
155
  requirement: !ruby/object:Gem::Requirement
176
156
  requirements:
177
- - - "~>"
157
+ - - ">="
178
158
  - !ruby/object:Gem::Version
179
159
  version: '4.0'
180
160
  type: :runtime
181
161
  prerelease: false
182
162
  version_requirements: !ruby/object:Gem::Requirement
183
163
  requirements:
184
- - - "~>"
164
+ - - ">="
185
165
  - !ruby/object:Gem::Version
186
166
  version: '4.0'
187
167
  - !ruby/object:Gem::Dependency
@@ -255,19 +235,19 @@ dependencies:
255
235
  - !ruby/object:Gem::Version
256
236
  version: '1'
257
237
  - !ruby/object:Gem::Dependency
258
- name: factory_girl_rails
238
+ name: factory_bot_rails
259
239
  requirement: !ruby/object:Gem::Requirement
260
240
  requirements:
261
- - - "~>"
241
+ - - ">="
262
242
  - !ruby/object:Gem::Version
263
- version: '4.4'
243
+ version: '0'
264
244
  type: :development
265
245
  prerelease: false
266
246
  version_requirements: !ruby/object:Gem::Requirement
267
247
  requirements:
268
- - - "~>"
248
+ - - ">="
269
249
  - !ruby/object:Gem::Version
270
- version: '4.4'
250
+ version: '0'
271
251
  - !ruby/object:Gem::Dependency
272
252
  name: faker
273
253
  requirement: !ruby/object:Gem::Requirement
@@ -296,6 +276,20 @@ dependencies:
296
276
  - - "~>"
297
277
  - !ruby/object:Gem::Version
298
278
  version: '2.3'
279
+ - !ruby/object:Gem::Dependency
280
+ name: appraisal
281
+ requirement: !ruby/object:Gem::Requirement
282
+ requirements:
283
+ - - ">="
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ type: :development
287
+ prerelease: false
288
+ version_requirements: !ruby/object:Gem::Requirement
289
+ requirements:
290
+ - - ">="
291
+ - !ruby/object:Gem::Version
292
+ version: '0'
299
293
  description: |-
300
294
  Helena is an online survey/test framework designed for agile
301
295
  survey/test development, longitudinal studies and instant feedback.
@@ -309,6 +303,7 @@ files:
309
303
  - ".gitignore"
310
304
  - ".rubocop.yml"
311
305
  - ".travis.yml"
306
+ - Appraisals
312
307
  - Gemfile
313
308
  - Gemfile.lock
314
309
  - LICENSE
@@ -376,6 +371,10 @@ files:
376
371
  - config/routes.rb
377
372
  - db/seeds.rb
378
373
  - db/swls_survey.en.yml
374
+ - gemfiles/rails_4.2.gemfile
375
+ - gemfiles/rails_4.2.gemfile.lock
376
+ - gemfiles/rails_5.1.gemfile
377
+ - gemfiles/rails_5.1.gemfile.lock
379
378
  - gpl-3.0.txt
380
379
  - helena.gemspec
381
380
  - lib/helena.rb
@@ -447,6 +446,7 @@ files:
447
446
  - spec/models/helena/survey_spec.rb
448
447
  - spec/models/helena/version_spec.rb
449
448
  - spec/spec_helper.rb
449
+ - spec/support/rails_compatibility.rb
450
450
  homepage: https://github.com/gurix/helena
451
451
  licenses:
452
452
  - GPL-3
@@ -467,10 +467,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
467
467
  version: '0'
468
468
  requirements: []
469
469
  rubyforge_project:
470
- rubygems_version: 2.4.5
470
+ rubygems_version: 2.6.11
471
471
  signing_key:
472
472
  specification_version: 4
473
473
  summary: Helena is an online survey/test framework designed for agile survey/test
474
474
  development, longitudinal studies and instant feedback.
475
475
  test_files: []
476
- has_rdoc: