camaleon_cms 2.4.3.2 → 2.4.3.3

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.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 309565425b7415af401d6ea4a5238345397f9766
4
- data.tar.gz: b97b8586392c7c6694d99053b02deb200baababc
3
+ metadata.gz: 321930f8abe547acf106294eafd897348c7aaf30
4
+ data.tar.gz: e63df5bbaeda1b1c9ffd0ea57b204d2673e5ff31
5
5
  SHA512:
6
- metadata.gz: 8e5b72a18704f4dba361c8a64fabefc1c6f3d065a33745f73dd35c2c75879d397fe0a2e15df9165475d93844e880ec17a65b8e5cc3c094a08efc75d705eefc92
7
- data.tar.gz: 6133cee060a592483e03afe30d1769a8378d1fa4e724489bd014e8f2111a352ef8e425bcf0a214860bc5355f1db5b172cb9739bd8c2264800b1f8554e3ce84a5
6
+ metadata.gz: 5d6041288936dfe812038b6f18c8848a15aaabfee9d1b890c59913c88090191ebaa454cdb77c2dbbe318a64d8db54cd0340dadec6c38e5388c4bc5f92d0f9869
7
+ data.tar.gz: 711300967ce1541635e9984b327d7a5a5526ca2894a290a33b28135c5469b04371f6fc3ef315e61c44e534754d1d0d743ecc32cc531ea50ce535198ab668b0e4
data/README.md CHANGED
@@ -39,20 +39,18 @@
39
39
  * Add the gem in your Gemfile
40
40
 
41
41
  ```
42
- gem "camaleon_cms", '>= 2.4.3.2' # Stable versions 2.3.6, 2.2.1, 2.1.1, 2.1.0
42
+ gem "camaleon_cms", '>= 2.4.3.3' # Stable versions 2.3.6, 2.2.1, 2.1.1, 2.1.0
43
43
  # gem "camaleon_cms", github: 'owen2345/camaleon-cms' # current development version
44
44
  ```
45
45
  * Only Rails 5 support
46
46
 
47
- Add in your Gemfile
47
+ Add in your Gemfile draper for Rails 5
48
48
  ```
49
- gem 'activemodel-serializers-xml', git: 'https://github.com/rails/activemodel-serializers-xml'
50
- gem 'draper', github: 'audionerd/draper', branch: 'rails5'
49
+ gem 'draper', github: 'drapergem/draper'
51
50
  ```
