camaleon_cms 2.3.3 → 2.3.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of camaleon_cms might be problematic. Click here for more details.

Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +7 -12
  3. data/app/assets/javascripts/camaleon_cms/admin/_custom_fields.js +1 -2
  4. data/app/assets/javascripts/camaleon_cms/admin/_data.js +1 -0
  5. data/app/assets/javascripts/camaleon_cms/admin/_post.js +1 -1
  6. data/app/assets/javascripts/camaleon_cms/admin/_posttype.js.coffee +21 -0
  7. data/app/assets/javascripts/camaleon_cms/admin/admin-manifest.js +2 -0
  8. data/app/assets/javascripts/camaleon_cms/admin/jquery_validate/fr.js +49 -0
  9. data/app/controllers/camaleon_cms/admin/appearances/nav_menus_controller.rb +11 -6
  10. data/app/controllers/camaleon_cms/admin/appearances/themes_controller.rb +6 -0
  11. data/app/controllers/camaleon_cms/admin/media_controller.rb +3 -0
  12. data/app/controllers/camaleon_cms/admin/users_controller.rb +3 -0
  13. data/app/controllers/camaleon_cms/camaleon_controller.rb +5 -0
  14. data/app/controllers/camaleon_cms/frontend_controller.rb +1 -1
  15. data/app/controllers/concerns/camaleon_cms/frontend_concern.rb +1 -1
  16. data/app/decorators/camaleon_cms/site_decorator.rb +1 -1
  17. data/app/decorators/camaleon_cms/user_decorator.rb +4 -0
  18. data/app/helpers/camaleon_cms/admin/custom_fields_helper.rb +4 -4
  19. data/app/helpers/camaleon_cms/camaleon_helper.rb +5 -0
  20. data/app/helpers/camaleon_cms/frontend/nav_menu_helper.rb +16 -16
  21. data/app/helpers/camaleon_cms/hooks_helper.rb +10 -4
  22. data/app/helpers/camaleon_cms/plugins_helper.rb +1 -1
  23. data/app/helpers/camaleon_cms/session_helper.rb +9 -4
  24. data/app/helpers/camaleon_cms/short_code_helper.rb +1 -1
  25. data/app/helpers/camaleon_cms/theme_helper.rb +1 -1
  26. data/app/helpers/camaleon_cms/uploader_helper.rb +10 -7
  27. data/app/mailers/camaleon_cms/html_mailer.rb +33 -17
  28. data/app/models/camaleon_cms/ability.rb +2 -2
  29. data/app/models/camaleon_cms/nav_menu.rb +2 -2
  30. data/app/models/camaleon_cms/nav_menu_item.rb +5 -3
  31. data/app/models/camaleon_cms/site.rb +5 -101
  32. data/app/models/camaleon_cms/user.rb +8 -144
  33. data/app/models/camaleon_cms/user_relationship.rb +1 -1
  34. data/app/models/camaleon_cms/user_role.rb +0 -2
  35. data/app/models/concerns/camaleon_cms/custom_fields_read.rb +14 -7
  36. data/app/models/concerns/camaleon_cms/metas.rb +5 -4
  37. data/app/models/concerns/camaleon_cms/site_default_settings.rb +87 -0
  38. data/app/models/concerns/camaleon_cms/user_methods.rb +142 -0
  39. data/app/uploaders/camaleon_cms_aws_uploader.rb +13 -4
  40. data/app/uploaders/camaleon_cms_uploader.rb +3 -1
  41. data/app/views/camaleon_cms/admin/appearances/nav_menus/_custom_menus.html.erb +11 -5
  42. data/app/views/camaleon_cms/admin/appearances/nav_menus/_external_menu.html.erb +8 -0
  43. data/app/views/camaleon_cms/admin/settings/_media_settings.html.erb +4 -0
  44. data/app/views/camaleon_cms/admin/settings/custom_fields/_get_items.html.erb +155 -154
  45. data/app/views/camaleon_cms/admin/settings/custom_fields/_render.html.erb +1 -1
  46. data/app/views/camaleon_cms/admin/settings/custom_fields/fields/_checkbox.html.erb +1 -1
  47. data/app/views/camaleon_cms/admin/settings/custom_fields/fields/_checkboxes.html.erb +1 -1
  48. data/app/views/camaleon_cms/admin/settings/custom_fields/fields/_posts.html.erb +2 -5
  49. data/app/views/camaleon_cms/admin/settings/custom_fields/form.html.erb +1 -1
  50. data/app/views/camaleon_cms/admin/settings/post_types/_form.html.erb +24 -16
  51. data/app/views/camaleon_cms/admin/users/form.html.erb +2 -2
  52. data/app/views/camaleon_cms/default_theme/single.html.erb +1 -1
  53. data/app/views/layouts/camaleon_cms/admin.html.erb +2 -2
  54. data/config/initializers/model_alias.rb +10 -3
  55. data/config/locales/camaleon_cms/admin/en.yml +10 -0
  56. data/config/locales/camaleon_cms/admin/fr.yml +663 -0
  57. data/config/locales/camaleon_cms/common.yml +66 -0
  58. data/config/routes/frontend.rb +1 -1
  59. data/config/system.json +2 -2
  60. data/db/migrate/20150611161134_post_table_into_utf8.rb +6 -5
  61. data/lib/camaleon_cms/engine.rb +3 -0
  62. data/lib/camaleon_cms/version.rb +1 -1
  63. data/lib/ext/string.rb +1 -54
  64. data/lib/plugin_routes.rb +5 -0
  65. data/spec/decorators/post_type_spec.rb +13 -0
  66. data/spec/dummy/README.rdoc +28 -0
  67. data/spec/dummy/Rakefile +6 -0
  68. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  69. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  70. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  71. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  72. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  73. data/spec/dummy/bin/bundle +3 -0
  74. data/spec/dummy/bin/rails +4 -0
  75. data/spec/dummy/bin/rake +4 -0
  76. data/spec/dummy/bin/setup +29 -0
  77. data/spec/dummy/config.ru +4 -0
  78. data/spec/dummy/config/application.rb +26 -0
  79. data/spec/dummy/config/boot.rb +5 -0
  80. data/spec/dummy/config/database.yml +25 -0
  81. data/spec/dummy/config/environment.rb +5 -0
  82. data/spec/dummy/config/environments/development.rb +41 -0
  83. data/spec/dummy/config/environments/production.rb +79 -0
  84. data/spec/dummy/config/environments/test.rb +42 -0
  85. data/spec/dummy/config/initializers/assets.rb +11 -0
  86. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  87. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  88. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  89. data/spec/dummy/config/initializers/inflections.rb +16 -0
  90. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  91. data/spec/dummy/config/initializers/session_store.rb +3 -0
  92. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  93. data/spec/dummy/config/locales/en.yml +23 -0
  94. data/spec/dummy/config/routes.rb +4 -0
  95. data/spec/dummy/config/secrets.yml +22 -0
  96. data/spec/dummy/db/development.sqlite3 +0 -0
  97. data/spec/dummy/db/schema.rb +186 -0
  98. data/spec/dummy/public/404.html +67 -0
  99. data/spec/dummy/public/422.html +67 -0
  100. data/spec/dummy/public/500.html +66 -0
  101. data/spec/dummy/public/favicon.ico +0 -0
  102. data/spec/features/categories_spec.rb +25 -0
  103. data/spec/features/comments_spec.rb +45 -0
  104. data/spec/features/contact_form_spec.rb +53 -0
  105. data/spec/features/content_groups_spec.rb +45 -0
  106. data/spec/features/custom_fields_spec.rb +47 -0
  107. data/spec/features/frontend/pages_spec.rb +5 -0
  108. data/spec/features/languages_spec.rb +27 -0
  109. data/spec/features/media_spec.rb +50 -0
  110. data/spec/features/menus_spec.rb +46 -0
  111. data/spec/features/pages_spec.rb +30 -0
  112. data/spec/features/plugins_spec.rb +29 -0
  113. data/spec/features/posts_spec.rb +36 -0
  114. data/spec/features/session_spec.rb +52 -0
  115. data/spec/features/settings_spec.rb +17 -0
  116. data/spec/features/shortcodes_spec.rb +11 -0
  117. data/spec/features/sites_spec.rb +45 -0
  118. data/spec/features/tags_spec.rb +25 -0
  119. data/spec/features/themes_spec.rb +18 -0
  120. data/spec/features/user_roles_spec.rb +60 -0
  121. data/spec/features/users_spec.rb +79 -0
  122. data/spec/features/widgets_spec.rb +50 -0
  123. data/spec/helpers/email_helper_spec.rb +16 -0
  124. data/spec/mailers/send_mail_spec.rb +37 -0
  125. data/spec/rails_helper.rb +1 -0
  126. data/spec/routing/post_type_routes_spec.rb +12 -0
  127. data/spec/spec_helper.rb +191 -0
  128. data/spec/support/common.rb +113 -0
  129. data/spec/support/wait_for_ajax.rb +36 -0
  130. metadata +326 -3
