camaleon_cms 2.4.6.9 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of camaleon_cms might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/app/assets/config/camaleon-cms.js +0 -3
- data/app/controllers/camaleon_cms/frontend_controller.rb +1 -1
- data/app/helpers/camaleon_cms/session_helper.rb +3 -1
- data/config/initializers/assets.rb +22 -1
- data/lib/camaleon_cms/version.rb +1 -1
- data/lib/generators/camaleon_cms/install_generator.rb +22 -0
- data/spec/dummy/app/assets/config/manifest.js +4 -0
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5d5227bb2b35a92317e34504f8f4e6761572e4b56205f800499b1be6970b33f
|
4
|
+
data.tar.gz: 80880a6f96cba71ea2407da6c0913dd1cd9f18208cdf0c3d584151969e6ad3ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50018c854c231ff6d29f0a2e5ffe216303dd81610d9319bb7679f75709410b9353cd037bcb7829f328b44b2f3bc08cd9225c5e37da591fc54b68d714f8cac4bd
|
7
|
+
data.tar.gz: 314dd4a5224c69799bf849b1e36f39737cc776d47fe9d8786c5209d6799824ea91e09035db46468c9fbb0cab460b0dadba5974bb24ab987069b3c26c5a5347a0
|
data/README.md
CHANGED
@@ -123,6 +123,9 @@ http://camaleon.tuzitio.com/store/plugins
|
|
123
123
|
# gem "camaleon_cms", github: 'owen2345/camaleon-cms' # latest development version
|
124
124
|
|
125
125
|
# gem 'draper', '~> 3' # for Rails 5+
|
126
|
+
|
127
|
+
# For Ruby version < 2.5
|
128
|
+
# gem 'sprockets', '< 4' # Sprockets 4 requires Ruby version >= 2.5
|
126
129
|
```
|
127
130
|
|
128
131
|
* Install required Gem and dependencies
|
@@ -2,9 +2,6 @@
|
|
2
2
|
//= link_tree ../images
|
3
3
|
//= link_tree ../javascripts
|
4
4
|
//= link_tree ../stylesheets
|
5
|
-
//= link_tree ../../apps/themes/default/assets
|
6
|
-
//= link_tree ../../apps/themes/camaleon_first/assets
|
7
|
-
//= link_tree ../../apps/themes/new/assets
|
8
5
|
//= link_tree ../../apps/plugins/visibility_post/assets/js
|
9
6
|
//= link plugins/cama_contact_form/admin_editor.js
|
10
7
|
//= link camaleon_cms/admin/nav_menu.js
|
@@ -243,7 +243,7 @@ class CamaleonCms::FrontendController < CamaleonCms::CamaleonController
|
|
243
243
|
lookup_context.prefixes.delete_if{|t| t =~ /themes\/(.*)\/views/i || t == "camaleon_cms/default_theme" || t == "themes/#{current_site.id}/views" }
|
244
244
|
|
245
245
|
lookup_context.prefixes.append("themes/#{current_site.id}/views") if Dir.exist?(Rails.root.join('app', 'apps', 'themes', current_site.id.to_s).to_s)
|
246
|
-
lookup_context.prefixes.append("themes/#{
|
246
|
+
lookup_context.prefixes.append("themes/#{current_theme.slug}/views")
|
247
247
|
lookup_context.prefixes.append("camaleon_cms/default_theme")
|
248
248
|
|
249
249
|
lookup_context.prefixes = lookup_context.prefixes.uniq
|
@@ -141,7 +141,9 @@ module CamaleonCms::SessionHelper
|
|
141
141
|
# return the session id
|
142
142
|
def cama_get_session_id
|
143
143
|
session[:autor] = "Owen Peredo Diaz" unless request.session_options[:id].present?
|
144
|
-
request.session_options[:id]
|
144
|
+
id = request.session_options[:id]
|
145
|
+
id = id.public_id if id && id.class.name == 'Rack::Session::SessionId'
|
146
|
+
id
|
145
147
|
end
|
146
148
|
|
147
149
|
private
|
@@ -3,4 +3,25 @@
|
|
3
3
|
# Version of your assets, change this if you want to expire all your assets.
|
4
4
|
Rails.application.config.assets.version = '1.0'
|
5
5
|
|
6
|
-
Rails.application.config.tinymce.install = :
|
6
|
+
Rails.application.config.tinymce.install = :copy
|
7
|
+
|
8
|
+
# Add additional assets to the asset load path
|
9
|
+
Rails.application.config.assets.precompile += %w( camaleon_cms/* )
|
10
|
+
# Rails.application.config.assets.precompile += %w( themes/*/assets/* )
|
11
|
+
|
12
|
+
# This will precompile any assets, not just JavaScript (.js, .coffee, .swf, .css, .scss)
|
13
|
+
|
14
|
+
sprokects_4_or_newer = defined?(Sprockets::BabelProcessor)
|
15
|
+
unless sprokects_4_or_newer
|
16
|
+
Rails.application.config.assets.precompile << Proc.new { |path|
|
17
|
+
res = false
|
18
|
+
if File.dirname(path).start_with?('plugins/') || File.dirname(path).start_with?('themes/')
|
19
|
+
name = File.basename(path)
|
20
|
+
content_type = MIME::Types.type_for(name).first.content_type rescue ""
|
21
|
+
if (path =~ /\.(css|js|svg|ttf|woff|eot|swf|pdf|png|jpg|gif)\z/ || content_type.scan(/(javascript|image\/|audio|video|font)/).any?) && !name.start_with?("_") && !path.include?('/views/')
|
22
|
+
res = true
|
23
|
+
end
|
24
|
+
end
|
25
|
+
res
|
26
|
+
}
|
27
|
+
end
|
data/lib/camaleon_cms/version.rb
CHANGED
@@ -12,6 +12,28 @@ module CamaleonCms
|
|
12
12
|
Dir.mkdir Rails.root.join("app", "apps").to_s unless Dir.exist?(Rails.root.join("app", "apps").to_s)
|
13
13
|
directory("apps", "app/apps")
|
14
14
|
directory( File.join($camaleon_engine_dir, 'app/apps/themes').to_s, 'app/apps/themes')
|
15
|
+
|
16
|
+
sprokects_4_or_newer = defined?(Sprockets::BabelProcessor)
|
17
|
+
if sprokects_4_or_newer
|
18
|
+
assets_config_dir = Rails.root.join('app', 'assets', 'config')
|
19
|
+
FileUtils.makedirs(assets_config_dir)
|
20
|
+
assets_config_file = assets_config_dir.join('manifest.js')
|
21
|
+
FileUtils.touch(assets_config_file) unless File.file?(assets_config_file)
|
22
|
+
append_to_file assets_config_file, <<~ASSETS
|
23
|
+
|
24
|
+
// Camaleon CMS assets
|
25
|
+
//= link camaleon-cms.js
|
26
|
+
//= link_tree ../../apps/themes/camaleon_first/assets
|
27
|
+
//= link_tree ../../apps/themes/default/assets
|
28
|
+
//= link_tree ../../apps/themes/new/assets
|
29
|
+
ASSETS
|
30
|
+
append_to_file Rails.root.join('config', 'initializers', 'assets.rb'),
|
31
|
+
<<~PRECOMPILE_MANIFEST
|
32
|
+
|
33
|
+
Rails.application.config.assets.precompile += %w( manifest.js )
|
34
|
+
PRECOMPILE_MANIFEST
|
35
|
+
end
|
36
|
+
|
15
37
|
append_to_file 'Gemfile' do
|
16
38
|
"\n\n#################### Camaleon CMS include all gems for plugins and themes #################### \nrequire './lib/plugin_routes' \ninstance_eval(PluginRoutes.draw_gems)"
|
17
39
|
end
|
@@ -1,4 +1,8 @@
|
|
1
1
|
//= link_tree ../images
|
2
2
|
//= link_tree ../javascripts
|
3
3
|
//= link_tree ../stylesheets
|
4
|
+
//= link_tree ../../../../../app/apps/themes/default/assets
|
5
|
+
//= link_tree ../../../../../app/apps/themes/camaleon_first/assets
|
6
|
+
//= link_tree ../../../../../app/apps/themes/new/assets
|
4
7
|
//= link camaleon-cms.js
|
8
|
+
//= link camaleon_cms/admin/nav_menu.js
|
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
|
+
version: 2.5.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:
|
11
|
+
date: 2020-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|
@@ -376,16 +376,16 @@ dependencies:
|
|
376
376
|
name: rubocop
|
377
377
|
requirement: !ruby/object:Gem::Requirement
|
378
378
|
requirements:
|
379
|
-
- - "
|
379
|
+
- - ">="
|
380
380
|
- !ruby/object:Gem::Version
|
381
|
-
version: 0
|
381
|
+
version: '0'
|
382
382
|
type: :development
|
383
383
|
prerelease: false
|
384
384
|
version_requirements: !ruby/object:Gem::Requirement
|
385
385
|
requirements:
|
386
|
-
- - "
|
386
|
+
- - ">="
|
387
387
|
- !ruby/object:Gem::Version
|
388
|
-
version: 0
|
388
|
+
version: '0'
|
389
389
|
description: Camaleon CMS is a dynamic and advanced content management system based
|
390
390
|
on Ruby on Rails as an alternative to Wordpress.
|
391
391
|
email:
|
@@ -1160,7 +1160,7 @@ requirements:
|
|
1160
1160
|
- ruby >= 2.2
|
1161
1161
|
- imagemagick
|
1162
1162
|
rubyforge_project:
|
1163
|
-
rubygems_version: 2.7.
|
1163
|
+
rubygems_version: 2.7.7
|
1164
1164
|
signing_key:
|
1165
1165
|
specification_version: 4
|
1166
1166
|
summary: Camaleon is a CMS for Ruby on Rails as an alternative to Wordpress.
|