camaleon_cms 2.2.1 → 2.3.0

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 (139) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -3
  3. data/app/apps/plugins/attack/admin_controller.rb +1 -9
  4. data/app/apps/plugins/attack/attack_helper.rb +1 -9
  5. data/app/apps/plugins/attack/config/custom_models.rb +1 -1
  6. data/app/apps/plugins/attack/models/attack.rb +1 -10
  7. data/app/apps/plugins/authoring_post/authoring_post_helper.rb +51 -0
  8. data/app/apps/plugins/authoring_post/config/config.json +24 -0
  9. data/app/apps/plugins/front_cache/admin_controller.rb +0 -8
  10. data/app/apps/plugins/front_cache/config/initializer.rb +1 -1
  11. data/app/apps/plugins/front_cache/front_cache_helper.rb +0 -8
  12. data/app/apps/plugins/visibility_post/visibility_post_helper.rb +1 -9
  13. data/app/apps/themes/camaleon_first/main_helper.rb +1 -9
  14. data/app/apps/themes/default/default_helper.rb +1 -9
  15. data/app/apps/themes/default/views/partials/_forms.html.erb +1 -1
  16. data/app/apps/themes/new/custom_helper.rb +1 -9
  17. data/app/assets/javascripts/camaleon_cms/admin/_custom_fields.js +3 -3
  18. data/app/controllers/camaleon_cms/admin/appearances/nav_menus_controller.rb +2 -10
  19. data/app/controllers/camaleon_cms/admin/appearances/themes_controller.rb +0 -8
  20. data/app/controllers/camaleon_cms/admin/appearances/widgets/assign_controller.rb +1 -9
  21. data/app/controllers/camaleon_cms/admin/appearances/widgets/main_controller.rb +2 -10
  22. data/app/controllers/camaleon_cms/admin/appearances/widgets/sidebar_controller.rb +2 -10
  23. data/app/controllers/camaleon_cms/admin/categories_controller.rb +2 -12
  24. data/app/controllers/camaleon_cms/admin/comments_controller.rb +0 -8
  25. data/app/controllers/camaleon_cms/admin/installers_controller.rb +1 -9
  26. data/app/controllers/camaleon_cms/admin/media_controller.rb +2 -10
  27. data/app/controllers/camaleon_cms/admin/plugins_controller.rb +0 -8
  28. data/app/controllers/camaleon_cms/admin/post_tags_controller.rb +2 -12
  29. data/app/controllers/camaleon_cms/admin/posts/drafts_controller.rb +2 -10
  30. data/app/controllers/camaleon_cms/admin/posts_controller.rb +7 -15
  31. data/app/controllers/camaleon_cms/admin/sessions_controller.rb +2 -10
  32. data/app/controllers/camaleon_cms/admin/settings/custom_fields_controller.rb +5 -12
  33. data/app/controllers/camaleon_cms/admin/settings/post_types_controller.rb +1 -9
  34. data/app/controllers/camaleon_cms/admin/settings/sites_controller.rb +2 -10
  35. data/app/controllers/camaleon_cms/admin/settings_controller.rb +1 -9
  36. data/app/controllers/camaleon_cms/admin/user_roles_controller.rb +2 -10
  37. data/app/controllers/camaleon_cms/admin/users_controller.rb +3 -11
  38. data/app/controllers/camaleon_cms/admin_controller.rb +0 -8
  39. data/app/controllers/camaleon_cms/apps/plugins_admin_controller.rb +0 -8
  40. data/app/controllers/camaleon_cms/apps/plugins_front_controller.rb +0 -8
  41. data/app/controllers/camaleon_cms/apps/themes_admin_controller.rb +0 -8
  42. data/app/controllers/camaleon_cms/apps/themes_front_controller.rb +0 -8
  43. data/app/controllers/camaleon_cms/camaleon_controller.rb +0 -8
  44. data/app/controllers/camaleon_cms/frontend_controller.rb +17 -27
  45. data/app/controllers/concerns/camaleon_cms/frontend_concern.rb +2 -10
  46. data/app/decorators/camaleon_cms/application_decorator.rb +1 -9
  47. data/app/decorators/camaleon_cms/category_decorator.rb +0 -8
  48. data/app/decorators/camaleon_cms/custom_field_decorator.rb +0 -8
  49. data/app/decorators/camaleon_cms/custom_fields_concern.rb +1 -9
  50. data/app/decorators/camaleon_cms/metas_decorator_methods.rb +1 -9
  51. data/app/decorators/camaleon_cms/nav_menu_item_decorator.rb +0 -8
  52. data/app/decorators/camaleon_cms/plugin_decorator.rb +0 -8
  53. data/app/decorators/camaleon_cms/post_comment_decorator.rb +0 -8
  54. data/app/decorators/camaleon_cms/post_decorator.rb +0 -8
  55. data/app/decorators/camaleon_cms/post_tag_decorator.rb +0 -8
  56. data/app/decorators/camaleon_cms/post_type_decorator.rb +0 -8
  57. data/app/decorators/camaleon_cms/site_decorator.rb +0 -8
  58. data/app/decorators/camaleon_cms/term_taxonomy_decorator.rb +0 -8
  59. data/app/decorators/camaleon_cms/theme_decorator.rb +0 -8
  60. data/app/decorators/camaleon_cms/user_decorator.rb +0 -8
  61. data/app/decorators/camaleon_cms/widget_decorator.rb +0 -8
  62. data/app/helpers/camaleon_cms/admin/application_helper.rb +1 -9
  63. data/app/helpers/camaleon_cms/admin/breadcrumb_helper.rb +1 -9
  64. data/app/helpers/camaleon_cms/admin/category_helper.rb +1 -9
  65. data/app/helpers/camaleon_cms/admin/custom_fields_helper.rb +1 -9
  66. data/app/helpers/camaleon_cms/admin/menus_helper.rb +0 -8
  67. data/app/helpers/camaleon_cms/admin/post_type_helper.rb +1 -9
  68. data/app/helpers/camaleon_cms/camaleon_helper.rb +0 -8
  69. data/app/helpers/camaleon_cms/captcha_helper.rb +0 -8
  70. data/app/helpers/camaleon_cms/comment_helper.rb +1 -1
  71. data/app/helpers/camaleon_cms/content_helper.rb +1 -9
  72. data/app/helpers/camaleon_cms/frontend/application_helper.rb +0 -8
  73. data/app/helpers/camaleon_cms/frontend/nav_menu_helper.rb +0 -8
  74. data/app/helpers/camaleon_cms/frontend/seo_helper.rb +0 -8
  75. data/app/helpers/camaleon_cms/frontend/site_helper.rb +0 -8
  76. data/app/helpers/camaleon_cms/hooks_helper.rb +0 -8
  77. data/app/helpers/camaleon_cms/html_helper.rb +0 -8
  78. data/app/helpers/camaleon_cms/plugins_helper.rb +12 -16
  79. data/app/helpers/camaleon_cms/session_helper.rb +0 -8
  80. data/app/helpers/camaleon_cms/short_code_helper.rb +0 -8
  81. data/app/helpers/camaleon_cms/site_helper.rb +0 -8
  82. data/app/helpers/camaleon_cms/theme_helper.rb +0 -8
  83. data/app/helpers/camaleon_cms/uploader_helper.rb +0 -8
  84. data/app/helpers/camaleon_cms/user_roles_helper.rb +1 -9
  85. data/app/mailers/camaleon_cms/html_mailer.rb +0 -8
  86. data/app/models/camaleon_cms/ability.rb +6 -8
  87. data/app/models/camaleon_cms/category.rb +0 -8
  88. data/app/models/camaleon_cms/custom_field.rb +1 -9
  89. data/app/models/camaleon_cms/custom_field_group.rb +0 -8
  90. data/app/models/camaleon_cms/custom_fields_relationship.rb +1 -9
  91. data/app/models/camaleon_cms/meta.rb +1 -9
  92. data/app/models/camaleon_cms/nav_menu.rb +0 -8
  93. data/app/models/camaleon_cms/nav_menu_item.rb +1 -9
  94. data/app/models/camaleon_cms/plugin.rb +0 -8
  95. data/app/models/camaleon_cms/post.rb +1 -9
  96. data/app/models/camaleon_cms/post_comment.rb +1 -10
  97. data/app/models/camaleon_cms/post_default.rb +6 -14
  98. data/app/models/camaleon_cms/post_relationship.rb +1 -9
  99. data/app/models/camaleon_cms/post_tag.rb +0 -8
  100. data/app/models/camaleon_cms/post_type.rb +1 -9
  101. data/app/models/camaleon_cms/site.rb +2 -10
  102. data/app/models/camaleon_cms/term_relationship.rb +0 -9
  103. data/app/models/camaleon_cms/term_taxonomy.rb +3 -11
  104. data/app/models/camaleon_cms/theme.rb +0 -8
  105. data/app/models/camaleon_cms/user.rb +3 -13
  106. data/app/models/camaleon_cms/user_relationship.rb +1 -9
  107. data/app/models/camaleon_cms/user_role.rb +0 -8
  108. data/app/models/camaleon_cms/widget.rb +1 -9
  109. data/app/models/camaleon_cms/widget/assigned.rb +1 -9
  110. data/app/models/camaleon_cms/widget/main.rb +1 -9
  111. data/app/models/camaleon_cms/widget/sidebar.rb +0 -8
  112. data/app/models/concerns/camaleon_cms/categories_tags_for_posts.rb +1 -9
  113. data/app/models/concerns/camaleon_cms/custom_fields_read.rb +2 -10
  114. data/app/models/concerns/camaleon_cms/metas.rb +6 -14
  115. data/app/models/plugins.rb +0 -8
  116. data/app/models/themes.rb +0 -8
  117. data/app/uploaders/camaleon_cms_aws_uploader.rb +1 -1
  118. data/app/uploaders/camaleon_cms_local_uploader.rb +2 -2
  119. data/app/uploaders/camaleon_cms_uploader.rb +1 -1
  120. data/app/views/camaleon_cms/admin/posts/form.html.erb +1 -1
  121. data/app/views/camaleon_cms/admin/sessions/forgot.html.erb +1 -1
  122. data/app/views/camaleon_cms/admin/sessions/login.html.erb +1 -1
  123. data/app/views/camaleon_cms/admin/sessions/register.html.erb +1 -1
  124. data/app/views/camaleon_cms/admin/users/form.html.erb +1 -1
  125. data/app/views/camaleon_cms/default_theme/partials/_forms.html.erb +1 -1
  126. data/app/views/layouts/camaleon_cms/admin.html.erb +1 -1
  127. data/app/views/layouts/camaleon_cms/admin/_ajax.html.erb +1 -1
  128. data/config/initializers/action_view.rb +33 -17
  129. data/config/initializers/active_record_extension.rb +0 -8
  130. data/config/initializers/assets.rb +2 -9
  131. data/config/initializers/custom_initializers.rb +0 -8
  132. data/config/locales/camaleon_cms/admin/en.yml +12 -12
  133. data/db/migrate/20150611161134_post_table_into_utf8.rb +22 -14
  134. data/db/migrate/20151212095328_add_confirm_token_to_users.rb +3 -3
  135. data/db/migrate/20160504155653_move_first_name_of_users.rb +3 -3
  136. data/lib/camaleon_cms/engine.rb +1 -2
  137. data/lib/camaleon_cms/version.rb +1 -1
  138. data/lib/plugin_routes.rb +1 -2
  139. metadata +4 -30
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module CamaleonCms::Metas extend ActiveSupport::Concern
10
2
  included do
