xing-framework 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (216) hide show
  1. checksums.yaml +4 -4
  2. data/default_configuration/base_app/API_DOC/README +23 -0
  3. data/default_configuration/base_app/API_DOC/admin-menus +167 -0
  4. data/default_configuration/base_app/API_DOC/admin-pages +173 -0
  5. data/default_configuration/base_app/API_DOC/content-block +10 -0
  6. data/default_configuration/base_app/API_DOC/navigation +54 -0
  7. data/default_configuration/base_app/API_DOC/page +38 -0
  8. data/default_configuration/base_app/CHANGELOG.md +122 -0
  9. data/default_configuration/base_app/Capfile +26 -0
  10. data/default_configuration/base_app/Gemfile +7 -0
  11. data/default_configuration/base_app/Gemfile.lock +155 -0
  12. data/default_configuration/base_app/README.md +24 -0
  13. data/default_configuration/base_app/Rakefile +25 -0
  14. data/default_configuration/base_app/backend/Gemfile +45 -0
  15. data/default_configuration/base_app/backend/Gemfile.lock +292 -0
  16. data/default_configuration/base_app/backend/README +12 -0
  17. data/default_configuration/base_app/backend/Rakefile +10 -0
  18. data/default_configuration/base_app/backend/app/controllers/application_controller.rb +3 -0
  19. data/default_configuration/base_app/backend/app/controllers/confirmations_controller.rb +3 -0
  20. data/default_configuration/base_app/backend/app/controllers/passwords_controller.rb +3 -0
  21. data/default_configuration/base_app/backend/app/controllers/registrations_controller.rb +15 -0
  22. data/default_configuration/base_app/backend/app/models/ability.rb +13 -0
  23. data/default_configuration/base_app/backend/app/models/role/admin.rb +8 -0
  24. data/default_configuration/base_app/backend/app/models/user.rb +43 -0
  25. data/default_configuration/base_app/backend/autotest/discover.rb +2 -0
  26. data/default_configuration/base_app/backend/bin/bundle +3 -0
  27. data/default_configuration/base_app/backend/bin/rails +4 -0
  28. data/default_configuration/base_app/backend/bin/rake +4 -0
  29. data/default_configuration/base_app/backend/config.ru +6 -0
  30. data/default_configuration/base_app/backend/config/application.rb +71 -0
  31. data/default_configuration/base_app/backend/config/boot.rb +4 -0
  32. data/default_configuration/base_app/backend/config/database.yml.ci +9 -0
  33. data/default_configuration/base_app/backend/config/database.yml.example +22 -0
  34. data/default_configuration/base_app/backend/config/environment.rb +5 -0
  35. data/default_configuration/base_app/backend/config/environments/development.rb +45 -0
  36. data/default_configuration/base_app/backend/config/environments/production.rb +78 -0
  37. data/default_configuration/base_app/backend/config/environments/staging.rb +48 -0
  38. data/default_configuration/base_app/backend/config/environments/test.rb +47 -0
  39. data/default_configuration/base_app/backend/config/initializers/assets.rb +8 -0
  40. data/default_configuration/base_app/backend/config/initializers/backtrace_silencers.rb +7 -0
  41. data/default_configuration/base_app/backend/config/initializers/constants.rb +1 -0
  42. data/default_configuration/base_app/backend/config/initializers/cookies_serializer.rb +3 -0
  43. data/default_configuration/base_app/backend/config/initializers/devise.rb +241 -0
  44. data/default_configuration/base_app/backend/config/initializers/devise_token_auth.rb +22 -0
  45. data/default_configuration/base_app/backend/config/initializers/filter_parameter_logging.rb +4 -0
  46. data/default_configuration/base_app/backend/config/initializers/inflections.rb +16 -0
  47. data/default_configuration/base_app/backend/config/initializers/mime_types.rb +4 -0
  48. data/default_configuration/base_app/backend/config/initializers/session_store.rb +3 -0
  49. data/default_configuration/base_app/backend/config/initializers/smtp.rb +25 -0
  50. data/default_configuration/base_app/backend/config/initializers/time_formats.rb +12 -0
  51. data/default_configuration/base_app/backend/config/initializers/wrap_parameters.rb +14 -0
  52. data/default_configuration/base_app/backend/config/locales/en.yml +23 -0
  53. data/default_configuration/base_app/backend/config/locales/json.yml +29 -0
  54. data/default_configuration/base_app/backend/config/routes.rb +33 -0
  55. data/default_configuration/base_app/backend/config/secrets.yml.ci +22 -0
  56. data/default_configuration/base_app/backend/config/secrets.yml.example +57 -0
  57. data/default_configuration/base_app/backend/config/sidekiq.yml +4 -0
  58. data/default_configuration/base_app/backend/db/sample_data/users.rake +10 -0
  59. data/default_configuration/base_app/backend/db/seeds.rb +14 -0
  60. data/default_configuration/base_app/backend/lib/static-app.rb +15 -0
  61. data/default_configuration/base_app/backend/public/404.html +26 -0
  62. data/default_configuration/base_app/backend/public/422.html +26 -0
  63. data/default_configuration/base_app/backend/public/500.html +26 -0
  64. data/default_configuration/base_app/backend/public/favicon.ico +0 -0
  65. data/default_configuration/base_app/backend/public/index.html +0 -0
  66. data/default_configuration/base_app/backend/public/robots.txt +5 -0
  67. data/default_configuration/base_app/backend/script/rails +6 -0
  68. data/default_configuration/base_app/backend/spec/factories/user_sessions_factory.rb +6 -0
  69. data/default_configuration/base_app/backend/spec/factories/users_factory.rb +35 -0
  70. data/default_configuration/base_app/backend/spec/features/user_sends_reset_password_email_spec.rb +30 -0
  71. data/default_configuration/base_app/backend/spec/features/user_signs_up_spec.rb +32 -0
  72. data/default_configuration/base_app/backend/spec/models/role/admin_spec.rb +12 -0
  73. data/default_configuration/base_app/backend/spec/models/role_spec.rb +48 -0
  74. data/default_configuration/base_app/backend/spec/models/user_spec.rb +59 -0
  75. data/default_configuration/base_app/backend/spec/requests/resources_index_spec.rb +22 -0
  76. data/default_configuration/base_app/backend/spec/spec_helper.rb +65 -0
  77. data/default_configuration/base_app/backend/spec/support/devise_helper.rb +78 -0
  78. data/default_configuration/base_app/backend/spec/support/log_tests.rb +5 -0
  79. data/default_configuration/base_app/backend/spec/support/session_helpers.rb +67 -0
  80. data/default_configuration/base_app/backend/spec/tasks/sample_data_rake_spec.rb +17 -0
  81. data/default_configuration/base_app/backend/static-app.ru +3 -0
  82. data/default_configuration/base_app/codeclimate.yml +7 -0
  83. data/default_configuration/base_app/config/compass.rb +21 -0
  84. data/default_configuration/base_app/config/deploy.rb +157 -0
  85. data/default_configuration/base_app/config/deploy/bundle-config +4 -0
  86. data/default_configuration/base_app/config/deploy/production.rb +7 -0
  87. data/default_configuration/base_app/config/deploy/staging.rb +6 -0
  88. data/default_configuration/base_app/doc/01_fail_resources.txt +173 -0
  89. data/default_configuration/base_app/doc/02_fail_auth.txt +165 -0
  90. data/default_configuration/base_app/doc/03_fail_menus.txt +174 -0
  91. data/default_configuration/base_app/dummy-api/admin/menu_items/10.json +15 -0
  92. data/default_configuration/base_app/dummy-api/admin/menu_items/11.json +15 -0
  93. data/default_configuration/base_app/dummy-api/admin/menu_items/12.json +15 -0
  94. data/default_configuration/base_app/dummy-api/admin/menu_items/13.json +15 -0
  95. data/default_configuration/base_app/dummy-api/admin/menu_items/14.json +15 -0
  96. data/default_configuration/base_app/dummy-api/admin/menu_items/15.json +15 -0
  97. data/default_configuration/base_app/dummy-api/admin/menu_items/16.json +15 -0
  98. data/default_configuration/base_app/dummy-api/admin/menus.json +23 -0
  99. data/default_configuration/base_app/dummy-api/admin/menus/1.json +118 -0
  100. data/default_configuration/base_app/dummy-api/admin/menus/2.json +8 -0
  101. data/default_configuration/base_app/dummy-api/admin/pages.json +105 -0
  102. data/default_configuration/base_app/dummy-api/admin/pages/about_us.json +45 -0
  103. data/default_configuration/base_app/dummy-api/admin/pages/contact_us.json +36 -0
  104. data/default_configuration/base_app/dummy-api/admin/pages/gallery.json +36 -0
  105. data/default_configuration/base_app/dummy-api/admin/pages/home.json +36 -0
  106. data/default_configuration/base_app/dummy-api/admin/pages/homepage.json +18 -0
  107. data/default_configuration/base_app/dummy-api/admin/pages/links.json +36 -0
  108. data/default_configuration/base_app/dummy-api/admin/pages/newsletter.json +54 -0
  109. data/default_configuration/base_app/dummy-api/homepage.json +14 -0
  110. data/default_configuration/base_app/dummy-api/navigation/main.json +119 -0
  111. data/default_configuration/base_app/dummy-api/pages/about_us.json +41 -0
  112. data/default_configuration/base_app/dummy-api/pages/contact_us.json +32 -0
  113. data/default_configuration/base_app/dummy-api/pages/gallery.json +32 -0
  114. data/default_configuration/base_app/dummy-api/pages/home.json +32 -0
  115. data/default_configuration/base_app/dummy-api/pages/homepage.json +14 -0
  116. data/default_configuration/base_app/dummy-api/pages/links.json +32 -0
  117. data/default_configuration/base_app/dummy-api/pages/newsletter.json +50 -0
  118. data/default_configuration/base_app/dump.rdb +0 -0
  119. data/default_configuration/base_app/example-lrd-dev-tmux.conf +17 -0
  120. data/default_configuration/base_app/frontend/CHANGELOG.md +125 -0
  121. data/default_configuration/base_app/frontend/Gemfile +5 -0
  122. data/default_configuration/base_app/frontend/Gemfile.lock +34 -0
  123. data/default_configuration/base_app/frontend/Gruntfile.js +3 -0
  124. data/default_configuration/base_app/frontend/LICENSE +19 -0
  125. data/default_configuration/base_app/frontend/README.md +5 -0
  126. data/default_configuration/base_app/frontend/bin/index.html +0 -0
  127. data/default_configuration/base_app/frontend/build.config.js +110 -0
  128. data/default_configuration/base_app/frontend/changelog.tpl +23 -0
  129. data/default_configuration/base_app/frontend/config/compass.rb +33 -0
  130. data/default_configuration/base_app/frontend/config/environments/development.js +4 -0
  131. data/default_configuration/base_app/frontend/config/environments/integration.js +4 -0
  132. data/default_configuration/base_app/frontend/config/environments/production.js +3 -0
  133. data/default_configuration/base_app/frontend/config/environments/test.js +4 -0
  134. data/default_configuration/base_app/frontend/create +0 -0
  135. data/default_configuration/base_app/frontend/karma/karma-unit.tpl.js +80 -0
  136. data/default_configuration/base_app/frontend/module.prefix +1 -0
  137. data/default_configuration/base_app/frontend/module.suffix +1 -0
  138. data/default_configuration/base_app/frontend/npm-shrinkwrap.json +4334 -0
  139. data/default_configuration/base_app/frontend/package.json +75 -0
  140. data/default_configuration/base_app/frontend/sprockets/index.tpl.js +2 -0
  141. data/default_configuration/base_app/frontend/src/README.md +48 -0
  142. data/default_configuration/base_app/frontend/src/app/README.md +68 -0
  143. data/default_configuration/base_app/frontend/src/app/app.js +47 -0
  144. data/default_configuration/base_app/frontend/src/app/appConfig.js +19 -0
  145. data/default_configuration/base_app/frontend/src/app/auth/auth.js +66 -0
  146. data/default_configuration/base_app/frontend/src/app/auth/config.js +22 -0
  147. data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations-success.tpl.html +1 -0
  148. data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmations.js +8 -0
  149. data/default_configuration/base_app/frontend/src/app/auth/confirmations/confirmationsStates.js +12 -0
  150. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request-success.tpl.html +3 -0
  151. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-request.tpl.html +16 -0
  152. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update-success.tpl.html +3 -0
  153. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords-update.tpl.html +21 -0
  154. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwords.js +11 -0
  155. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsControllers.js +47 -0
  156. data/default_configuration/base_app/frontend/src/app/auth/passwords/passwordsStates.js +38 -0
  157. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations-success.tpl.html +1 -0
  158. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.js +14 -0
  159. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrations.tpl.html +37 -0
  160. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsControllers.js +25 -0
  161. data/default_configuration/base_app/frontend/src/app/auth/registrations/registrationsStates.js +18 -0
  162. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions-success.tpl.html +1 -0
  163. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.js +18 -0
  164. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessions.tpl.html +25 -0
  165. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsControllers.js +26 -0
  166. data/default_configuration/base_app/frontend/src/app/auth/sessions/sessionsStates.js +20 -0
  167. data/default_configuration/base_app/frontend/src/app/homepage/homepage-show.tpl.html +2 -0
  168. data/default_configuration/base_app/frontend/src/app/homepage/homepage.js +10 -0
  169. data/default_configuration/base_app/frontend/src/app/homepage/homepage.tpl.html +13 -0
  170. data/default_configuration/base_app/frontend/src/app/homepage/homepageControllers.js +9 -0
  171. data/default_configuration/base_app/frontend/src/app/homepage/homepageStates.js +22 -0
  172. data/default_configuration/base_app/frontend/src/app/inner.tpl.html +16 -0
  173. data/default_configuration/base_app/frontend/src/app/root.tpl.html +2 -0
  174. data/default_configuration/base_app/frontend/src/app/rootController.js +8 -0
  175. data/default_configuration/base_app/frontend/src/app/rootStates.js +20 -0
  176. data/default_configuration/base_app/frontend/src/assets/README.md +4 -0
  177. data/default_configuration/base_app/frontend/src/assets/icons/alert.svg +1 -0
  178. data/default_configuration/base_app/frontend/src/common/README.md +19 -0
  179. data/default_configuration/base_app/frontend/src/common/components/OnLoginDirective/OnLoginDirective.js +17 -0
  180. data/default_configuration/base_app/frontend/src/common/components/adminOnly/admin-only.tpl.html +4 -0
  181. data/default_configuration/base_app/frontend/src/common/components/adminOnly/adminOnly.js +23 -0
  182. data/default_configuration/base_app/frontend/src/common/components/sessionLinks/session-links.tpl.html +5 -0
  183. data/default_configuration/base_app/frontend/src/common/components/sessionLinks/sessionLinks.js +25 -0
  184. data/default_configuration/base_app/frontend/src/common/components/signOut/signOut.js +19 -0
  185. data/default_configuration/base_app/frontend/src/common/config.js +27 -0
  186. data/default_configuration/base_app/frontend/src/index.html +86 -0
  187. data/default_configuration/base_app/frontend/src/styles/_constants.sass +14 -0
  188. data/default_configuration/base_app/frontend/src/styles/main.sass +52 -0
  189. data/default_configuration/base_app/frontend/src/styles/partials/_footer.sass +18 -0
  190. data/default_configuration/base_app/frontend/src/styles/partials/_forms.sass +9 -0
  191. data/default_configuration/base_app/frontend/src/styles/partials/_layout.sass +17 -0
  192. data/default_configuration/base_app/frontend/src/styles/partials/_navbar.sass +10 -0
  193. data/default_configuration/base_app/frontend/src/styles/partials/_typography.sass +18 -0
  194. data/default_configuration/base_app/frontend/src/styles/states/_errorFallback.sass +7 -0
  195. data/default_configuration/base_app/frontend/src/styles/states/_root_homepage.sass +8 -0
  196. data/default_configuration/base_app/frontend/test-help/xpath.js +9 -0
  197. data/default_configuration/base_app/frontend/test/app.js +24 -0
  198. data/default_configuration/base_app/frontend/test/auth/confirmations/confirmationsStates.js +46 -0
  199. data/default_configuration/base_app/frontend/test/auth/passwords/passwordsControllers.js +193 -0
  200. data/default_configuration/base_app/frontend/test/auth/passwords/passwordsStates.js +108 -0
  201. data/default_configuration/base_app/frontend/test/auth/registrations/registrationsControllers.js +117 -0
  202. data/default_configuration/base_app/frontend/test/auth/registrations/registrationsStates.js +64 -0
  203. data/default_configuration/base_app/frontend/test/auth/sessions/sessionsControllers.js +95 -0
  204. data/default_configuration/base_app/frontend/test/auth/sessions/sessionsStates.js +67 -0
  205. data/default_configuration/base_app/frontend/test/specHelper.js +33 -0
  206. data/default_configuration/base_app/frontend/test/support/mockDirective.js +13 -0
  207. data/default_configuration/base_app/frontend/test/support/stateResolveFn.js +3 -0
  208. data/default_configuration/base_app/frontend/test/support/testStates.js +20 -0
  209. data/default_configuration/base_app/frontend/tools.md +223 -0
  210. data/default_configuration/base_app/lib/capistrano/tasks/sidekiq.rake +218 -0
  211. data/default_configuration/base_app/static-app.ru +3 -0
  212. data/default_configuration/base_app/tmux-windows +68 -0
  213. data/default_configuration/base_app/tmux-windows.txt +53 -0
  214. data/lib/xing/cli.rb +8 -3
  215. data/lib/xing/cli/generators/new_project.rb +48 -13
  216. metadata +219 -7