@@ -452,3 +452,69 @@ pt-BR:
452
452
  will_paginate:
453
453
  previous_label: 'Anterior'
454
454
  next_label: 'Próximo'
455
+
456
+ fr:
457
+ camaleon_cms:
458
+ common:
459
+ profile: "Profil"
460
+ dashboard: "Tableau de bord"
461
+ read_more: "En savoir plus"
462
+ submit: "Soumettre"
463
+ send: "Envoyer"
464
+ login: "Connexion"
465
+ logout: "Déconnexion"
466
+ confirm: "Êtes-vous sûr?"
467
+ register: "Enregistrer"
468
+ proceted_article: 'Article protégé'
469
+
470
+ comment_msg: "Vous devez être connecté pour publier un commentaire"
471
+ comment: "Commentaire"
472
+ comments: "Commentaires"
473
+ message: "Message"
474
+ leave_comment: "Laisser un commentaire"
475
+ comment_new: "Nouveau commentaire"
476
+ comment_saved: "Votre commentaire est enregistré"
477
+ comment_error: "Une erreur est survenue lors de l'enregistrement du commentaire"
478
+ comment_reply: "Répondre"
479
+ edit: "Editer"
480
+
481
+ recent_posts: "Posts récents"
482
+
483
+
484
+ search_msg: "Chercher des résultats pour:"
485
+ search_not_found: "Aucun résultat ne correspond aux critères de recherche."
486
+ category_list: "Liste des catégories"
487
+ post_tag_list: "Liste des tags"
488
+ sub_category_list: "Liste des sous-catégories"
489
+ content_list: "Liste de contenu : %s"
490
+ visit: "Visite"
491
+ no_contents_found: "Aucun contenu trouvé"
492
+ no_results_found: "Aucun résultat trouvé"
493
+
494
+ author: "Auteur"
495
+ site: "Site"
496
+ categories: "Catégories"
497
+ next: "Suivant"
498
+ prev: "Précédent"
499
+ current: "Courant"
500
+ search: "Rechercher"
501
+ file_format_error: "Format de fichier invalide"
502
+ file_size_exceeded: "Taille du fichier excessive"
503
+
504
+ notice: "Nouvelles "
505
+ share: "Partager sur"
506
+ share_facebook: "Partage sur Facebook"
507
+ share_twitter: "Partager sur Twitter"
508
+ share_google_plus: "Partager sur Google Plus"
509
+ back_top: "Retour en haut"
510
+ total_followers_social: "Total de followers sur les réseaux sociaux"
511
+ latest_articles: "Derniers articles"
512
+ photo_gallery: "Galerie photo"
513
+ home_galleries: "Aller à l'accueil des galeries"
514
+ addition: "Addition"
515
+ view_all_news: "Voir toutes les nouvelles"
516
+ extra_attributes: "Attributs extras"
517
+
518
+ will_paginate:
519
+ previous_label: 'Précédent'
520
+ next_label: 'Suivant'
@@ -10,7 +10,7 @@ Rails.application.routes.draw do
10
10
  # frontend camaleon cms
