helena_administration 0.0.2 → 0.0.5

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 (42) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/Gemfile +5 -6
  4. data/Gemfile.lock +213 -157
  5. data/README.md +8 -7
  6. data/app/assets/stylesheets/helena_administration.css.sass +3 -2
  7. data/app/controllers/helena_administration/application_controller.rb +1 -7
  8. data/app/controllers/helena_administration/question_groups_controller.rb +2 -2
  9. data/app/controllers/helena_administration/questions/bipolar_radio_matrices_controller.rb +6 -0
  10. data/app/controllers/helena_administration/questions/{checkbox_matrix_controller.rb → checkbox_matrices_controller.rb} +1 -1
  11. data/app/controllers/helena_administration/questions/{radio_matrix_controller.rb → radio_matrices_controller.rb} +1 -1
  12. data/app/controllers/helena_administration/questions_controller.rb +4 -3
  13. data/app/controllers/helena_administration/sessions_controller.rb +46 -2
  14. data/app/controllers/helena_administration/versions_controller.rb +2 -2
  15. data/app/views/helena_administration/questions/_form.html.slim +1 -0
  16. data/config/routes.rb +3 -2
  17. data/helena_administration.gemspec +9 -6
  18. data/lib/helena_administration/version.rb +1 -1
  19. data/lib/helena_administration.rb +1 -1
  20. data/spec/controllers/dashboard_controller_spec.rb +1 -1
  21. data/spec/controllers/sessions_controller_spec.rb +69 -77
  22. data/spec/dummy/config/environments/test.rb +1 -1
  23. data/spec/dummy/config/initializers/assets.rb +1 -1
  24. data/spec/features/dashboard/index.html.slim_spec.rb +1 -1
  25. data/spec/features/question_groups/manage_question_groups_spec.rb +1 -3
  26. data/spec/features/questions/manage_questions_spec.rb +6 -1
  27. data/spec/features/questions/question_types/manage_bipolar_radio_matrix_question_spec.rb +78 -0
  28. data/spec/features/questions/question_types/manage_checkbox_group_question_spec.rb +1 -1
  29. data/spec/features/questions/question_types/manage_long_text_question_spec.rb +1 -1
  30. data/spec/features/questions/question_types/manage_radio_group_question_spec.rb +1 -1
  31. data/spec/features/questions/question_types/manage_radio_matrix_question_spec.rb +1 -1
  32. data/spec/features/questions/question_types/manage_short_text_question_spec.rb +1 -1
  33. data/spec/features/questions/question_types/manage_static_text_question_spec.rb +1 -1
  34. data/spec/features/sessions/manage_sessions_spec.rb +3 -1
  35. data/spec/features/surveys/manage_survey_spec.rb +1 -1
  36. data/spec/features/versions/manage_version_spec.rb +1 -3
  37. data/spec/helpers/applicatin_helper_spec.rb +1 -1
  38. data/spec/spec_helper.rb +8 -28
  39. metadata +48 -21
  40. data/spec/controllers/survey_controller_spec.rb +0 -36
  41. data/spec/dummy/app/decorators/controllers/helena_administration/application_controller_decorator.rb +0 -5
  42. data/spec/rails_helper.rb +0 -23
data/spec/spec_helper.rb CHANGED
@@ -4,6 +4,7 @@ SimpleCov.start
4
4
  ENV['RAILS_ENV'] ||= 'test'
5
5
  require File.expand_path('../dummy/config/environment.rb', __FILE__)
6
6
 
7
+ require 'rspec/rails'
7
8
  require 'factory_girl_rails'
8
9
  require 'database_cleaner'
9
10
  require 'mongoid-rspec'
@@ -12,42 +13,21 @@ require 'rspec/collection_matchers'
12
13
  require 'dotenv'
13
14
  Dotenv.load
14
15
 
15
- RSpec.configure do |config|
16
-
17
- # Requires supporting ruby files with custom matchers and macros, etc,
18
- # in spec/support/ and its subdirectories.
19
- Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
20
-
21
- config.include Rails.application.routes.url_helpers
22
- config.include ActionView::RecordIdentifier
23
-
24
- config.expect_with :rspec do |expectations|
25
- # This option will default to `true` in RSpec 4. It makes the `description`
26
- # and `failure_message` of custom matchers include text for helper methods
27
- # defined using `chain`, e.g.:
28
- # be_bigger_than(2).and_smaller_than(4).description
29
- # # => "be bigger than 2 and smaller than 4"
30
- # ...rather than:
31
- # # => "be bigger than 2"
32
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
33
- end
34
-
35
- # rspec-mocks config goes here. You can use an alternate test double
36
- # library (such as bogus or mocha) by changing the `mock_with` option here.
37
- config.mock_with :rspec do |mocks|
38
- # Prevents you from mocking or stubbing a method that does not exist on
39
- # a real object. This is generally recommended, and will default to
40
- # `true` in RSpec 4.
41
- mocks.verify_partial_doubles = true
42
- end
16
+ ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
17
+ Dir[File.join(ENGINE_RAILS_ROOT, 'spec/support/**/*.rb')].each { |f| require f }
43
18
 
