helena_administration 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 391f02ca9affd5e425a3b93049571953c81fe82a
|
4
|
+
data.tar.gz: 2dd700e9b728188290d743c7c6a8d8b27b0a7aa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7702d987b2478b3ed6554dafd139f62d2fa835ec4189f852e2e15be56dc24f198de0a573391bcc4b416702f44bdab249ab676b600ee0a218d9e895270fac6f69
|
7
|
+
data.tar.gz: dcc02084894d9026305e3d550c261e04e337600fbde02c6f7e4beb99181513aa1b16348fc7444d8f21889786a2377b39f0d88dc6d5f29cc5d347d4692a4d069c
|
data/Gemfile.lock
CHANGED
@@ -50,11 +50,11 @@ module HelenaAdministration
|
|
50
50
|
response.headers['Content-Type'] = 'text/csv'
|
51
51
|
|
52
52
|
# Write csv header once ...
|
53
|
-
response.stream.write CSV.generate_line(session_fields + question_codes)
|
53
|
+
response.stream.write CSV.generate_line(session_fields + ['version'] + question_codes)
|
54
54
|
|
55
55
|
# .. and generate a line for each session.
|
56
56
|
@sessions.each do |session|
|
57
|
-
response.stream.write CSV.generate_line(session_values(session) + answer_values(session, question_codes))
|
57
|
+
response.stream.write CSV.generate_line(session_values(session) + [session.version.version] + answer_values(session, question_codes))
|
58
58
|
end
|
59
59
|
ensure
|
60
60
|
response.stream.close
|
@@ -14,11 +14,11 @@ describe HelenaAdministration::SessionsController do
|
|
14
14
|
question_group.questions.create code: 'string_answer_2', question_text: 'Hip', _type: Helena::Questions::LongText
|
15
15
|
question_group.questions.create code: 'integer_answer_2', question_text: 'Hop', _type: Helena::Questions::ShortText
|
16
16
|
|
17
|
-
create :session, survey: survey, answers: [
|
17
|
+
create :session, survey: survey, version: version, answers: [
|
18
18
|
build(:string_answer, code: 'string_answer_1', value: 'abc'),
|
19
19
|
build(:integer_answer, code: 'integer_answer_1', value: '123')
|
20
20
|
]
|
21
|
-
create :session, survey: survey, answers: [
|
21
|
+
create :session, survey: survey, version: version, answers: [
|
22
22
|
build(:string_answer, code: 'string_answer_2', value: 'def, xyz'),
|
23
23
|
build(:integer_answer, code: 'integer_answer_2', value: '456')
|
24
24
|
]
|
@@ -80,7 +80,7 @@ describe HelenaAdministration::SessionsController do
|
|
80
80
|
specify 'csv header for all sessions does not allow same column names for answers and session fields' do
|
81
81
|
question_group.questions.create code: 'completed', question_text: 'Good', _type: Helena::Questions::LongText
|
82
82
|
question_group.questions.create code: 'token', question_text: 'Point', _type: Helena::Questions::ShortText
|
83
|
-
create :session, survey: survey, answers: [
|
83
|
+
create :session, survey: survey, version: version, answers: [
|
84
84
|
build(:boolean_answer, code: 'completed', value: true),
|
85
85
|
build(:string_answer, code: 'token', value: 'abcdefghijklmnopqrstuvwxyz')
|
86
86
|
]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helena_administration
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Markus Graf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kaminari
|