11
11
  scope PluginRoutes.system_info["relative_url_root"], as: "cama" do
12
12
  scope "(:locale)", locale: /#{PluginRoutes.all_locales}/, :defaults => { } do
13
- root 'camaleon_cms/frontend#index'
13
+ root 'camaleon_cms/frontend#index', as: 'root'
14
14
 
15
15
  controller "camaleon_cms/frontend" do
16
16
  PluginRoutes.all_locales.split("|").each do |_l|
data/config/system.json CHANGED
@@ -4,13 +4,13 @@
4
4
  "skip_format_url": true, // enable or disable .html extension in the urls.
5
5
  "default_plugins": ["front_cache", "cama_contact_form", "attack"], // Default plugins installed for each new site
6
6
  "available_languages": ["es", "en", "fr", "zh", "de", "it", "pt-BR", "nl"], // Available languages for frontend panel, here all locales: https://github.com/svenfuchs/rails-i18n
7
- "admin_available_languages": ["en", "es", "it", "pt-BR" , "nl"], //Available languages for the admin panel
7
+ "admin_available_languages": ["en", "es", "it", "pt-BR" , "nl", "fr"], //Available languages for the admin panel
8
8
  "default_user_role": "client", // default user role for all new users
9
9
  "users_share_sites": true, //(boolean) true: permit to share users between sites, false: All users are assigned for an unique site.
