helena_administration 0.0.2 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Gemfile +5 -6
- data/Gemfile.lock +213 -157
- data/README.md +8 -7
- data/app/assets/stylesheets/helena_administration.css.sass +3 -2
- data/app/controllers/helena_administration/application_controller.rb +1 -7
- data/app/controllers/helena_administration/question_groups_controller.rb +2 -2
- data/app/controllers/helena_administration/questions/bipolar_radio_matrices_controller.rb +6 -0
- data/app/controllers/helena_administration/questions/{checkbox_matrix_controller.rb → checkbox_matrices_controller.rb} +1 -1
- data/app/controllers/helena_administration/questions/{radio_matrix_controller.rb → radio_matrices_controller.rb} +1 -1
- data/app/controllers/helena_administration/questions_controller.rb +4 -3
- data/app/controllers/helena_administration/sessions_controller.rb +46 -2
- data/app/controllers/helena_administration/versions_controller.rb +2 -2
- data/app/views/helena_administration/questions/_form.html.slim +1 -0
- data/config/routes.rb +3 -2
- data/helena_administration.gemspec +9 -6
- data/lib/helena_administration/version.rb +1 -1
- data/lib/helena_administration.rb +1 -1
- data/spec/controllers/dashboard_controller_spec.rb +1 -1
- data/spec/controllers/sessions_controller_spec.rb +69 -77
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/config/initializers/assets.rb +1 -1
- data/spec/features/dashboard/index.html.slim_spec.rb +1 -1
- data/spec/features/question_groups/manage_question_groups_spec.rb +1 -3
- data/spec/features/questions/manage_questions_spec.rb +6 -1
- data/spec/features/questions/question_types/manage_bipolar_radio_matrix_question_spec.rb +78 -0
- data/spec/features/questions/question_types/manage_checkbox_group_question_spec.rb +1 -1
- data/spec/features/questions/question_types/manage_long_text_question_spec.rb +1 -1
- data/spec/features/questions/question_types/manage_radio_group_question_spec.rb +1 -1
- data/spec/features/questions/question_types/manage_radio_matrix_question_spec.rb +1 -1
- data/spec/features/questions/question_types/manage_short_text_question_spec.rb +1 -1
- data/spec/features/questions/question_types/manage_static_text_question_spec.rb +1 -1
- data/spec/features/sessions/manage_sessions_spec.rb +3 -1
- data/spec/features/surveys/manage_survey_spec.rb +1 -1
- data/spec/features/versions/manage_version_spec.rb +1 -3
- data/spec/helpers/applicatin_helper_spec.rb +1 -1
- data/spec/spec_helper.rb +8 -28
- metadata +48 -21
- data/spec/controllers/survey_controller_spec.rb +0 -36
- data/spec/dummy/app/decorators/controllers/helena_administration/application_controller_decorator.rb +0 -5
- data/spec/rails_helper.rb +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2f978075a80540cad53ad0d956138185dfdbd9b
|
4
|
+
data.tar.gz: 1535a6e907aca1c901a96213365d357bd7d4f103
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a04f634738439df548e8a7c6b4614dd138af5117df81b11ea73cd1cfad52bf54a0931626c73a6b4d13607613ec0dcc07718c6194c7d8513016eb25802de932b3
|
7
|
+
data.tar.gz: e7e249d0f518faa423853052ae0ff07885aa167fb1ecc1619e6a57300dfef9bcbffb678748f11340496c211147679f2e5eef2c622d12039b364de85dc10ded29
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -13,12 +13,11 @@ gemspec
|
|
13
13
|
# To use debugger
|
14
14
|
# gem 'debugger'
|
15
15
|
|
16
|
-
gem 'helena', '~> 1.0.0.
|
17
|
-
|
18
|
-
#path: '../helena/'
|
16
|
+
gem 'helena', '~> 1.0.0.rc2',
|
17
|
+
git: 'https://github.com/gurix/helena.git'
|
18
|
+
# path: '../helena/'
|
19
19
|
|
20
20
|
gem 'compass-h5bp', group: :assets
|
21
|
-
|
22
21
|
group :development, :test do
|
23
22
|
gem 'better_errors'
|
24
23
|
gem 'quiet_assets'
|
@@ -28,7 +27,6 @@ group :development, :test do
|
|
28
27
|
gem 'dotenv-rails'
|
29
28
|
gem 'mongoid-rspec'
|
30
29
|
gem 'rspec-collection_matchers', '~> 1'
|
31
|
-
gem 'database_cleaner'
|
32
30
|
gem 'rspec-rails'
|
33
31
|
gem 'factory_girl_rails'
|
34
32
|
gem 'capybara'
|
@@ -38,7 +36,8 @@ group :development, :test do
|
|
38
36
|
gem 'autotest-rails-pure', require: false
|
39
37
|
gem 'autotest-fsevent', require: false
|
40
38
|
gem 'autotest-growl', require: false
|
41
|
-
gem '
|
39
|
+
gem 'faker'
|
42
40
|
gem 'binding_of_caller'
|
43
41
|
gem 'rspec-core'
|
42
|
+
gem 'responders', '~> 2.0'
|
44
43
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,184 +1,222 @@
|
|
1
|
+
GIT
|
2
|
+
remote: https://github.com/gurix/helena.git
|
3
|
+
revision: b62701e9e9ed81a0e927525edcbbca98916595fe
|
4
|
+
specs:
|
5
|
+
helena (1.0.0.rc2)
|
6
|
+
bootstrap-sass (~> 3.2)
|
7
|
+
breadcrumbs_on_rails (~> 2.3)
|
8
|
+
browser (~> 0.8)
|
9
|
+
haml-rails (~> 0.9)
|
10
|
+
jquery-rails (~> 4.0)
|
11
|
+
mongoid (~> 4.0)
|
12
|
+
mongoid-simple-tags (~> 0.1)
|
13
|
+
mongoid_orderable (~> 4.1)
|
14
|
+
rails (~> 4.2)
|
15
|
+
rails-i18n (~> 4.0)
|
16
|
+
responders (~> 2.0)
|
17
|
+
sass-rails (~> 5.0)
|
18
|
+
simple_form (~> 3.1.0.rc2)
|
19
|
+
slim (~> 3.0)
|
20
|
+
|
1
21
|
PATH
|
2
22
|
remote: .
|
3
23
|
specs:
|
4
|
-
helena_administration (0.0.
|
24
|
+
helena_administration (0.0.5)
|
5
25
|
bootstrap-sass (~> 3.2)
|
6
26
|
breadcrumbs_on_rails (~> 2.3)
|
7
|
-
codemirror-rails (~>
|
27
|
+
codemirror-rails (~> 5)
|
8
28
|
coffee-rails (~> 4.1)
|
9
|
-
font-awesome-
|
29
|
+
font-awesome-sass (~> 4.3.0)
|
10
30
|
haml-rails (~> 0.5)
|
11
31
|
html5-rails (~> 0.1)
|
12
|
-
jquery-rails (~>
|
32
|
+
jquery-rails (~> 4)
|
13
33
|
kaminari (~> 0.16)
|
14
34
|
mongoid (~> 4.0)
|
15
35
|
mongoid-simple-tags (~> 0.1)
|
16
36
|
mongoid_orderable (~> 4.1)
|
17
|
-
rails (~> 4.
|
37
|
+
rails (~> 4.2)
|
18
38
|
rails-i18n (~> 4.0)
|
19
|
-
|
39
|
+
responders (~> 2.0)
|
40
|
+
sass-rails (~> 5.0)
|
20
41
|
simple_form (~> 3.1.0.rc2)
|
21
|
-
slim-rails (~>
|
42
|
+
slim-rails (~> 3.0)
|
22
43
|
|
23
44
|
GEM
|
24
45
|
remote: https://rubygems.org/
|
25
46
|
specs:
|
26
47
|
ZenTest (4.11.0)
|
27
|
-
actionmailer (4.
|
28
|
-
actionpack (= 4.
|
29
|
-
actionview (= 4.
|
48
|
+
actionmailer (4.2.2)
|
49
|
+
actionpack (= 4.2.2)
|
50
|
+
actionview (= 4.2.2)
|
51
|
+
activejob (= 4.2.2)
|
30
52
|
mail (~> 2.5, >= 2.5.4)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
53
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
54
|
+
actionpack (4.2.2)
|
55
|
+
actionview (= 4.2.2)
|
56
|
+
activesupport (= 4.2.2)
|
57
|
+
rack (~> 1.6)
|
35
58
|
rack-test (~> 0.6.2)
|
36
|
-
|
37
|
-
|
59
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
60
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
61
|
+
actionview (4.2.2)
|
62
|
+
activesupport (= 4.2.2)
|
38
63
|
builder (~> 3.1)
|
39
64
|
erubis (~> 2.7.0)
|
40
|
-
|
41
|
-
|
65
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
66
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
67
|
+
activejob (4.2.2)
|
68
|
+
activesupport (= 4.2.2)
|
69
|
+
globalid (>= 0.3.0)
|
70
|
+
activemodel (4.2.2)
|
71
|
+
activesupport (= 4.2.2)
|
42
72
|
builder (~> 3.1)
|
43
|
-
activerecord (4.
|
44
|
-
activemodel (= 4.
|
45
|
-
activesupport (= 4.
|
46
|
-
arel (~>
|
47
|
-
activesupport (4.
|
48
|
-
i18n (~> 0.
|
73
|
+
activerecord (4.2.2)
|
74
|
+
activemodel (= 4.2.2)
|
75
|
+
activesupport (= 4.2.2)
|
76
|
+
arel (~> 6.0)
|
77
|
+
activesupport (4.2.2)
|
78
|
+
i18n (~> 0.7)
|
49
79
|
json (~> 1.7, >= 1.7.7)
|
50
80
|
minitest (~> 5.1)
|
51
|
-
thread_safe (~> 0.
|
81
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
52
82
|
tzinfo (~> 1.1)
|
53
|
-
addressable (2.3.
|
54
|
-
arel (
|
83
|
+
addressable (2.3.8)
|
84
|
+
arel (6.0.0)
|
85
|
+
autoprefixer-rails (5.2.1)
|
86
|
+
execjs
|
87
|
+
json
|
55
88
|
autotest (4.4.6)
|
56
89
|
ZenTest (>= 4.4.1)
|
57
90
|
autotest-fsevent (0.2.10)
|
58
91
|
sys-uname
|
59
92
|
autotest-growl (0.2.16)
|
60
93
|
autotest-rails-pure (4.1.2)
|
61
|
-
better_errors (2.
|
94
|
+
better_errors (2.1.1)
|
62
95
|
coderay (>= 1.0.0)
|
63
96
|
erubis (>= 2.6.6)
|
64
97
|
rack (>= 0.9.0)
|
65
98
|
binding_of_caller (0.7.2)
|
66
99
|
debug_inspector (>= 0.0.1)
|
67
|
-
bootstrap-sass (3.3.
|
68
|
-
|
100
|
+
bootstrap-sass (3.3.5)
|
101
|
+
autoprefixer-rails (>= 5.0.0.1)
|
102
|
+
sass (>= 3.2.19)
|
69
103
|
breadcrumbs_on_rails (2.3.0)
|
70
|
-
|
104
|
+
browser (0.8.0)
|
105
|
+
bson (3.1.0)
|
71
106
|
builder (3.2.2)
|
72
|
-
byebug (
|
73
|
-
columnize (
|
74
|
-
debugger-linecache (~> 1.2)
|
75
|
-
slop (~> 3.6)
|
107
|
+
byebug (4.0.5)
|
108
|
+
columnize (= 0.9.0)
|
76
109
|
capybara (2.4.4)
|
77
110
|
mime-types (>= 1.16)
|
78
111
|
nokogiri (>= 1.3.3)
|
79
112
|
rack (>= 1.0.0)
|
80
113
|
rack-test (>= 0.5.4)
|
81
114
|
xpath (~> 2.0)
|
82
|
-
chunky_png (1.3.
|
83
|
-
codemirror-rails (
|
115
|
+
chunky_png (1.3.4)
|
116
|
+
codemirror-rails (5.3)
|
84
117
|
railties (>= 3.0, < 5)
|
85
118
|
coderay (1.1.0)
|
86
119
|
coffee-rails (4.1.0)
|
87
120
|
coffee-script (>= 2.2.0)
|
88
121
|
railties (>= 4.0.0, < 5.0)
|
89
|
-
coffee-script (2.
|
122
|
+
coffee-script (2.4.1)
|
90
123
|
coffee-script-source
|
91
124
|
execjs
|
92
|
-
coffee-script-source (1.
|
93
|
-
columnize (0.
|
94
|
-
compass (0.
|
125
|
+
coffee-script-source (1.9.1.1)
|
126
|
+
columnize (0.9.0)
|
127
|
+
compass (1.0.3)
|
95
128
|
chunky_png (~> 1.2)
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
129
|
+
compass-core (~> 1.0.2)
|
130
|
+
compass-import-once (~> 1.0.5)
|
131
|
+
rb-fsevent (>= 0.9.3)
|
132
|
+
rb-inotify (>= 0.9)
|
133
|
+
sass (>= 3.3.13, < 3.5)
|
134
|
+
compass-core (1.0.3)
|
135
|
+
multi_json (~> 1.0)
|
136
|
+
sass (>= 3.3.0, < 3.5)
|
137
|
+
compass-h5bp (1.0.0)
|
138
|
+
compass (~> 1.0, >= 1.0.3)
|
139
|
+
compass-import-once (1.0.5)
|
140
|
+
sass (>= 3.2, < 3.5)
|
141
|
+
connection_pool (2.2.0)
|
142
|
+
database_cleaner (1.4.1)
|
102
143
|
debug_inspector (0.0.2)
|
103
|
-
debugger-linecache (1.2.0)
|
104
144
|
diff-lcs (1.2.5)
|
105
145
|
docile (1.1.5)
|
106
|
-
dotenv (
|
107
|
-
dotenv-rails (
|
108
|
-
dotenv (=
|
146
|
+
dotenv (2.0.2)
|
147
|
+
dotenv-rails (2.0.2)
|
148
|
+
dotenv (= 2.0.2)
|
149
|
+
railties (~> 4.0)
|
109
150
|
erubis (2.7.0)
|
110
|
-
execjs (2.
|
151
|
+
execjs (2.5.2)
|
111
152
|
factory_girl (4.5.0)
|
112
153
|
activesupport (>= 3.0.0)
|
113
154
|
factory_girl_rails (4.5.0)
|
114
155
|
factory_girl (~> 4.5.0)
|
115
156
|
railties (>= 3.0.0)
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
157
|
+
faker (1.4.3)
|
158
|
+
i18n (~> 0.5)
|
159
|
+
ffi (1.9.8)
|
160
|
+
font-awesome-sass (4.3.2.1)
|
161
|
+
sass (~> 3.2)
|
162
|
+
globalid (0.3.5)
|
163
|
+
activesupport (>= 4.1.0)
|
164
|
+
haml (4.0.6)
|
122
165
|
tilt
|
123
|
-
haml-rails (0.
|
166
|
+
haml-rails (0.9.0)
|
124
167
|
actionpack (>= 4.0.1)
|
125
168
|
activesupport (>= 4.0.1)
|
126
|
-
haml (>=
|
169
|
+
haml (>= 4.0.6, < 5.0)
|
170
|
+
html2haml (>= 1.0.1)
|
127
171
|
railties (>= 4.0.1)
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
mongoid (~> 4.0.0.rc2)
|
134
|
-
mongoid-simple-tags (~> 0.1)
|
135
|
-
mongoid_orderable (~> 4.1)
|
136
|
-
rails (~> 4.1)
|
137
|
-
rails-i18n (~> 4.0)
|
138
|
-
sass-rails (~> 4.0.3)
|
139
|
-
simple_form (~> 3.1.0.rc2)
|
140
|
-
slim (~> 2.1.0)
|
141
|
-
hike (1.2.3)
|
172
|
+
html2haml (2.0.0)
|
173
|
+
erubis (~> 2.7.0)
|
174
|
+
haml (~> 4.0.0)
|
175
|
+
nokogiri (~> 1.6.0)
|
176
|
+
ruby_parser (~> 3.5)
|
142
177
|
html5-rails (0.1.0)
|
143
178
|
jquery-rails (>= 2.0)
|
144
179
|
railties (>= 3.2)
|
145
180
|
thor (~> 0.14)
|
146
|
-
i18n (0.
|
147
|
-
jquery-rails (
|
148
|
-
|
181
|
+
i18n (0.7.0)
|
182
|
+
jquery-rails (4.0.4)
|
183
|
+
rails-dom-testing (~> 1.0)
|
184
|
+
railties (>= 4.2.0)
|
149
185
|
thor (>= 0.14, < 2.0)
|
150
|
-
json (1.8.
|
151
|
-
kaminari (0.16.
|
186
|
+
json (1.8.3)
|
187
|
+
kaminari (0.16.3)
|
152
188
|
actionpack (>= 3.0.0)
|
153
189
|
activesupport (>= 3.0.0)
|
154
190
|
launchy (2.4.3)
|
155
191
|
addressable (~> 2.3)
|
192
|
+
loofah (2.0.2)
|
193
|
+
nokogiri (>= 1.5.9)
|
156
194
|
mail (2.6.3)
|
157
195
|
mime-types (>= 1.16, < 3)
|
158
196
|
method_source (0.8.2)
|
159
|
-
mime-types (2.
|
160
|
-
mini_portile (0.6.
|
161
|
-
minitest (5.
|
162
|
-
mongoid (4.0.
|
197
|
+
mime-types (2.6.1)
|
198
|
+
mini_portile (0.6.2)
|
199
|
+
minitest (5.7.0)
|
200
|
+
mongoid (4.0.2)
|
163
201
|
activemodel (~> 4.0)
|
164
202
|
moped (~> 2.0.0)
|
165
203
|
origin (~> 2.1)
|
166
204
|
tzinfo (>= 0.3.37)
|
167
|
-
mongoid-rspec (
|
168
|
-
mongoid (
|
205
|
+
mongoid-rspec (2.2.0)
|
206
|
+
mongoid (~> 4.0.0)
|
169
207
|
rake
|
170
|
-
rspec (
|
208
|
+
rspec (~> 3.1)
|
171
209
|
mongoid-simple-tags (0.1.3)
|
172
210
|
json (~> 1.8)
|
173
211
|
mongoid (>= 3.0.3)
|
174
|
-
mongoid_orderable (4.1.
|
212
|
+
mongoid_orderable (4.1.1)
|
175
213
|
mongoid
|
176
|
-
moped (2.0.
|
177
|
-
bson (~>
|
214
|
+
moped (2.0.6)
|
215
|
+
bson (~> 3.0)
|
178
216
|
connection_pool (~> 2.0)
|
179
217
|
optionable (~> 0.2.0)
|
180
|
-
multi_json (1.
|
181
|
-
nokogiri (1.6.
|
218
|
+
multi_json (1.11.1)
|
219
|
+
nokogiri (1.6.6.2)
|
182
220
|
mini_portile (~> 0.6.0)
|
183
221
|
optionable (0.2.0)
|
184
222
|
origin (2.1.1)
|
@@ -186,93 +224,110 @@ GEM
|
|
186
224
|
coderay (~> 1.1.0)
|
187
225
|
method_source (~> 0.8.1)
|
188
226
|
slop (~> 3.4)
|
189
|
-
pry-byebug (
|
190
|
-
byebug (~>
|
227
|
+
pry-byebug (3.1.0)
|
228
|
+
byebug (~> 4.0)
|
191
229
|
pry (~> 0.10)
|
192
|
-
quiet_assets (1.0
|
230
|
+
quiet_assets (1.1.0)
|
193
231
|
railties (>= 3.1, < 5.0)
|
194
|
-
rack (1.
|
195
|
-
rack-test (0.6.
|
232
|
+
rack (1.6.4)
|
233
|
+
rack-test (0.6.3)
|
196
234
|
rack (>= 1.0)
|
197
|
-
rails (4.
|
198
|
-
actionmailer (= 4.
|
199
|
-
actionpack (= 4.
|
200
|
-
actionview (= 4.
|
201
|
-
|
202
|
-
|
203
|
-
|
235
|
+
rails (4.2.2)
|
236
|
+
actionmailer (= 4.2.2)
|
237
|
+
actionpack (= 4.2.2)
|
238
|
+
actionview (= 4.2.2)
|
239
|
+
activejob (= 4.2.2)
|
240
|
+
activemodel (= 4.2.2)
|
241
|
+
activerecord (= 4.2.2)
|
242
|
+
activesupport (= 4.2.2)
|
204
243
|
bundler (>= 1.3.0, < 2.0)
|
205
|
-
railties (= 4.
|
206
|
-
sprockets-rails
|
207
|
-
rails-
|
244
|
+
railties (= 4.2.2)
|
245
|
+
sprockets-rails
|
246
|
+
rails-deprecated_sanitizer (1.0.3)
|
247
|
+
activesupport (>= 4.2.0.alpha)
|
248
|
+
rails-dom-testing (1.0.6)
|
249
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
250
|
+
nokogiri (~> 1.6.0)
|
251
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
252
|
+
rails-html-sanitizer (1.0.2)
|
253
|
+
loofah (~> 2.0)
|
254
|
+
rails-i18n (4.0.4)
|
208
255
|
i18n (~> 0.6)
|
209
256
|
railties (~> 4.0)
|
210
|
-
railties (4.
|
211
|
-
actionpack (= 4.
|
212
|
-
activesupport (= 4.
|
257
|
+
railties (4.2.2)
|
258
|
+
actionpack (= 4.2.2)
|
259
|
+
activesupport (= 4.2.2)
|
213
260
|
rake (>= 0.8.7)
|
214
261
|
thor (>= 0.18.1, < 2.0)
|
215
|
-
rake (10.
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
262
|
+
rake (10.4.2)
|
263
|
+
rb-fsevent (0.9.5)
|
264
|
+
rb-inotify (0.9.5)
|
265
|
+
ffi (>= 0.5.0)
|
266
|
+
responders (2.1.0)
|
267
|
+
railties (>= 4.2.0, < 5)
|
268
|
+
rspec (3.3.0)
|
269
|
+
rspec-core (~> 3.3.0)
|
270
|
+
rspec-expectations (~> 3.3.0)
|
271
|
+
rspec-mocks (~> 3.3.0)
|
272
|
+
rspec-collection_matchers (1.1.2)
|
221
273
|
rspec-expectations (>= 2.99.0.beta1)
|
222
|
-
rspec-core (3.1
|
223
|
-
rspec-support (~> 3.
|
224
|
-
rspec-expectations (3.
|
274
|
+
rspec-core (3.3.1)
|
275
|
+
rspec-support (~> 3.3.0)
|
276
|
+
rspec-expectations (3.3.0)
|
225
277
|
diff-lcs (>= 1.2.0, < 2.0)
|
226
|
-
rspec-support (~> 3.
|
227
|
-
rspec-mocks (3.1
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
rspec-
|
235
|
-
rspec-
|
236
|
-
rspec-
|
237
|
-
|
238
|
-
|
239
|
-
|
278
|
+
rspec-support (~> 3.3.0)
|
279
|
+
rspec-mocks (3.3.1)
|
280
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
281
|
+
rspec-support (~> 3.3.0)
|
282
|
+
rspec-rails (3.3.2)
|
283
|
+
actionpack (>= 3.0, < 4.3)
|
284
|
+
activesupport (>= 3.0, < 4.3)
|
285
|
+
railties (>= 3.0, < 4.3)
|
286
|
+
rspec-core (~> 3.3.0)
|
287
|
+
rspec-expectations (~> 3.3.0)
|
288
|
+
rspec-mocks (~> 3.3.0)
|
289
|
+
rspec-support (~> 3.3.0)
|
290
|
+
rspec-support (3.3.0)
|
291
|
+
ruby_parser (3.7.0)
|
292
|
+
sexp_processor (~> 4.1)
|
293
|
+
sass (3.4.14)
|
294
|
+
sass-rails (5.0.3)
|
240
295
|
railties (>= 4.0.0, < 5.0)
|
241
|
-
sass (~> 3.
|
242
|
-
sprockets (
|
243
|
-
sprockets-rails (
|
244
|
-
|
296
|
+
sass (~> 3.1)
|
297
|
+
sprockets (>= 2.8, < 4.0)
|
298
|
+
sprockets-rails (>= 2.0, < 4.0)
|
299
|
+
tilt (~> 1.1)
|
300
|
+
sexp_processor (4.6.0)
|
301
|
+
simple_form (3.1.0)
|
245
302
|
actionpack (~> 4.0)
|
246
303
|
activemodel (~> 4.0)
|
247
|
-
simplecov (0.
|
304
|
+
simplecov (0.10.0)
|
248
305
|
docile (~> 1.1.0)
|
249
|
-
|
250
|
-
simplecov-html (~> 0.
|
251
|
-
simplecov-html (0.
|
252
|
-
slim (
|
253
|
-
temple (~> 0.
|
306
|
+
json (~> 1.8)
|
307
|
+
simplecov-html (~> 0.10.0)
|
308
|
+
simplecov-html (0.10.0)
|
309
|
+
slim (3.0.6)
|
310
|
+
temple (~> 0.7.3)
|
254
311
|
tilt (>= 1.3.3, < 2.1)
|
255
|
-
slim-rails (
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
312
|
+
slim-rails (3.0.1)
|
313
|
+
actionmailer (>= 3.1, < 5.0)
|
314
|
+
actionpack (>= 3.1, < 5.0)
|
315
|
+
activesupport (>= 3.1, < 5.0)
|
316
|
+
railties (>= 3.1, < 5.0)
|
317
|
+
slim (~> 3.0)
|
260
318
|
slop (3.6.0)
|
261
319
|
spork (0.9.2)
|
262
|
-
sprockets (2.
|
263
|
-
hike (~> 1.2)
|
264
|
-
multi_json (~> 1.0)
|
320
|
+
sprockets (3.2.0)
|
265
321
|
rack (~> 1.0)
|
266
|
-
|
267
|
-
sprockets-rails (2.2.0)
|
322
|
+
sprockets-rails (2.3.1)
|
268
323
|
actionpack (>= 3.0)
|
269
324
|
activesupport (>= 3.0)
|
270
325
|
sprockets (>= 2.8, < 4.0)
|
271
326
|
sys-uname (0.9.2)
|
272
327
|
ffi (>= 1.0.0)
|
273
|
-
temple (0.6
|
328
|
+
temple (0.7.6)
|
274
329
|
thor (0.19.1)
|
275
|
-
thread_safe (0.3.
|
330
|
+
thread_safe (0.3.5)
|
276
331
|
tilt (1.4.1)
|
277
332
|
tzinfo (1.2.2)
|
278
333
|
thread_safe (~> 0.1)
|
@@ -291,17 +346,18 @@ DEPENDENCIES
|
|
291
346
|
binding_of_caller
|
292
347
|
capybara
|
293
348
|
compass-h5bp
|
294
|
-
database_cleaner
|
349
|
+
database_cleaner (~> 1.3)
|
295
350
|
dotenv-rails
|
296
351
|
factory_girl_rails
|
297
|
-
|
298
|
-
helena (~> 1.0.0.
|
352
|
+
faker
|
353
|
+
helena (~> 1.0.0.rc2)!
|
299
354
|
helena_administration!
|
300
355
|
launchy
|
301
356
|
mongoid-rspec
|
302
357
|
pry
|
303
358
|
pry-byebug
|
304
359
|
quiet_assets
|
360
|
+
responders (~> 2.0)
|
305
361
|
rspec-collection_matchers (~> 1)
|
306
362
|
rspec-core
|
307
363
|
rspec-rails
|
data/README.md
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
[![Build Status](https://img.shields.io/travis/gurix/helena_administration/master.svg?style=flat)](https://travis-ci.org/gurix/helena_administration)
|
2
|
+
[![Code Climate](https://img.shields.io/codeclimate/github/gurix/helena_administration.svg?style=flat)](https://codeclimate.com/github/gurix/helena_administration)
|
3
|
+
[![Dependency Status](https://img.shields.io/gem/v/helena_administration.svg?style=flat)](https://rubygems.org/gems/helena_administration)
|
4
|
+
[![Dependency Status](https://gemnasium.com/gurix/helena_administration.svg)](https://gemnasium.com/gurix/helena_administration)
|
5
|
+
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/gurix/helena?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
2
6
|
|
3
7
|
## Helena Administration
|
4
8
|
|
@@ -32,16 +36,13 @@ Add the following line to your routes to include administration in your App
|
|
32
36
|
mount HelenaAdministration::Engine, at: '/admin'
|
33
37
|
```
|
34
38
|
|
35
|
-
|
39
|
+
To protect you can use i.e devise. See https://github.com/plataformatec/devise/wiki/How-To:-Define-resource-actions-that-require-authentication-using-routes.rb
|
36
40
|
|
37
41
|
```ruby
|
38
|
-
|
39
|
-
|
40
|
-
current_user.admin? if current_user
|
41
|
-
end
|
42
|
+
authenticate :user do
|
43
|
+
mount HelenaAdministration::Engine, at: '/admin'
|
42
44
|
end
|
43
|
-
|
44
|
-
```
|
45
|
+
```
|
45
46
|
|
46
47
|
## Contributing
|
47
48
|
|
@@ -15,7 +15,8 @@
|
|
15
15
|
// @import 'compass/css3';
|
16
16
|
@import 'bootstrap-sprockets'
|
17
17
|
@import 'bootstrap'
|
18
|
-
@import 'font-awesome
|
18
|
+
@import 'font-awesome-sprockets'
|
19
|
+
@import 'font-awesome'
|
19
20
|
|
20
21
|
|
21
22
|
//-----------------------------------------
|
@@ -24,4 +25,4 @@
|
|
24
25
|
@import 'layout'
|
25
26
|
@import media_queries
|
26
27
|
@import 'dashboard'
|
27
|
-
@import 'codemirror
|
28
|
+
@import 'codemirror'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module HelenaAdministration
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
-
before_action :set_locale
|
3
|
+
before_action :set_locale
|
4
4
|
|
5
5
|
def add_breadcrumb(name, path = nil, options = {})
|
6
6
|
super(name.presence || t('shared.untitled'), path, options)
|
@@ -9,11 +9,5 @@ module HelenaAdministration
|
|
9
9
|
def set_locale
|
10
10
|
I18n.locale = params[:locale] || I18n.default_locale
|
11
11
|
end
|
12
|
-
|
13
|
-
helper_method :can_administer?
|
14
|
-
|
15
|
-
def authenticate_administrator
|
16
|
-
fail(ActionController::RoutingError, 'Access Denied') unless can_administer?
|
17
|
-
end
|
18
12
|
end
|
19
13
|
end
|
@@ -21,7 +21,7 @@ module HelenaAdministration
|
|
21
21
|
else
|
22
22
|
flash.now[:danger] = t 'shared.actions.error'
|
23
23
|
end
|
24
|
-
respond_with [@survey, @version, @question_group]
|
24
|
+
respond_with @question_group, location: [@survey, @version, @question_group]
|
25
25
|
end
|
26
26
|
|
27
27
|
def edit
|
@@ -35,7 +35,7 @@ module HelenaAdministration
|
|
35
35
|
flash.now[:danger] = t 'shared.actions.error'
|
36
36
|
add_breadcrumb @question_group.title_was
|
37
37
|
end
|
38
|
-
respond_with [@survey, @version, @question_group]
|
38
|
+
respond_with @question_group, location: [@survey, @version, @question_group]
|
39
39
|
end
|
40
40
|
|
41
41
|
def destroy
|