19
+ RSpec.configure do |config|
44
20
  config.include HelenaAdministration::Engine.routes.url_helpers
45
21
 
22
+ config.include ActionView::RecordIdentifier, type: :feature
23
+
46
24
  config.include Mongoid::Matchers, type: :model
47
25
 
48
26
  # We don't want write FactoryGirl all the time
49
27
  config.include FactoryGirl::Syntax::Methods
50
28
 
29
+ config.infer_spec_type_from_file_location!
30
+
51
31
  config.order = :random
52
32
  config.profile_examples = 30
53
33
 
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.2
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Markus Graf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-17 00:00:00.000000000 Z
11
+ date: 2015-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari
@@ -30,42 +30,42 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '4.1'
33
+ version: '4.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '4.1'
40
+ version: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: slim-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '2.1'
47
+ version: '3.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '2.1'
54
+ version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: codemirror-rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '4.5'
61
+ version: '5'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '4.5'
68
+ version: '5'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: mongoid
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -142,28 +142,28 @@ dependencies:
142
142
  requirements:
143
143
  - - "~>"
144
144
  - !ruby/object:Gem::Version
145
- version: '3.1'
145
+ version: '4'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - "~>"
151
151
  - !ruby/object:Gem::Version
152
- version: '3.1'
152
+ version: '4'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: sass-rails
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
157
  - - "~>"
158
158
  - !ruby/object:Gem::Version
159
- version: '4.0'
159
+ version: '5.0'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
- version: '4.0'
166
+ version: '5.0'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: bootstrap-sass
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -221,19 +221,19 @@ dependencies:
221
221
  - !ruby/object:Gem::Version
222
222
  version: '4.0'
223
223
  - !ruby/object:Gem::Dependency
224
- name: font-awesome-rails
224
+ name: font-awesome-sass
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '4.2'
229
+ version: 4.3.0
230
230
  type: :runtime
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '4.2'
236
+ version: 4.3.0
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: coffee-rails
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -248,6 +248,34 @@ dependencies:
248
248
  - - "~>"
249
249
  - !ruby/object:Gem::Version
250
250
  version: '4.1'
251
+ - !ruby/object:Gem::Dependency
252
+ name: responders
253
+ requirement: !ruby/object:Gem::Requirement
254
+ requirements:
255
+ - - "~>"
256
+ - !ruby/object:Gem::Version
257
+ version: '2.0'
258
+ type: :runtime
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ requirements:
262
+ - - "~>"
263
+ - !ruby/object:Gem::Version
264
+ version: '2.0'
265
+ - !ruby/object:Gem::Dependency
266
+ name: database_cleaner
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - "~>"
270
+ - !ruby/object:Gem::Version
271
+ version: '1.3'
272
+ type: :development
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - "~>"
277
+ - !ruby/object:Gem::Version
278
+ version: '1.3'
251
279
  description: Helena Administration is a simple rails application that provides a user
252
280
  interface to manage apps running with the Helena framework.
253
281
  email:
@@ -276,11 +304,12 @@ files:
276
304
  - app/controllers/helena_administration/dashboard_controller.rb
277
305
  - app/controllers/helena_administration/import_surveys_controller.rb
278
306
  - app/controllers/helena_administration/question_groups_controller.rb
307
+ - app/controllers/helena_administration/questions/bipolar_radio_matrices_controller.rb
279
308
  - app/controllers/helena_administration/questions/checkbox_groups_controller.rb
280
- - app/controllers/helena_administration/questions/checkbox_matrix_controller.rb
309
+ - app/controllers/helena_administration/questions/checkbox_matrices_controller.rb
281
310
  - app/controllers/helena_administration/questions/long_texts_controller.rb
282
311
  - app/controllers/helena_administration/questions/radio_groups_controller.rb
283
- - app/controllers/helena_administration/questions/radio_matrix_controller.rb
312
+ - app/controllers/helena_administration/questions/radio_matrices_controller.rb
284
313
  - app/controllers/helena_administration/questions/short_texts_controller.rb
285
314
  - app/controllers/helena_administration/questions/static_texts_controller.rb
286
315
  - app/controllers/helena_administration/questions_controller.rb
@@ -369,7 +398,6 @@ files:
369
398
  - lib/tasks/helena_administration_tasks.rake
370
399
  - spec/controllers/dashboard_controller_spec.rb
371
400
  - spec/controllers/sessions_controller_spec.rb
372
- - spec/controllers/survey_controller_spec.rb
373
401
  - spec/dummy/README.rdoc
374
402
  - spec/dummy/Rakefile