10
10
  "db_prefix": "", // prefix name for database tables
11
11
  "relative_url_root": "", // URL prefix, for example to get http://localhost:3000/blog/, this should be "blog"
12
12
  "admin_path_name": "admin", // URL prefix for admin panel, for example to get http://localhost:3000/sekret/, this should be "sekret"
13
-
13
+ "user_model": "", // class name for users (Permit to use custom logins by custom user models like devise)
14
14
  "media_slug_folder": false // permit to use site slug for upload media folder instead of site-id
15
15
  }
16
16
 
@@ -1,11 +1,12 @@
1
1
  class PostTableIntoUtf8 < ActiveRecord::Migration
2
2
  def change
3
3
  if table_exists? CamaleonCms::User.table_name
4
- add_column CamaleonCms::User.table_name, :email, :integer rescue nil
5
- add_column CamaleonCms::User.table_name, :username, :integer rescue nil
6
- add_column CamaleonCms::User.table_name, :role, :string, default: 'client', index: true rescue nil
7
- add_column CamaleonCms::User.table_name, :parent_id, :integer rescue nil
8
- add_column CamaleonCms::User.table_name, :site_id, :integer, index: true rescue nil
4
+ add_column(CamaleonCms::User.table_name, :email, :string) unless column_exists?(CamaleonCms::User.table_name, :email)
5
+ add_column(CamaleonCms::User.table_name, :username, :string) unless column_exists?(CamaleonCms::User.table_name, :username)
6
+ add_column(CamaleonCms::User.table_name, :role, :string, default: 'client', index: true) unless column_exists?(CamaleonCms::User.table_name, :role)
7
+ add_column(CamaleonCms::User.table_name, :parent_id, :integer) unless column_exists?(CamaleonCms::User.table_name, :parent_id)
8
+ add_column(CamaleonCms::User.table_name, :site_id, :integer, index: true, default: -1) unless column_exists?(CamaleonCms::User.table_name, :site_id)
9
+ add_column(CamaleonCms::User.table_name, :auth_token, :string) unless column_exists?(CamaleonCms::User.table_name, :auth_token)
9
10
  else
10
11
  create_table CamaleonCms::User.table_name do |t|
11
12
  t.string "username", index: true
@@ -11,6 +11,9 @@ require 'breadcrumbs_on_rails'
11
11
  require 'aws-sdk'
12
12
  require 'font-awesome-rails'
13
13
  require 'tinymce-rails'
14
+ require 'jquery-rails'
15
+ require 'coffee-rails'
16
+ require 'sass-rails'
14
17
  require 'cama_contact_form'
