helena_administration 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rubocop.yml +18 -0
  4. data/.travis.yml +6 -0
  5. data/Gemfile +44 -0
  6. data/Gemfile.lock +309 -0
  7. data/MIT-LICENSE +20 -0
  8. data/README.md +82 -0
  9. data/Rakefile +28 -0
  10. data/app/assets/images/helena_administration/.keep +0 -0
  11. data/app/assets/javascripts/helena_administration.js.coffee +20 -0
  12. data/app/assets/javascripts/polyfills.js +10 -0
  13. data/app/assets/stylesheets/_dashboard.sass +4 -0
  14. data/app/assets/stylesheets/_layout.sass +50 -0
  15. data/app/assets/stylesheets/_media_queries.scss +18 -0
  16. data/app/assets/stylesheets/_variables.sass +19 -0
  17. data/app/assets/stylesheets/helena_administration.css.sass +27 -0
  18. data/app/controllers/helena_administration/application_controller.rb +19 -0
  19. data/app/controllers/helena_administration/dashboard_controller.rb +11 -0
  20. data/app/controllers/helena_administration/import_surveys_controller.rb +40 -0
  21. data/app/controllers/helena_administration/question_groups_controller.rb +68 -0
  22. data/app/controllers/helena_administration/questions/checkbox_groups_controller.rb +15 -0
  23. data/app/controllers/helena_administration/questions/checkbox_matrix_controller.rb +7 -0
  24. data/app/controllers/helena_administration/questions/long_texts_controller.rb +11 -0
  25. data/app/controllers/helena_administration/questions/radio_groups_controller.rb +15 -0
  26. data/app/controllers/helena_administration/questions/radio_matrix_controller.rb +7 -0
  27. data/app/controllers/helena_administration/questions/short_texts_controller.rb +11 -0
  28. data/app/controllers/helena_administration/questions/static_texts_controller.rb +11 -0
  29. data/app/controllers/helena_administration/questions_controller.rb +96 -0
  30. data/app/controllers/helena_administration/sessions_controller.rb +60 -0
  31. data/app/controllers/helena_administration/surveys_controller.rb +71 -0
  32. data/app/controllers/helena_administration/versions_controller.rb +82 -0
  33. data/app/helpers/helena_administration/application_helper.rb +14 -0
  34. data/app/models/helena_administration/import_survey_form.rb +9 -0
  35. data/app/views/helena_administration/application/_chromeframe.html.slim +4 -0
  36. data/app/views/helena_administration/application/_flash_messages.html.haml +5 -0
  37. data/app/views/helena_administration/application/_head.html.slim +13 -0
  38. data/app/views/helena_administration/application/_header.html.slim +16 -0
  39. data/app/views/helena_administration/dashboard/index.html.slim +14 -0
  40. data/app/views/helena_administration/import_surveys/_form.html.slim +11 -0
  41. data/app/views/helena_administration/import_surveys/new.html.slim +1 -0
  42. data/app/views/helena_administration/kaminari/_first_page.html.slim +2 -0
  43. data/app/views/helena_administration/kaminari/_gap.html.slim +2 -0
  44. data/app/views/helena_administration/kaminari/_last_page.html.slim +2 -0
  45. data/app/views/helena_administration/kaminari/_next_page.html.slim +2 -0
  46. data/app/views/helena_administration/kaminari/_page.html.slim +2 -0
  47. data/app/views/helena_administration/kaminari/_paginator.html.slim +11 -0
  48. data/app/views/helena_administration/kaminari/_prev_page.html.slim +2 -0
  49. data/app/views/helena_administration/layouts/application.html.slim +13 -0
  50. data/app/views/helena_administration/question_groups/_form.html.slim +5 -0
  51. data/app/views/helena_administration/question_groups/edit.html.slim +1 -0
  52. data/app/views/helena_administration/question_groups/new.html.slim +1 -0
  53. data/app/views/helena_administration/question_groups/show.html.slim +60 -0
  54. data/app/views/helena_administration/questions/_form.html.slim +15 -0
  55. data/app/views/helena_administration/questions/_labels.html.slim +24 -0
  56. data/app/views/helena_administration/questions/_sub_questions.html.slim +32 -0
  57. data/app/views/helena_administration/questions/edit.html.slim +1 -0
  58. data/app/views/helena_administration/questions/new.html.slim +1 -0
  59. data/app/views/helena_administration/questions/show.html.slim +26 -0
  60. data/app/views/helena_administration/sessions/_form.html.slim +8 -0
  61. data/app/views/helena_administration/sessions/edit.html.slim +1 -0
  62. data/app/views/helena_administration/surveys/_form.html.slim +5 -0
  63. data/app/views/helena_administration/surveys/edit.html.slim +1 -0
  64. data/app/views/helena_administration/surveys/index.html.slim +34 -0
  65. data/app/views/helena_administration/surveys/new.html.slim +1 -0
  66. data/app/views/helena_administration/surveys/show.html.slim +120 -0
  67. data/app/views/helena_administration/versions/_form.html.slim +14 -0
  68. data/app/views/helena_administration/versions/edit.html.slim +1 -0
  69. data/app/views/helena_administration/versions/new.html.slim +1 -0
  70. data/app/views/helena_administration/versions/show.html.slim +68 -0
  71. data/app/views/layouts/helena_administration/application.html.slim +10 -0
  72. data/bin/rails +12 -0
  73. data/config/compass.rb +2 -0
  74. data/config/html5_rails.yml +26 -0
  75. data/config/locales/en.yml +21 -0
  76. data/config/locales/views/dashboard.en.yml +6 -0
  77. data/config/locales/views/import_surveys.en.yml +11 -0
  78. data/config/locales/views/question_groups.en.yml +5 -0
  79. data/config/locales/views/questions.en.yml +5 -0
  80. data/config/locales/views/surveys.en.yml +10 -0
  81. data/config/locales/views/versions.en.yml +11 -0
  82. data/config/routes.rb +24 -0
  83. data/coverage/.resultset.json.lock +0 -0
  84. data/coverage/assets/0.8.0/application.css +799 -0
  85. data/coverage/assets/0.8.0/application.js +1559 -0
  86. data/coverage/assets/0.8.0/colorbox/border.png +0 -0
  87. data/coverage/assets/0.8.0/colorbox/controls.png +0 -0
  88. data/coverage/assets/0.8.0/colorbox/loading.gif +0 -0
  89. data/coverage/assets/0.8.0/colorbox/loading_background.png +0 -0
  90. data/coverage/assets/0.8.0/favicon_green.png +0 -0
  91. data/coverage/assets/0.8.0/favicon_red.png +0 -0
  92. data/coverage/assets/0.8.0/favicon_yellow.png +0 -0
  93. data/coverage/assets/0.8.0/loading.gif +0 -0
  94. data/coverage/assets/0.8.0/magnify.png +0 -0
  95. data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  96. data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  97. data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  98. data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  99. data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  100. data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  101. data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  102. data/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  103. data/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  104. data/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  105. data/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  106. data/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  107. data/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  108. data/helena_administration.gemspec +37 -0
  109. data/lib/helena_administration/engine.rb +13 -0
  110. data/lib/helena_administration/version.rb +3 -0
  111. data/lib/helena_administration.rb +15 -0
  112. data/lib/tasks/helena_administration_tasks.rake +4 -0
  113. data/spec/controllers/dashboard_controller_spec.rb +11 -0
  114. data/spec/controllers/sessions_controller_spec.rb +102 -0
  115. data/spec/controllers/survey_controller_spec.rb +36 -0
  116. data/spec/dummy/README.rdoc +28 -0
  117. data/spec/dummy/Rakefile +6 -0
  118. data/spec/dummy/app/assets/images/.keep +0 -0
  119. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  120. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  121. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  122. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  123. data/spec/dummy/app/decorators/controllers/helena_administration/application_controller_decorator.rb +5 -0
  124. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  125. data/spec/dummy/app/mailers/.keep +0 -0
  126. data/spec/dummy/app/models/.keep +0 -0
  127. data/spec/dummy/app/models/concerns/.keep +0 -0
  128. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  129. data/spec/dummy/bin/bundle +3 -0
  130. data/spec/dummy/bin/rails +4 -0
  131. data/spec/dummy/bin/rake +4 -0
  132. data/spec/dummy/config/application.rb +27 -0
  133. data/spec/dummy/config/boot.rb +5 -0
  134. data/spec/dummy/config/environment.rb +5 -0
  135. data/spec/dummy/config/environments/development.rb +34 -0
  136. data/spec/dummy/config/environments/production.rb +78 -0
  137. data/spec/dummy/config/environments/test.rb +39 -0
  138. data/spec/dummy/config/initializers/assets.rb +9 -0
  139. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  140. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  141. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  142. data/spec/dummy/config/initializers/inflections.rb +16 -0
  143. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  144. data/spec/dummy/config/initializers/session_store.rb +3 -0
  145. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  146. data/spec/dummy/config/locales/en.yml +23 -0
  147. data/spec/dummy/config/mongoid.yml +13 -0
  148. data/spec/dummy/config/routes.rb +4 -0
  149. data/spec/dummy/config/secrets.yml +22 -0
  150. data/spec/dummy/config.ru +4 -0
  151. data/spec/dummy/lib/assets/.keep +0 -0
  152. data/spec/dummy/log/.keep +0 -0
  153. data/spec/dummy/public/404.html +67 -0
  154. data/spec/dummy/public/422.html +67 -0
  155. data/spec/dummy/public/500.html +66 -0
  156. data/spec/dummy/public/favicon.ico +0 -0
  157. data/spec/features/dashboard/index.html.slim_spec.rb +9 -0
  158. data/spec/features/question_groups/manage_question_groups_spec.rb +97 -0
  159. data/spec/features/questions/manage_questions_spec.rb +108 -0
  160. data/spec/features/questions/question_types/manage_checkbox_group_question_spec.rb +53 -0
  161. data/spec/features/questions/question_types/manage_long_text_question_spec.rb +22 -0
  162. data/spec/features/questions/question_types/manage_radio_group_question_spec.rb +57 -0
  163. data/spec/features/questions/question_types/manage_radio_matrix_question_spec.rb +78 -0
  164. data/spec/features/questions/question_types/manage_short_text_question_spec.rb +20 -0
  165. data/spec/features/questions/question_types/manage_static_text_question_spec.rb +18 -0
  166. data/spec/features/sessions/manage_sessions_spec.rb +51 -0
  167. data/spec/features/surveys/manage_survey_spec.rb +95 -0
  168. data/spec/features/versions/manage_version_spec.rb +113 -0
  169. data/spec/helpers/applicatin_helper_spec.rb +17 -0
  170. data/spec/rails_helper.rb +23 -0
  171. data/spec/spec_helper.rb +63 -0
  172. data/spec/support/.keep +0 -0
  173. metadata +455 -0