375
403
  - spec/dummy/app/assets/images/.keep
@@ -377,7 +405,6 @@ files:
377
405
  - spec/dummy/app/assets/stylesheets/application.css
378
406
  - spec/dummy/app/controllers/application_controller.rb
379
407
  - spec/dummy/app/controllers/concerns/.keep
380
- - spec/dummy/app/decorators/controllers/helena_administration/application_controller_decorator.rb
381
408
  - spec/dummy/app/helpers/application_helper.rb
382
409
  - spec/dummy/app/mailers/.keep
383
410
  - spec/dummy/app/models/.keep
@@ -414,6 +441,7 @@ files:
414
441
  - spec/features/dashboard/index.html.slim_spec.rb
415
442
  - spec/features/question_groups/manage_question_groups_spec.rb
416
443
  - spec/features/questions/manage_questions_spec.rb
444
+ - spec/features/questions/question_types/manage_bipolar_radio_matrix_question_spec.rb
417
445
  - spec/features/questions/question_types/manage_checkbox_group_question_spec.rb
418
446
  - spec/features/questions/question_types/manage_long_text_question_spec.rb
419
447
  - spec/features/questions/question_types/manage_radio_group_question_spec.rb
@@ -424,7 +452,6 @@ files:
424
452
  - spec/features/surveys/manage_survey_spec.rb
425
453
  - spec/features/versions/manage_version_spec.rb
426
454
  - spec/helpers/applicatin_helper_spec.rb
427
- - spec/rails_helper.rb
428
455
  - spec/spec_helper.rb
429
456
  - spec/support/.keep
430
457
  homepage: https://github.com/gurix/helena_administration
@@ -447,7 +474,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
447
474
  version: '0'
448
475
  requirements: []
449
476
  rubyforge_project:
450
- rubygems_version: 2.2.2
477
+ rubygems_version: 2.4.5
451
478
  signing_key:
452
479
  specification_version: 4
453
480
  summary: Helena Administration is a simple rails application that provides a user
@@ -1,36 +0,0 @@
1
- require 'rails_helper'
2
-
3
- describe HelenaAdministration::SurveysController do
4
- routes { HelenaAdministration::Engine.routes }
5
-
6
- context 'without authorization' do
7
- before { allow_any_instance_of(HelenaAdministration::ApplicationController).to receive(:can_administer?).and_return false }
8
-
9
- specify 'trying to list surveys throws an error' do
10
- expect { get :index }.to raise_error(ActionController::RoutingError, 'Access Denied')
11
- end
12
-
13
- specify 'trying to edit a survey throws an error' do
14
- survey = create :survey
15
- expect { get :edit, id: survey }.to raise_error(ActionController::RoutingError, 'Access Denied')
16
- end
17
-
18
- specify 'trying to update a survey throws an error' do
19
- survey = create :survey
20
- expect { patch :update, id: survey }.to raise_error(ActionController::RoutingError, 'Access Denied')
21
- end
22
-
23
- specify 'trying to delete a survey throws an error' do
24
- survey = create :survey
25
- expect { delete :destroy, id: survey }.to raise_error(ActionController::RoutingError, 'Access Denied')
26
- end
27
-
28
- specify 'trying to add a survey throws an error' do
29
- expect { get :new }.to raise_error(ActionController::RoutingError, 'Access Denied')
30
- end
31
-
32
- specify 'trying to create a survey throws an error' do
33
- expect { post :create, some: :data }.to raise_error(ActionController::RoutingError, 'Access Denied')
34
- end
35
- end
36
- end
@@ -1,5 +0,0 @@
1
- HelenaAdministration::ApplicationController.class_eval do
2
- def can_administer?
3
- true
4
- end
5
- end
data/spec/rails_helper.rb DELETED
@@ -1,23 +0,0 @@
1
- # This file is copied to spec/ when you run 'rails generate rspec:install'
2
- ENV['RAILS_ENV'] ||= 'test'
3
- require 'spec_helper'
4
- require File.expand_path('../dummy/config/environment.rb', __FILE__)
5
- require 'rspec/rails'
6
- # Add additional requires below this line. Rails is not loaded until this point!
7
-
8
- # Requires supporting ruby files with custom matchers and macros, etc, in
9
- # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
10
- # run as spec files by default. This means that files in spec/support that end
11
- # in _spec.rb will both be required and run as specs, causing the specs to be
12
- # run twice. It is recommended that you do not name files matching this glob to
13
- # end with _spec.rb. You can configure this pattern with the --pattern
14
- # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
15
- #
16
- # The following line is provided for convenience purposes. It has the downside
17
- # of increasing the boot-up time by auto-requiring all files in the support
18
- # directory. Alternatively, in the individual `*_spec.rb` files, manually
19
- # require only the support files necessary.
20
- #
21
- # Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
22
-
23
- RSpec.configure(&:infer_spec_type_from_file_location!)