@@ -0,0 +1,12 @@
1
+ == Logical Reality Design CMS Framework
2
+
3
+ The goal of this project is a simple bare-bones CMS with editable
4
+ pages and locations (nav menu) and uploadable documents and images that
5
+ can all be controlled by an admin user. Editing/management functions
6
+ are available in an admin/ namespace.
7
+
8
+ This project will be forked to create individual projects for clients;
9
+ the hope is that for many of those projects we can continue to pull changes
10
+ as they are made to the CMS.
11
+
12
+ test
@@ -0,0 +1,10 @@
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
+ require 'rake'
6
+
7
+ #require 'bibliotech/rake_lib'
8
+ #BiblioTech::Tasklib.new
9
+
10
+ APP_MODULE::Application.load_tasks
@@ -0,0 +1,3 @@
1
+ class ApplicationController < Xing::Controllers::Base
2
+
3
+ end
@@ -0,0 +1,3 @@
1
+ class ConfirmationsController < DeviseTokenAuth::ConfirmationsController
2
+ skip_before_filter :check_format
3
+ end
@@ -0,0 +1,3 @@
1
+ class PasswordsController < DeviseTokenAuth::PasswordsController
2
+ skip_before_filter :check_format
3
+ end
@@ -0,0 +1,15 @@
1
+ class RegistrationsController < DeviseTokenAuth::RegistrationsController
2
+ before_filter :configure_permitted_parameters
3
+
4
+ def configure_permitted_parameters
5
+ devise_parameter_sanitizer.for(:sign_up) do |u|
6
+ u[:email] = u[:email].downcase
7
+ u[:email_confirmation] = u[:email_confirmation].downcase
8
+ u.permit( :email,
9
+ :email_confirmation,
10
+ :password,
11
+ :password_confirmation
12
+ )
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ class Ability
2
+ include CanCan::Ability
3
+
4
+ def initialize(user)
5
+ if user.present?
6
+ user.role.set_abilities(self)
7
+
8
+ # add common abilies to logged_in users
9
+ else
10
+ # add common abilities to public users here
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,8 @@
1
+ class Role::Admin < Role
2
+ Role.register 'Admin', self
3
+
4
+ def set_abilities(ability)
5
+ ability.can :manage, User
6
+ end
7
+
8
+ end
@@ -0,0 +1,43 @@
1
+ # == Schema Information
2
+ #
3
+ # Table name: users
4
+ #
5
+ # id :integer not null, primary key
6
+ # login :string(20) not null
7
+ # email :string(255)
8
+ # first_name :string(60)
9
+ # last_name :string(60)
10
+ # sign_in_count :integer default(0), not null
11
+ # failed_attempts :integer default(0), not null
12
+ # last_request_at :datetime
13
+ # current_sign_in_at :datetime
14
+ # last_sign_in_at :datetime
15
+ # current_sign_in_ip :string(255)
16
+ # last_sign_in_ip :string(255)
17
+ # created_at :datetime
18
+ # updated_at :datetime
19
+ # encrypted_password :string(255)
20
+ # confirmation_token :string(255)
21
+ # confirmed_at :datetime
22
+ # confirmation_sent_at :datetime
23
+ # reset_password_token :string(255)
24
+ # reset_password_sent_at :datetime
25
+ # remember_token :string(255)
26
+ # remember_created_at :datetime
27
+ # unlock_token :string(255)
28
+ # locked_at :datetime
29
+ #
30
+
31
+ class User < ActiveRecord::Base
32
+ devise :database_authenticatable, :registerable, :rememberable, :trackable, :validatable, :confirmable, :recoverable, :token_authenticatable
33
+
34
+ def role
35
+ @role ||= Role.for(self)
36
+ end
37
+
38
+ validates_presence_of :email
39
+ validates_uniqueness_of :email
40
+
41
+ validates_presence_of :email_confirmation, :on => :create
42
+ validates :email, confirmation: true, :on => :create
43
+ end
@@ -0,0 +1,2 @@
1
+ Autotest.add_discovery { "rails" }
2
+ Autotest.add_discovery { "rspec2" }
@@ -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,6 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+
5
+ # APP_MODULE is defined in config/application.rb
6
+ run APP_MODULE::Application
@@ -0,0 +1,71 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module XingApp; end
10
+ APP_MODULE = XingApp
11
+
12
+ module APP_MODULE
13
+ class Application < Rails::Application
14
+ # Settings in config/environments/* take precedence over those specified
15
+ # here.
16
+ # Application configuration should go into files in config/initializers
17
+ # -- all .rb files in that directory are automatically loaded.
18
+
19
+ # Custom directories with classes and modules you want to be autoloadable.
20
+ # config.autoload_paths += %W(#{config.root}/extras)
21
+
22
+ # Only load the plugins named here, in the order given (default is alphabetical).
23
+ # :all can be used as a placeholder for all plugins not explicitly named.
24
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
25
+
26
+ # Activate observers that should always be running.
27
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
28
+ config.active_record.raise_in_transactional_callbacks = true
29
+
30
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
31
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
32
+ # config.time_zone = 'Central Time (US & Canada)'
33
+
34
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
35
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
36
+ # config.i18n.default_locale = :de
37
+
38
+ # JavaScript files you want as :defaults (application.js is always included).
39
+ # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
40
+
41
+ # Configure the default encoding used in templates for Ruby 1.9.
42
+ config.encoding = "utf-8"
43
+ config.i18n.enforce_available_locales = true
44
+ config.i18n.default = :en
45
+
46
+ # Configure sensitive parameters which will be filtered from the log file.
47
+ config.filter_parameters += [:password, :pasword_confirmation]
48
+
49
+ ###### COPIED FROM PREVIOUS VERSION OF XING in commit a0f7e416 #######
50
+
51
+ #observers are define in app/observers
52
+ #config.active_record.observers = :sitemap_observer,
53
+ #:page_snapshot_observer
54
+
55
+ # Enable the asset pipeline
56
+ config.assets.enabled = false
57
+
58
+ # Version of your assets, change this if you want to expire all your assets
59
+ config.assets.version = '1.0'
60
+ config.site_title = "Another Quality Xing App"
61
+ config.middleware.insert_before Rack::Runtime, Rack::Cors do
62
+ allow do
63
+ origins '*'
64
+ resource '*',
65
+ :headers => :any,
66
+ :expose => ['Location', 'access-token', 'token-type', 'client', 'expiry', 'uid'],
67
+ :methods => [:get, :post, :delete, :put, :patch, :options]
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,4 @@
1
+ # Set up gems listed in the Gemfile.
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+
4
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
@@ -0,0 +1,9 @@
1
+ test: &test
2
+ adapter: postgresql
3
+ encoding: unicode
4
+ database: cms2_test
5
+ pool: 5
6
+ host: 127.0.0.1
7
+
8
+ development:
9
+ <<: *test
@@ -0,0 +1,22 @@
1
+ development: &development
2
+ adapter: postgresql
3
+ encoding: unicode
4
+ # database: CHANGEME IN database.yml.example and database.yml.ci
5
+ # username: postgres
6
+ pool: 5
7
+ host: 127.0.0.1
8
+
9
+ # Warning: The database defined as "test" will be erased and
10
+ # re-generated from your development database when you run "rake".
11
+ # Do not set this db to the same as development or production.
12
+ test:
13
+ <<: *development
14
+ # database: CHANGEME IN database.yml.example and database.yml.ci
15
+
16
+ production:
17
+ adapter: postgresql
18
+ encoding: unicode
19
+ # database: CHANGEME IN database.yml.example and database.yml.ci
20
+ # username: postgres
21
+ pool: 5
22
+ host: 127.0.0.1
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require File.expand_path('../application', __FILE__)
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,45 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # In the development environment your application's code is reloaded on
5
+ # every request. This slows down response time but is perfect for development
6
+ # since you don't have to restart the web server when you make code changes.
7
+ config.cache_classes = false
8
+
9
+ # Do not eager load code on boot.
10
+ config.eager_load = false
11
+
12
+ # Show full error reports and disable caching.
13
+ config.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+
16
+ # Don't care if the mailer can't send.
17
+ config.action_mailer.raise_delivery_errors = false
18
+
19
+ # Print deprecation notices to the Rails logger.
20
+ config.active_support.deprecation = :log
21
+
22
+ # Raise an error on page load if there are pending migrations.
23
+ config.active_record.migration_error = :page_load
24
+
25
+ # Debug mode disables concatenation and preprocessing of assets.
26
+ # This option may cause significant delays in view rendering with a large
27
+ # number of complex assets.
28
+ config.assets.debug = true
29
+
30
+ # Adds additional error checking when serving assets at runtime.
31
+ # Checks for improperly declared sprockets dependencies.
32
+ # Raises helpful error messages.
33
+ config.assets.raise_runtime_errors = true
34
+
35
+ # Raises error for missing translations
36
+ # config.action_view.raise_on_missing_translations = true
37
+
38
+ # Enable serving of images, stylesheets, and javascripts from an asset server
39
+ # XXXXX
40
+ # Currently, in development, this needs to be set to the backend server
41
+ config.action_controller.asset_host = Rails.application.secrets[:asset_host]
42
+
43
+ config.middleware.use(Xing::Services::LogJsonRequests)
44
+ config.middleware.use(Xing::Services::LogJsonResponses)
45
+ end
@@ -0,0 +1,78 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
+ # Add `rack-cache` to your Gemfile before enabling this.
19
+ # For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
20
+ # config.action_dispatch.rack_cache = true
21
+
22
+ # Disable Rails's static asset server (Apache or nginx will already do this).
23
+ config.serve_static_files = false
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # Generate digests for assets URLs.
33
+ config.assets.digest = true
34
+
35
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
36
+
37
+ # Specifies the header that your server uses for sending files.
38
+ # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
39
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
40
+
41
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
42
+ # config.force_ssl = true
43
+
44
+ # Set to :debug to see everything in the log.
45
+ config.log_level = :info
46
+
47
+ # Prepend all log lines with the following tags.
48
+ # config.log_tags = [ :subdomain, :uuid ]
49
+
50
+ # Use a different logger for distributed setups.
51
+ # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
52
+
53
+ # Use a different cache store in production.
54
+ # config.cache_store = :mem_cache_store
55
+
56
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
57
+ config.action_controller.asset_host = Rails.application.secrets[:asset_host]
58
+
59
+ # Ignore bad email addresses and do not raise email delivery errors.
60
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
61
+ # config.action_mailer.raise_delivery_errors = false
62
+
63
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
64
+ # the I18n.default_locale when a translation cannot be found).
65
+ config.i18n.fallbacks = true
66
+
67
+ # Send deprecation notices to registered listeners.
68
+ config.active_support.deprecation = :notify
69
+
70
+ # Disable automatic flushing of the log to improve performance.
71
+ # config.autoflush_log = false
72
+
73
+ # Use default logging formatter so that PID and timestamp are not suppressed.
74
+ config.log_formatter = ::Logger::Formatter.new
75
+
76
+ # Do not dump schema after migrations.
77
+ config.active_record.dump_schema_after_migration = false
78
+ end
@@ -0,0 +1,48 @@
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/environment.rb
3
+
4
+ # The production environment is meant for finished, "live" apps.
5
+ # Code is not reloaded between requests
6
+ config.cache_classes = true
7
+ config.eager_load = true
8
+
9
+ # Full error reports are disabled and caching is turned on
10
+ config.consider_all_requests_local = false
11
+ config.action_controller.perform_caching = true
12
+
13
+ # Specifies the header that your server uses for sending files
14
+ config.action_dispatch.x_sendfile_header = "X-Sendfile"
15
+
16
+ # If you have no front-end server that supports something like X-Sendfile,
17
+ # just comment this out and Rails will serve the files
18
+
19
+ # See everything in the log (default is :info)
20
+ # config.log_level = :debug
21
+
22
+ # Use a different logger for distributed setups
23
+ # config.logger = SyslogLogger.new
24
+
25
+ # Use a different cache store in production
26
+ # config.cache_store = :mem_cache_store
27
+
28
+ # Disable Rails's static asset server
29
+ # In production, Apache or nginx will already do this
30
+ config.serve_static_files = false
31
+
32
+ # Enable serving of images, stylesheets, and javascripts from an asset server
33
+ config.action_controller.asset_host = Rails.application.secrets[:asset_host]
34
+
35
+ # Disable delivery errors, bad email addresses will be ignored
36
+ # config.action_mailer.raise_delivery_errors = false
37
+
38
+ # Enable threaded mode
39
+ # config.threadsafe!
40
+
41
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
42
+ # the I18n.default_locale when a translation can not be found)
43
+ config.i18n.fallbacks = true
44
+
45
+ # Send deprecation notices to registered listeners
46
+ config.active_support.deprecation = :notify
47
+ config.cache_store = :memory_store
48
+ end