52
- Create a file "lib/rails/test_unit/sub_test_task.rb" in your project (draper patch)
51
+ In your Gemfile, change sass-rails into (Camaleon doesn't support for sprockets >= 4 which is included in sass-rails >= 6)
53
52
  ```
54
- class Rails::SubTestTask < Rake::TestTask
55
- end
53
+ gem 'sass-rails', '~> 5.0'
56
54
  ```
57
55
 
58
56
  * Install required Gem and dependencies
@@ -80,7 +78,7 @@
80
78
 
81
79
  # Camaleon CMS (It adapts to your needs)
82
80
 
83
- Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails 4 and Ruby 1.9.3+. This CMS is an alternative to wordpress for Ruby on Rails developers to manage advanced contents easily.
81
+ Camaleon CMS is a dynamic and advanced content management system based on Ruby on Rails 4+ and Ruby 1.9.3+. This CMS is an alternative to wordpress for Ruby on Rails developers to manage advanced contents easily.
84
82
  Camaleon CMS is a flexible manager where you can build your custom content structure without coding anything by custom fields and custom contents type.
85
83
 
86
84
  To download or publish themes go to themes store:
@@ -101,7 +99,7 @@ It was released on July, 2015 and tested previously with more than 20 projects b
101
99
  * Extend or customize the functionalities by plugins
102
100
  * Manage your content visualization by themes
103
101
  * Advanced User roles
104
- * Integrate into existent rails 4 projects
102
+ * Integrate into existent rails 4+ projects
105
103
  * Other features:
106
104
  - Shortcodes
107
105
  - Widgets
@@ -45,7 +45,7 @@ module CamaleonCms::ShortCodeHelper
45
45
  key: (String) Post slug
46
46
  field: (String) Custom field key, you can add render_field='true' to render field as html element, also you can add index=2 to indicate the value in position 2 for multitple values
47
47
  attrs: (String) attribute name
48
- post: title | created_at | excerpt | url | link | thumb | updated_at | author_name | author_url
48
+ post: title | created_at | excerpt | url | link | thumb | updated_at | author_name | author_url | content
49
49
  posttype: title | created_at | excerpt | url | link | thumb | updated_at
50
50
  category: title | created_at | excerpt | url | link | thumb | updated_at
51
51
  posttag: title | created_at | excerpt | url | link | thumb | updated_at
@@ -47,9 +47,9 @@
47
47
  </div>
48
48
  <div class="form-group admin_logo_upload">
49
49
  <label for=""><%= t('camaleon_cms.admin.table.logo') %></label><br>
50
- <%= hidden_field :options, :logo, :class => "form-control unput_upload", :value => @site.get_option("logo") %>
50
+ <%= hidden_field :options, :logo, :class => "form-control unput_upload", :value => @site.get_option("logo"), "data-label" => "#{t('camaleon_cms.admin.button.upload_image')}" %>
51
51
  </div>
52
- <div class="form-group admin_logo_upload">
52
+ <div class="form-group admin_icon_upload">
53
53
  <label for=""><%= t('camaleon_cms.admin.table.favicon') %></label><br>
54
54
  <%= hidden_field :options, :icon, :class => "form-control unput_upload", :value => @site.get_option("icon"), "data-label" => "#{t('camaleon_cms.admin.button.upload_icon')}", "data-ext" => "ico" %>
55
55
  </div>
@@ -95,4 +95,4 @@
95
95
  $(this).removeAttr("disabled");
96
96
  }).trigger("change");
97
97
  });
98
- </script>
98
+ </script>
data/config/routes.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  Rails.application.routes.draw do
2
2
  scope PluginRoutes.system_info["relative_url_root"], as: "cama" do
3
3
  # root "application#index"
4
- default_url_options :host => (CamaleonCms::Site.main_site.slug rescue "")
4
+ default_url_options PluginRoutes.default_url_options
5
5
 
6
6
  # public
7
7
  get 'error', as: "error", to: 'camaleon_cms/camaleon#render_error'
@@ -1,4 +1,4 @@
1
- class PostTableIntoUtf8 < ActiveRecord::Migration
1
+ class PostTableIntoUtf8 < CamaManager.migration_class
2
2
  def change
3
3
  if table_exists? CamaleonCms::User.table_name
4
4
  add_column(CamaleonCms::User.table_name, :email, :string) unless column_exists?(CamaleonCms::User.table_name, :email)
@@ -1,5 +1,5 @@
1
1
  # change post structure to optimize query speed
2
- class RenameColumnPosts < ActiveRecord::Migration
2
+ class RenameColumnPosts < CamaManager.migration_class
3
3
  def change
4
4
  remove_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :comment_count
5
5
  add_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :post_order, :integer, default: 0
@@ -1,4 +1,4 @@
1
- class AddConfirmTokenToUsers < ActiveRecord::Migration
1
+ class AddConfirmTokenToUsers < CamaManager.migration_class
2
2
  def change
3
3
  add_column CamaleonCms::User.table_name, :confirm_email_token, :string, default: nil
4
4
  add_column CamaleonCms::User.table_name, :confirm_email_sent_at, :datetime, default: nil
@@ -1,4 +1,4 @@
1
- class AddFeatureToPosts < ActiveRecord::Migration
1
+ class AddFeatureToPosts < CamaManager.migration_class
2
2
  def change
3
3
  add_column "#{PluginRoutes.static_system_info["db_prefix"]}posts", :is_feature, :boolean, default: false
4
4
  end
@@ -1,4 +1,4 @@
1
- class MoveFirstNameOfUsers < ActiveRecord::Migration
1
+ class MoveFirstNameOfUsers < CamaManager.migration_class
2
2
  def change
3
3
  add_column CamaleonCms::User.table_name, :first_name, :string unless column_exists?(CamaleonCms::User.table_name, :first_name)