Binary file
Binary file
@@ -0,0 +1,37 @@
1
+ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require 'helena_administration/version'
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = 'helena_administration'
9
+ s.version = HelenaAdministration::VERSION
10
+ s.authors = ['Markus Graf']
11
+ s.email = ['info@markusgraf.ch']
12
+ s.homepage = 'https://github.com/gurix/helena_administration'
13
+ s.summary = 'Helena Administration is a simple rails application that provides a user interface to manage apps running with the Helena framework.'
14
+ s.description = 'Helena Administration is a simple rails application that provides a user interface to manage apps running with the Helena framework.'
15
+ s.license = 'GPL3'
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {spec}/*`.split("\n")
19
+
20
+ s.add_runtime_dependency 'kaminari', '~> 0.16'
21
+ s.add_runtime_dependency 'rails', '~> 4.1'
22
+ s.add_runtime_dependency 'slim-rails', '~> 2.1'
23
+ s.add_runtime_dependency 'codemirror-rails', '~> 4.5'
24
+ s.add_dependency 'mongoid', '~> 4.0'
25
+ s.add_dependency 'mongoid_orderable', '~> 4.1'
26
+ s.add_dependency 'mongoid-simple-tags', '~> 0.1'
27
+ s.add_dependency 'haml-rails', '~> 0.5'
28
+ s.add_runtime_dependency 'html5-rails', '~> 0.1'
29
+ s.add_dependency 'jquery-rails', '~> 3.1'
30
+ s.add_runtime_dependency 'sass-rails', '~> 4.0'
31
+ s.add_dependency 'bootstrap-sass', '~> 3.2'
32
+ s.add_dependency 'simple_form', '~> 3.1.0.rc2'
33
+ s.add_dependency 'breadcrumbs_on_rails', '~> 2.3'
34
+ s.add_dependency 'rails-i18n', '~> 4.0'
35
+ s.add_runtime_dependency 'font-awesome-rails', '~> 4.2'
36
+ s.add_runtime_dependency 'coffee-rails', '~> 4.1'
37
+ end
@@ -0,0 +1,13 @@
1
+ module HelenaAdministration
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace HelenaAdministration
4
+ config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
5
+ config.assets.precompile += %w( helena_administration.js helena_administration.css )
6
+
7
+ config.to_prepare do
8
+ Dir.glob(Rails.root + 'app/decorators/**/*_decorator*.rb').each do |c|
9
+ require_dependency c
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,3 @@
1
+ module HelenaAdministration
2
+ VERSION = '0.0.2'
3
+ end
@@ -0,0 +1,15 @@
1
+ require 'helena_administration/engine'
2
+ require 'breadcrumbs_on_rails'
3
+ require 'html5-rails'
4
+ require 'bootstrap-sass'
5
+ require 'font-awesome-rails'
6
+ require 'codemirror-rails'
7
+ require 'jquery-rails'
8
+ require 'helena'
9
+ require 'mongoid'
10
+ require 'mongoid_orderable'
11
+ require 'mongoid-simple-tags'
12
+ require 'kaminari'
13
+
14
+ module HelenaAdministration
15
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :helena_administration do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,11 @@
1
+ require 'rails_helper'
2
+
3
+ describe HelenaAdministration::DashboardController do
4
+ routes { HelenaAdministration::Engine.routes }
5
+ describe 'GET index' do
6
+ it 'returns http success' do
7
+ get :index
8
+ expect(response).to have_http_status(:success)
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,102 @@
1
+ require 'rails_helper'
2
+
3
+ describe HelenaAdministration::SessionsController do
4
+ routes { HelenaAdministration::Engine.routes }
5
+
6
+ let(:survey) { create :survey }
7
+
8
+ context 'without authorization' do
9
+ before { allow_any_instance_of(HelenaAdministration::ApplicationController).to receive(:can_administer?).and_return false }
10
+
11
+ specify 'trying to list surveys throws an error' do
12
+ expect { get :index, survey_id: survey }.to raise_error(ActionController::RoutingError, 'Access Denied')
13
+ end
14
+
15
+ specify 'trying to export surveys as json throws an error' do
16
+ expect { get :index, survey_id: survey, format: :json }.to raise_error(ActionController::RoutingError, 'Access Denied')
17
+ end
18
+
19
+ specify 'trying to export surveys as csv throws an error' do
20
+ expect { get :index, survey_id: survey, format: :csv }.to raise_error(ActionController::RoutingError, 'Access Denied')
21
+ end
22
+ end
23
+
24
+ context 'with authorization' do
25
+ before do
26
+ create :session, survey: survey, answers: [
27
+ build(:string_answer, code: 'string_answer_1', value: 'abc'),
28
+ build(:integer_answer, code: 'integer_answer_1', value: '123')
29
+ ]
30
+ create :session, survey: survey, answers: [
31
+ build(:string_answer, code: 'string_answer_2', value: 'def, xyz'),
32
+ build(:integer_answer, code: 'integer_answer_2', value: '456')
33
+ ]
34
+ end
35
+
36
+ it 'return json result of all sessions' do
37
+ get :index, survey_id: survey, format: :json
38
+
39
+ first_result = ActiveSupport::JSON.decode(response.body).first
40
+
41
+ expect(first_result['answers'].first['code']).to eq 'string_answer_2'
42
+ expect(first_result['answers'].first['value']).to eq 'def, xyz'
43
+ expect(first_result['answers'].last['code']).to eq 'integer_answer_2'
44
+ expect(first_result['answers'].last['value']).to eq 456
45
+
46
+ last_result = ActiveSupport::JSON.decode(response.body).last
47
+
48
+ expect(last_result['answers'].first['code']).to eq 'string_answer_1'
49
+ expect(last_result['answers'].first['value']).to eq 'abc'
50
+ expect(last_result['answers'].last['code']).to eq 'integer_answer_1'
51
+ expect(last_result['answers'].last['value']).to eq 123
52
+ end
53
+
54
+ it 'return json result of all sessions' do
55
+ get :index, survey_id: survey, format: :json
56
+
57
+ first_result = ActiveSupport::JSON.decode(response.body).first
58
+
59
+ expect(first_result['answers'].first['code']).to eq 'string_answer_2'
60
+ expect(first_result['answers'].first['value']).to eq 'def, xyz'
61
+ expect(first_result['answers'].last['code']).to eq 'integer_answer_2'
62
+ expect(first_result['answers'].last['value']).to eq 456
63
+
64
+ last_result = ActiveSupport::JSON.decode(response.body).last
65
+
66
+ expect(last_result['answers'].first['code']).to eq 'string_answer_1'
67
+ expect(last_result['answers'].first['value']).to eq 'abc'
68
+ expect(last_result['answers'].last['code']).to eq 'integer_answer_1'
69
+ expect(last_result['answers'].last['value']).to eq 123
70
+ end
71
+
72
+ it 'return csv result of all sessions' do
73
+ get :index, survey_id: survey, format: :csv
74
+
75
+ csv = CSV.parse(response.body)
76
+ %w(string_answer_2 integer_answer_2 string_answer_1 integer_answer_1).each do |code|
77
+ expect(csv.first).to include code
78
+ end
79
+
80
+ ['456', 'def, xyz'].each do |value|
81
+ expect(csv[1]).to include value
82
+ end
83
+
84
+ %w(123 abc).each do |value|
85
+ expect(csv[2]).to include value
86
+ end
87
+ end
88
+
89
+ specify 'csv header for all sessions does not allow same column names for answers and session fields' do
90
+ create :session, survey: survey, answers: [
91
+ build(:boolean_answer, code: 'completed', value: true),
92
+ build(:string_answer, code: 'token', value: 'abcdefghijklmnopqrstuvwxyz')
93
+ ]
94
+ get :index, survey_id: survey, format: :csv
95
+
96
+ csv = CSV.parse(response.body)
97
+ %w(answer_token answer_completed).each do |code|
98
+ expect(csv.first).to include code
99
+ end
100
+ end
101
+ end
102
+ end
@@ -0,0 +1,36 @@
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
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails.application.load_tasks
File without changes
@@ -0,0 +1,13 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // compiled file.
9
+ //
10
+ // Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
11
+ // about supported directives.
12
+ //
13
+ //= require_tree .
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,5 @@
1
+ HelenaAdministration::ApplicationController.class_eval do
2
+ def can_administer?
3
+ true
4
+ end
5
+ end
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Dummy</title>
5
+ <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
6
+ <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
3
+ require_relative '../config/boot'
4
+ require 'rails/commands'
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env ruby
2
+ require_relative '../config/boot'
3
+ require 'rake'
4
+ Rake.application.run
@@ -0,0 +1,27 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ # Pick the frameworks you want:
4
+ require 'action_controller/railtie'
5
+ require 'action_mailer/railtie'
6
+ require 'action_view/railtie'
7
+ require 'sprockets/railtie'
8
+ # require "rails/test_unit/railtie"
9
+
10
+ Bundler.require(*Rails.groups)
11
+ require 'helena_administration'
12
+
13
+ module Dummy
14
+ class Application < Rails::Application
15
+ # Settings in config/environments/* take precedence over those specified here.
16
+ # Application configuration should go into files in config/initializers
17
+ # -- all .rb files in that directory are automatically loaded.
18
+
19
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
20
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
21
+ # config.time_zone = 'Central Time (US & Canada)'
22
+
23
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
24
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
25
+ # config.i18n.default_locale = :de
26
+ end
27
+ end