15
18
 
16
19
  $camaleon_engine_dir = File.expand_path("../../../", __FILE__)
@@ -1,3 +1,3 @@
1
1
  module CamaleonCms
2
- VERSION = '2.3.3'
2
+ VERSION = '2.3.4'
3
3
  end
data/lib/ext/string.rb CHANGED
@@ -9,11 +9,6 @@ class String
9
9
  ActionController::Base.helpers.strip_tags(self)
10
10
  end
11
11
 
12
- def is_email
13
- return false if self.blank?
14
- return /^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$/.match(self).present?
15
- end
16
-
17
12
  def is_float?
18
13
  self.to_f.to_s == self.to_s
19
14
  end
@@ -46,42 +41,6 @@ class String
46
41
  end
47
42
  end
48
43
 
49
- def split_bar
50
- self.split(',').map{|us_id| us_id.gsub('__','')}.uniq
51
- end
52
-
53
- def include_bar?(uid)
54
- self.include?("__#{uid}__")
55
- end
56
-
57
- # slice string respect to correct word for read more
58
- def slice_read_more(quantity = 100, start_from = 0)
59
- return self if self.length <= quantity
60
- tmp = self.slice(start_from, self.length)
61
- if tmp.slice(quantity) == " " || tmp.index(" ").nil?
62
- return tmp.slice(0, quantity)
63
- end
64
- quantity += tmp.slice(quantity, tmp.length).index(" ").nil? ? tmp.length : tmp.slice(quantity, tmp.length).index(" ")
65
- tmp.slice(0, quantity)
66
- end
67
-
68
- # slice string respect to correct word for read more
69
- def truncate_text(string, quantity = 100, quantity_before_text = 20)
70
- string = string.gsub("+", "").gsub("*", "").gsub("-", "").downcase
71
- self.strip_tags
72
- return self if self.length <= quantity
73
- start_from = self.downcase.index("#{string}")
74
- start_from = self.index(/#{string.split(" ").join("|")}/i) unless start_from.present?
75
- start_from -= quantity_before_text if start_from.present? && start_from > 0
76
- start_from = 0 if start_from.nil? || start_from < 0
77
- tmp = self.slice(start_from, self.length)
78
- if tmp.slice(quantity) == " " || tmp.index(" ").nil?
79
- return tmp.slice(0, quantity)
80
- end
81
- quantity += tmp.slice(quantity, tmp.length).to_s.index(" ").nil? ? tmp.length : tmp.slice(quantity, tmp.length).to_s.index(" ")
82
- tmp.slice(0, quantity)
83
- end
84
-
85
44
  # parse string into slug format
86
45
  def slug
87
46
  #strip the string
@@ -105,18 +64,6 @@ class String
105
64
  ret
106
65
  end
107
66
 
108
- # from a string path, this function get the filename
109
- def get_file_name
110
- self.split("/").last.split(".").delete_last.join(".")
111
- end
112
-
113
- def hex_to_binary
114
- temp = gsub("\s", "");
115
- ret = []
116
- (0...temp.size()/2).each{|index| ret[index] = [temp[index*2, 2]].pack("H2")}
117
- return ret
118
- end
119
-
120
67
  # parse string into domain
121
68
  # http://owem.tuzitio.com into owem.tuzitio.com
122
69
  def parse_domain
@@ -164,7 +111,7 @@ class String
164
111
  # if this is empty, this will return the image version for thumb of the image, sample: 'http://localhost/my_image.png'.cama_parse_image_version('') => http://localhost/thumb/my_image.png
165
112
  # if this is present, this will return the image version generated, sample: , sample: 'http://localhost/my_image.png'.cama_parse_image_version('200x200') => http://localhost/thumb/my_image_200x200.png
166
113
  # default: default image if post image does not exist
167
- def cama_parse_image_version(version_name: '')
114
+ def cama_parse_image_version(version_name = '')
168
115
  res = File.join(File.dirname(self), 'thumb', "#{File.basename(self).parameterize}#{File.extname(self)}")
169
116
  res = res.cama_add_postfix_file_name("_#{version_name}") if version_name.present?
170
117
  res
data/lib/plugin_routes.rb CHANGED
@@ -221,6 +221,11 @@ class PluginRoutes
221
221
  end
222
222
  end
223
223
 
224
+ # check if db migrate already done
225
+ def self.db_installed?
226
+ @@is_db_installed ||= ActiveRecord::Base.connection.table_exists?(CamaleonCms::Site.table_name)
227
+ end
228
+
224
229
  # return all locales for all sites joined by |
225
230
  def self.all_locales
226
231
  r = cache_variable("site_all_locales"); return r unless r.nil?
@@ -0,0 +1,13 @@
1
+ require "rails_helper"
2
+
3
+ RSpec.describe "PostTypeDecorator", :type => :routing do
4
+ it "group url" do
5
+ post_type = create_test_post_type(slug: 'test-post-type')
6
+ expect(post_type.decorate.the_group_url).to include("/group/#{post_type.id}")
7
+ end
8
+
9
+ it "public url" do
10
+ post_type = create_test_post_type(slug: 'test-post-type')
11
+ expect(post_type.decorate.the_url).to include("/#{post_type.slug}")
12
+ end
13
+ 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
@@ -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 any plugin's vendor/assets/javascripts directory 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/rails/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 any plugin's vendor/assets/stylesheets directory 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
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
@@ -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,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+
4
+ # path to your application root.
5
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
+
7
+ Dir.chdir APP_ROOT do
8
+ # This script is a starting point to setup your application.
9
+ # Add necessary setup steps to this file:
10
+
11
+ puts "== Installing dependencies =="
12
+ system "gem install bundler --conservative"
13
+ system "bundle check || bundle install"
14
+
15
+ # puts "\n== Copying sample files =="
16
+ # unless File.exist?("config/database.yml")
17
+ # system "cp config/database.yml.sample config/database.yml"
18
+ # end
19
+
20
+ puts "\n== Preparing database =="
21
+ system "bin/rake db:setup"
22
+
23
+ puts "\n== Removing old logs and tempfiles =="
24
+ system "rm -f log/*"
25
+ system "rm -rf tmp/cache"
26
+
27
+ puts "\n== Restarting application server =="
28
+ system "touch tmp/restart.txt"
29
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Rails.application
@@ -0,0 +1,26 @@
1
+ require File.expand_path('../boot', __FILE__)
2
+
3
+ require 'rails/all'
4
+
5
+ Bundler.require(*Rails.groups)
6
+ require "camaleon_cms"
7
+
8
+ module Dummy
9
+ class Application < Rails::Application
10
+ # Settings in config/environments/* take precedence over those specified here.
11
+ # Application configuration should go into files in config/initializers
12
+ # -- all .rb files in that directory are automatically loaded.
13
+
14
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
+ # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
+ # config.time_zone = 'Central Time (US & Canada)'
17
+
18
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
+ # config.i18n.default_locale = :de
21
+
22
+ # Do not swallow errors in after_commit/after_rollback callbacks.
23
+ config.active_record.raise_in_transactional_callbacks = true
24
+ end
25
+ end
26
+
@@ -0,0 +1,5 @@
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'])
5
+ $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -0,0 +1,25 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3
3
+ #
4
+ # Ensure the SQLite 3 gem is defined in your Gemfile
5
+ # gem 'sqlite3'
6
+ #
7
+ default: &default
8
+ adapter: postgresql
9
+ pool: 5
10
+ timeout: 5000
11
+
12
+ development:
13
+ <<: *default
14
+ database: camaleon_cms_development
15
+
16
+ # Warning: The database defined as "test" will be erased and
17
+ # re-generated from your development database when you run "rake".
18
+ # Do not set this db to the same as development or production.
19
+ test:
20
+ <<: *default
21
+ database: camaleon_cms_test
22
+
23
+ production:
24
+ <<: *default
25
+ database: db/production.sqlite3