11
3
  # options and metas auto save support
@@ -85,21 +77,21 @@ module CamaleonCms::Metas extend ActiveSupport::Concern
85
77
 
86
78
  # set multiple configurations
87
79
  # h: {ket1: "sdsds", ff: "fdfdfdfd"}
88
- def set_multiple_options(h = {}, meta_key = "_default")
80
+ def set_options(h = {}, meta_key = "_default")
89
81
  if h.present?
90
82
  data = options(meta_key)
91
- h.to_sym.each do |key, value|
83
+ (h.is_a?(ActionController::Parameters) ? h.to_h: h).to_sym.each do |key, value|
92
84
  data[key] = fix_meta_var(value)
93
85
  end
94
86
  set_meta(meta_key, data)
95
87
  end
96
88
  end
97
- alias_method :set_options, :set_multiple_options
89
+ alias_method :set_multiple_options, :set_options
98
90
 
99
91
  # save multiple metas
100
92
  # sample: set_metas({name: 'Owen', email: 'owenperedo@gmail.com'})
101
93
  def set_metas(data_metas)
102
- data_metas.each do |key, value|
94
+ (data_metas.nil? ? {} : data_metas).each do |key, value|
103
95
  self.set_meta(key, value)
104
96
  end
105
97
  end
@@ -128,7 +120,7 @@ module CamaleonCms::Metas extend ActiveSupport::Concern
128
120
  private