4
4
  add_column CamaleonCms::User.table_name, :last_name, :string unless column_exists?(CamaleonCms::User.table_name, :last_name)
@@ -1,4 +1,4 @@
1
- class ImproveMenusStructure < ActiveRecord::Migration
1
+ class ImproveMenusStructure < CamaManager.migration_class
2
2
  def change
3
3
  CamaleonCms::NavMenuItem.all.each do |menu|
4
4
  menu.update_columns({description: menu.get_option('object_id'), slug: menu.get_option('type')})
@@ -1,4 +1,4 @@
1
- class AddGroupToCustomFieldValues < ActiveRecord::Migration
1
+ class AddGroupToCustomFieldValues < CamaManager.migration_class
2
2
  def change
3
3
  add_column "#{PluginRoutes.static_system_info["db_prefix"]}custom_fields_relationships", :group_number, :integer, default: 0
4
4
  end
@@ -1,4 +1,4 @@
1
- class InstallMigratedSeoPlugin < ActiveRecord::Migration
1
+ class InstallMigratedSeoPlugin < CamaManager.migration_class
2
2
  # install seo plugin without calling hooks (seo logic moved to separated plugin)
3
3
  def change
4
4
  CamaleonCms::Site.all.each do |s|
@@ -1,4 +1,4 @@
1
- class DropUserRelationshipTable < ActiveRecord::Migration
1
+ class DropUserRelationshipTable < CamaManager.migration_class
2
2
  def change
3
3
  drop_table "#{PluginRoutes.static_system_info["db_prefix"]}user_relationships"
4
4
  end
@@ -1,7 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'bcrypt'
3
3
  require 'cancancan'
4
- require 'draper'
5
4
  require 'meta-tags'
6
5
  require 'mini_magick'
7
6
  # require 'mobu'
@@ -13,13 +12,15 @@ require 'font-awesome-rails'
13
12
  require 'tinymce-rails'
14
13
  require 'jquery-rails'
15
14
  require 'coffee-rails'
16
- require 'sass-rails'
15
+ # require 'sass-rails'
17
16
  require 'cama_contact_form'
18
17
  require 'cama_meta_tag'
19
18
 
20
19
  $camaleon_engine_dir = File.expand_path("../../../", __FILE__)
21
20
  require File.join($camaleon_engine_dir, "lib", "plugin_routes").to_s
22
21
  Dir[File.join($camaleon_engine_dir, "lib", "ext", "**", "*.rb")].each{ |f| require f }
22
+ require 'draper' if PluginRoutes.isRails4?
23
+
23
24
  module CamaleonCms
24
25
  class Engine < ::Rails::Engine
25
26
  config.before_initialize do |app|
@@ -1,3 +1,3 @@
1
1
  module CamaleonCms
2
- VERSION = '2.4.3.2'
2
+ VERSION = '2.4.3.3'
3
3
  end
data/lib/plugin_routes.rb CHANGED
@@ -368,7 +368,17 @@ class PluginRoutes
368
368
  rescue
369
369
  Gem.available?(name)
370
370
  end
371
+
372
+ # return the default url options for Camaleon CMS
373
+ def self.default_url_options
374
+ {host: (CamaleonCms::Site.main_site.slug rescue "")}
375
+ end
376
+
377
+ def self.migration_class
378
+ isRails4? ? ActiveRecord::Migration : ActiveRecord::Migration[4.2]
379
+ end
371
380
  end
381
+ CamaManager = PluginRoutes
372
382
 
373
383
  #********* fix missing helper method for breadcrumb on rails gem **********#
374
384
  if PluginRoutes.isRails5?
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.4.3.2
4
+ version: 2.4.3.3
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: 2017-04-03 00:00:00.000000000 Z
11
+ date: 2017-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt
@@ -182,16 +182,16 @@ dependencies:
182
182
  name: sass-rails
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - "<="
186
186
  - !ruby/object:Gem::Version
187
- version: '0'
187
+ version: 5.0.6
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - "<="
193
193
  - !ruby/object:Gem::Version
194
- version: '0'
194
+ version: 5.0.6
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: cama_contact_form
197
197
  requirement: !ruby/object:Gem::Requirement