helena 1.1.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/.rubocop.yml +4 -0
- data/.travis.yml +5 -4
- data/Appraisals +12 -0
- data/Gemfile +8 -11
- data/Gemfile.lock +217 -200
- data/README.md +2 -3
- data/Rakefile +2 -0
- data/app/controllers/helena/sessions_controller.rb +2 -2
- data/app/models/helena/answer.rb +5 -3
- data/app/models/helena/concerns/application_model.rb +1 -1
- data/app/models/helena/question.rb +1 -1
- data/app/models/helena/question_group.rb +1 -1
- data/app/models/helena/questions/checkbox_group.rb +1 -1
- data/app/models/helena/session.rb +3 -3
- data/app/models/helena/version.rb +1 -1
- data/config/initializers/simple_form_bootstrap.rb +1 -1
- data/db/seeds.rb +7 -6
- data/gemfiles/rails_4.2.gemfile +22 -0
- data/gemfiles/rails_4.2.gemfile.lock +295 -0
- data/gemfiles/rails_5.1.gemfile +24 -0
- data/gemfiles/rails_5.1.gemfile.lock +305 -0
- data/helena.gemspec +7 -7
- data/lib/helena/engine.rb +2 -2
- data/lib/helena/survey_importer.rb +1 -1
- data/lib/helena/version.rb +1 -1
- data/lib/helena/version_publisher.rb +2 -2
- data/spec/controllers/helena/sessions_controller_spec.rb +5 -5
- data/spec/dummy/app/views/layouts/application.html.haml +1 -3
- data/spec/dummy/bin/rails +1 -1
- data/spec/dummy/config/environments/development.rb +2 -0
- data/spec/dummy/config/environments/test.rb +0 -4
- data/spec/dummy/config.ru +1 -1
- data/spec/factories/helena/answers.rb +7 -7
- data/spec/factories/helena/labels.rb +3 -2
- data/spec/factories/helena/question_groups.rb +3 -2
- data/spec/factories/helena/questions.rb +3 -2
- data/spec/factories/helena/sessions.rb +6 -2
- data/spec/factories/helena/sub_questions.rb +3 -2
- data/spec/factories/helena/survey_details.rb +4 -3
- data/spec/factories/helena/surveys.rb +2 -2
- data/spec/factories/helena/versions.rb +3 -1
- data/spec/features/helena/manage_session_spec.rb +5 -5
- data/spec/lib/version_publisher_spec.rb +1 -1
- data/spec/models/helena/answer_spec.rb +1 -1
- data/spec/models/helena/label_spec.rb +1 -1
- data/spec/models/helena/question_group_spec.rb +1 -1
- data/spec/models/helena/question_spec.rb +1 -1
- data/spec/models/helena/questions/bipolar_radio_matrix_spec.rb +1 -1
- data/spec/models/helena/questions/checkbox_group_spec.rb +1 -1
- data/spec/models/helena/questions/radio_group_spec.rb +1 -1
- data/spec/models/helena/questions/radio_matrix_spec.rb +1 -1
- data/spec/models/helena/questions/short_text_spec.rb +1 -1
- data/spec/models/helena/session_spec.rb +3 -3
- data/spec/models/helena/sub_question_spec.rb +1 -1
- data/spec/models/helena/survey_spec.rb +1 -1
- data/spec/models/helena/version_spec.rb +1 -1
- data/spec/spec_helper.rb +4 -7
- data/spec/support/rails_compatibility.rb +4 -0
- 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
|
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
|
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
|
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
|
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
|
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
|
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 {
|
17
|
-
it {
|
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
|
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
|
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
|
@@ -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
|
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',
|
5
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
9
6
|
|
10
7
|
require 'rspec/rails'
|
11
|
-
require '
|
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
|
35
|
-
config.include
|
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
|
|
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.
|
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:
|
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:
|
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:
|
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
|
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
|
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:
|
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: '
|
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: '
|
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.
|
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:
|