129
121
  # fix to parse value
130
122
  def fix_meta_value(value)
131
- if (value.is_a?(Array) || value.is_a?(Hash))
123
+ if (value.is_a?(Array) || value.is_a?(Hash) || value.is_a?(ActionController::Parameters))
132
124
  value = value.to_json
133
125
  end
134
126
  fix_meta_var(value)
@@ -142,4 +134,4 @@ module CamaleonCms::Metas extend ActiveSupport::Concern
142
134
  value
143
135
  end
144
136
 
145
- end
137
+ end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Plugins
10
2
  def self.table_name_prefix
11
3
  'plugins_'
data/app/models/themes.rb CHANGED
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module Themes
10
2
  def self.table_name_prefix
11
3
  'themes_'
@@ -78,4 +78,4 @@ class CamaleonCmsAwsUploader < CamaleonCmsUploader
78
78
  bucket = s3.bucket(@current_site.get_option("filesystem_s3_bucket_name"))
79
79
  }.call
80
80
  end
81
- end
81
+ end
@@ -41,7 +41,7 @@ class CamaleonCmsLocalUploader < CamaleonCmsUploader
41
41
  res = {
42
42
  "name" => File.basename(file_path),
43
43
  "key" => parse_key(file_path),
44
- "url" => is_dir ? '' : (is_private_uploader? ? url_path.sub("#{@root_folder}/", '') : File.join(@current_site.the_url(locale: false), url_path)),
44
+ "url" => is_dir ? '' : (is_private_uploader? ? url_path.sub("#{@root_folder}/", '') : File.join(@current_site.decorate.the_url(locale: false), url_path)),
45
45
  "is_folder" => is_dir,
46
46
  "size" => is_dir ? 0 : File.size(file_path).round(2),
47
47
  "format" => is_dir ? 'folder' : self.class.get_file_format(file_path),
@@ -97,4 +97,4 @@ class CamaleonCmsLocalUploader < CamaleonCmsUploader
97
97
  r = "/#{r}" unless r.starts_with?('/')
98
98
  r
99
99
  end
100
- end
100
+ end
@@ -152,4 +152,4 @@ class CamaleonCmsUploader
152
152
  end
153
153
  def is_private_uploader?() end
154
154
 
155
- end
155
+ end
@@ -44,7 +44,7 @@
44
44
  <% if @post.manage_keywords?(@post_type) %>
45
45
  <div class="form-group">
46
46
  <label for="post_keywords"><%= t('camaleon_cms.admin.table.keywords') %></label><br>
47
- <input name="post[keywords]" id="post_keywords" class="form-control translatable" value="<%= @post.get_option("keywords") %>"/>
47
+ <input name="options[keywords]" id="post_keywords" class="form-control translatable" value="<%= params[:options].try(:keywords) || @post.get_option("keywords") %>"/>
48
48
  </div>
49
49
  <% end %>
50
50
  <%= _hook_args = {html: "", f: f, post: @post, post_type: @post_type}; hooks_run("post_form_custom_html", _hook_args); raw(_hook_args[:html]); %>
@@ -1,6 +1,6 @@
1
1
  <% content_for(:title, t("camaleon_cms.admin.login.forgot_your_password_int")) %>
2
2
  <div class="login-body">
3
- <%= render "layouts/camaleon_cms/admin/flash_messages" %>
3
+ <%= render "camaleon_cms/flash_messages" %>
4
4
  <% if @form_reset.present? %>
5
5
  <h3 class="login-title"><%= t('camaleon_cms.admin.login.reset_password') %></h3>
6
6
  <%= form_for(@user, as: "user", :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" }, :url => cama_admin_forgot_path({h: params[:h]}) ) do |f| %>
@@ -2,7 +2,7 @@
2
2
  <%= javascript_include_tag "camaleon_cms/admin/login_manifest" %>
3
3
  <div class="login-body">
4
4
  <h3 class="login-box-msg"><%= raw t('camaleon_cms.admin.login.welcome_login_html', default: 'Please Login') %> </h3>
5
- <%= render "layouts/camaleon_cms/admin/flash_messages" %>
5
+ <%= render "camaleon_cms/flash_messages" %>
6
6
  <%= form_for(@user, as: "user", :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" }, :url => cama_admin_login_path ) do |f| %>
7
7
  <div class="form-group">
8
8
  <div class="col-md-12">
@@ -1,6 +1,6 @@
1
1
  <% content_for(:title, t("camaleon_cms.admin.users.create_user")) %>
2
2
  <div class="login-body">
3
- <%= render "layouts/camaleon_cms/admin/flash_messages" %>
3
+ <%= render "camaleon_cms/flash_messages" %>
4
4
 
5
5
  <h3 class="login-title"><%= raw t('camaleon_cms.admin.login.msg_registration_html') %></h3>
6
6
  <%= form_for(@user, as: "user", :url => cama_admin_register_path, :html => { method: "post", role: "form", id:"login_user", class: "form-horizontal" } ) do |f| %>
@@ -47,7 +47,7 @@
47
47
  </div>
48
48
  <div class="">
49
49
  <label class="control-label"><%= t('camaleon_cms.admin.table.repeat_new')%></label>
50
- <%= f.password_field :password_confirm, :class => "form-control required", "equalTo"=>"#user_password" %>
50
+ <%= f.password_field :password_confirmation, :class => "form-control required", "equalTo"=>"#user_password" %>
51
51
  </div>
52
52
  <% end %>
53
53
  <div class="">
@@ -10,7 +10,7 @@
10
10
  <%= hidden_field_tag "post_id", post_id %>
11
11
 
12
12
  <div class="row">
13
- <%= render :partial => "/camaleon_cms/flash_messages", locals: @validation %>
13
+ <%= render :partial => "camaleon_cms/flash_messages", locals: @validation %>
14
14
  </div>
15
15
  <%= raw form_element_object(@form.id, options, post_id) %>
16
16
 
@@ -40,7 +40,7 @@
40
40
  <!-- Main content -->
41
41
  <section class="content" id="admin_content">
42
42
  <ol class="breadcrumb"><%= render_breadcrumbs :tag => :li, :separator => "" %></ol>
43
- <%= render "/layouts/camaleon_cms/admin/flash_messages" %>
43
+ <%= render "camaleon_cms/flash_messages" %>
44
44
  <%= yield %>
45
45
  </section>
46
46
  <!-- /.content -->
@@ -2,7 +2,7 @@
2
2
  <% unless params[:cama_skip_breadcrumb] %>
3
3
  <ol class="breadcrumb"><%= render_breadcrumbs :tag => :li, :separator => "" %></ol>
4
4
  <% end %>
5
- <%= render "/layouts/camaleon_cms/admin/flash_messages" %>
5
+ <%= render "camaleon_cms/flash_messages" %>
6
6
  <%= cama_draw_custom_assets %>
7
7
  <%= yield %>
8
8
  </section>
@@ -1,12 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
-
10
1
  # this is a customization to support multiple prefix to render partials
11
2
  module ActionView
12
3
  class LookupContext #:nodoc:
@@ -25,16 +16,41 @@ module ActionView
25
16
  @view_paths.find(*args_for_lookup(name, prefixes, partial, keys, options))
26
17
  end
27
18
  alias :find_template :find
19
+ end
20
+ end
21
+ end
28
22
 
29
- # fix to add camaleon prefixes on verify template exist
30
- def exists?(name, prefixes = [], partial = false, keys = [], options = {})
31
- if use_camaleon_partial_prefixes.present?
32
- prefixes = [""] unless prefixes.present?
33
- prefixes = (prefixes+self.prefixes).uniq if prefixes.is_a?(Array)
23
+
24
+ if Rails.version.to_s[0].to_i == 4
25
+ module ActionView
26
+ class LookupContext #:nodoc:
27
+ module ViewPaths
28
+ # fix to add camaleon prefixes on verify template exist
29
+ def exists?(name, prefixes = [], partial = false, keys = [], options = {})
30
+ if use_camaleon_partial_prefixes.present?
31
+ prefixes = [""] unless prefixes.present?
32
+ prefixes = (prefixes+self.prefixes).uniq if prefixes.is_a?(Array)
33
+ end
34
+ @view_paths.exists?(*args_for_lookup(name, prefixes, partial, keys, options))
34
35
  end
35
- @view_paths.exists?(*args_for_lookup(name, prefixes, partial, keys, options))
36
+ alias :template_exists? :exists?
36
37
  end
37
- alias :template_exists? :exists?
38
38
  end
39
39
  end
40
- end
40
+ else
41
+ module ActionView
42
+ class LookupContext #:nodoc:
43
+ module ViewPaths
44
+ # fix to add camaleon prefixes on verify template exist
45
+ def exists?(name, prefixes = [], partial = false, keys = [], **options)
46
+ if use_camaleon_partial_prefixes.present?
47
+ prefixes = [""] unless prefixes.present?
48
+ prefixes = (prefixes+self.prefixes).uniq if prefixes.is_a?(Array)
49
+ end
50
+ @view_paths.exists?(*args_for_lookup(name, prefixes, partial, keys, options))
51
+ end
52
+ alias :template_exists? :exists?
53
+ end
54
+ end
55
+ end
56
+ end
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  module ActiveRecordExtras
10
2
  module Relation
11
3
  extend ActiveSupport::Concern
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  # Be sure to restart your server when you modify this file.
10
2
 
11
3
  # Version of your assets, change this if you want to expire all your assets.
@@ -14,7 +6,8 @@ Rails.application.config.assets.version = '1.0'
14
6
  Rails.application.config.tinymce.install = :compile
15
7
 
16
8
  # Add additional assets to the asset load path
17
- # Rails.application.config.assets.paths << Emoji.images_path
9
+ Rails.application.config.assets.precompile += %w( camaleon_cms/* )
10
+ Rails.application.config.assets.precompile += %w( themes/*/assets/* )
18
11
 
19
12
  # This will precompile any assets, not just JavaScript (.js, .coffee, .swf, .css, .scss)
20
13
  Rails.application.config.assets.precompile << Proc.new { |path|
@@ -1,11 +1,3 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
1
  # load all custom initializers of plugins or themes
10
2
  PluginRoutes.all_apps.each do |ap|
11
3
  if ap["path"].present?
@@ -336,7 +336,7 @@ en:
336
336
  login_twitter: 'Twitter'
337
337
  login_facebook: 'Facebook'
338
338
  login_google: 'Google+'
339
- email_enabled: "Use this settings to send emails"
339
+ email_enabled: "Use these settings to send emails"
340
340
  email_server: "Email Server"
341
341
  email_port: "Email Port"
342
342
  email_domain: "Email Domain"
@@ -646,18 +646,18 @@ en:
646
646
  profile: "In this place you can see your profile options."
647
647
  content: "This block contains all content groups of your site. Each content can have different structure configured in settings => Content Groups"
648
648
  #dashboard: "In this section you can see "
649
- media: "This section manage your all your public media files"
650
- comments: "This section manage all the comments of your contents"
651
- appearance: "Manage all the information related to Public Interface"
652
- themes: "In this section you can choose your preferred theme (Public Interface)"
653
- widgets: "This module permit you to manage your widgets and paste the code in any content."
654
- menus: "<img style=\"max-width: 100%;\" src=\"%{image}\" /> This module permit you to control your menus for Public Interface in multiple levels."
649
+ media: "This section manages all your public media files."
650
+ comments: "This section manages all the comments of your contents."
651
+ appearance: "Manage all the information related to Public Interface."
652
+ themes: "In this section you can choose your preferred theme (Public Interface)."
653
+ widgets: "This module permits you to manage your widgets and paste the code in any content."
654
+ menus: "<img style=\"max-width: 100%;\" src=\"%{image}\" /> This module permits you to control your menus for Public Interface in multiple levels."
655
655
  plugins: "In this section you can see all plugins (custom applications to extend your site functionality)."
656
- users: "Permit you to manage all users of the site. Also you can manage the roles for the users."
657
- settings: "In this section you can find all site configurations"
656
+ users: "Permits you to manage all users of the site. Also you can manage the roles for the users."
657
+ settings: "In this section you can find all site configurations."
658
658
  gral_site: "This is a section where you can configure all settings of the site and current theme"
659
- sites: "This module permit you to manage your sub sites, i.e. you can create unlimited sites like this (This is visible only for main site). Check /config/system.json to customize settings."
660
- custom_fields: "This section permit you to extend easily your contents, themes,... by custom fields."
659
+ sites: "This module permits you to manage your sub sites, i.e. you can create unlimited sites like this (This is visible only for main site). Check /config/system.json to customize settings."
660
+ custom_fields: "This section permits you to extend easily your contents, themes,... by custom fields."
661
661
  post_type: "In this module you can manage your content groups without programing anything."
662
- languages: "This module permit you to manage all languages for your site. Also you can configure the language for your admin panel."
662
+ languages: "This module permits you to manage all languages for your site. Also you can configure the language for your admin panel."
663
663
  shortcodes: "In this section you can see all available shortcodes to use in your contents."
@@ -1,20 +1,28 @@
1
1
  class PostTableIntoUtf8 < ActiveRecord::Migration
2
2
  def change
3
- create_table "#{PluginRoutes.static_system_info["db_prefix"]}users" do |t|
4
- t.string "username", index: true
5
- t.string "role", default: "client", index: true
6
- t.string "email", index: true
7
- t.string "slug"
8
- t.string "password_digest"
9
- t.string "auth_token"
10
- t.string "password_reset_token"
11
- t.integer "parent_id"
12
- t.datetime "password_reset_sent_at"
13
- t.datetime "last_login_at"
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
9
+ else
10
+ create_table CamaleonCms::User.table_name do |t|
11
+ t.string "username", index: true
12
+ t.string "role", default: "client", index: true
13
+ t.string "email", index: true
14
+ t.string "slug"
15
+ t.string "password_digest"
16
+ t.string "auth_token"
17
+ t.string "password_reset_token"
18
+ t.integer "parent_id"
19
+ t.datetime "password_reset_sent_at"
20
+ t.datetime "last_login_at"
14
21
 
15
- # t.integer "site_id", default: -1, index: true
16
- t.timestamps null: false
17
- t.belongs_to :site, index: true, default: -1#, foreign_key: true
22
+ # t.integer "site_id", default: -1, index: true
23
+ t.timestamps null: false
24
+ t.belongs_to :site, index: true, default: -1#, foreign_key: true
25
+ end
18
26
  end
19
27
 
20
28
  create_table "#{PluginRoutes.static_system_info["db_prefix"]}term_taxonomy" do |t|
@@ -1,7 +1,7 @@
1
1
  class AddConfirmTokenToUsers < ActiveRecord::Migration
2
2
  def change
3
- add_column "#{PluginRoutes.static_system_info["db_prefix"]}users", :confirm_email_token, :string, default: nil
4
- add_column "#{PluginRoutes.static_system_info["db_prefix"]}users", :confirm_email_sent_at, :datetime, default: nil
5
- add_column "#{PluginRoutes.static_system_info["db_prefix"]}users", :is_valid_email, :boolean, default: true
3
+ add_column CamaleonCms::User.table_name, :confirm_email_token, :string, default: nil
4
+ add_column CamaleonCms::User.table_name, :confirm_email_sent_at, :datetime, default: nil
5
+ add_column CamaleonCms::User.table_name, :is_valid_email, :boolean, default: true
6
6
  end
7
7
  end
@@ -1,9 +1,9 @@
1
1
  class MoveFirstNameOfUsers < ActiveRecord::Migration
2
2
  def change
3
- add_column "#{PluginRoutes.static_system_info["db_prefix"]}users", :first_name, :string
4
- add_column "#{PluginRoutes.static_system_info["db_prefix"]}users", :last_name, :string
3
+ add_column CamaleonCms::User.table_name, :first_name, :string rescue nil
4
+ add_column CamaleonCms::User.table_name, :last_name, :string rescue nil
5
5
  CamaleonCms::User.all.each do |u|
6
- u.update_columns(first_name: u.get_meta('first_name'), last_name: u.get_meta('last_name'))
6
+ u.update_columns(first_name: u.get_meta('first_name'), last_name: u.get_meta('last_name')) if u.get_meta('first_name').present?
7
7
  end
8
8
  end
9
9
  end
@@ -4,8 +4,7 @@ require 'cancancan'
4
4
  require 'draper'
5
5
  require 'meta-tags'
6
6
  require 'mini_magick'
7
- require 'mobu'
8
- require 'protected_attributes'
7
+ # require 'mobu'
9
8
  require 'will_paginate'
10
9
  require 'will_paginate-bootstrap'
11
10
  require 'breadcrumbs_on_rails'
@@ -1,3 +1,3 @@
1
1
  module CamaleonCms
2
- VERSION = '2.2.1'
2
+ VERSION = '2.3.0'
3
3
  end
data/lib/plugin_routes.rb CHANGED
@@ -297,8 +297,7 @@ class PluginRoutes
297
297
  p = JSON.parse(File.read(config))
298
298
  p = p.with_indifferent_access rescue p
299
299
  p["key"] = gem.name if p["key"].nil? # TODO REVIEW ERROR FOR conflict plugin keys
300
- #p["key"] = File.basename(path)
301
- p["version"] = gem.version
300
+ p["version"] = gem.version.to_s
302
301
  p["path"] = path
303
302
  p["kind"] = "plugin"
304
303
  p["descr"] = gem.description unless p["descr"].present?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camaleon_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen Peredo Diaz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-12 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: mobu
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: will_paginate
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -178,20 +164,6 @@ dependencies:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
166
  version: 0.0.11
181
- - !ruby/object:Gem::Dependency
182
- name: protected_attributes
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :runtime
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
167
  - !ruby/object:Gem::Dependency
196
168
  name: aws-sdk
197
169
  requirement: !ruby/object:Gem::Requirement
@@ -225,6 +197,8 @@ files:
225
197
  - app/apps/plugins/attack/config/routes_admin.txt
226
198
  - app/apps/plugins/attack/models/attack.rb
227
199
  - app/apps/plugins/attack/views/admin/settings.html.erb
200
+ - app/apps/plugins/authoring_post/authoring_post_helper.rb
201
+ - app/apps/plugins/authoring_post/config/config.json
228
202
  - app/apps/plugins/front_cache/admin_controller.rb
229
203
  - app/apps/plugins/front_cache/config/config.json
230
204
  - app/apps/plugins/front_cache/config/initializer.rb