camaleon_cms 2.3.7.1 → 2.3.7.2
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 +4 -4
- data/README.md +1 -1
- data/app/helpers/camaleon_cms/email_helper.rb +6 -0
- data/lib/camaleon_cms/version.rb +1 -1
- data/lib/ext/string.rb +3 -2
- data/lib/plugin_routes.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3483c89c73c13138983fa6355ba481ac61daf5ec
|
4
|
+
data.tar.gz: e2efd330151d314cf6981daa752dcd661b3d9eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4c9a0e7f7b2f446280f474c2e4fe23547e0d2170e83b72fee0485b3642e46e7a6bd5d98359f478a048f31568e45313bb23bc3dfc374a288f0471f2c18b21ff1
|
7
|
+
data.tar.gz: 903beafb1fedfe15f338e0380d8f46b6e565a025527f8fb10c727535c8df87d5eef5c65a17d3900622e83116697697fcfb19a49409e68c74978d9984993d9abe
|
data/README.md
CHANGED
@@ -39,7 +39,7 @@
|
|
39
39
|
* Add the gem in your Gemfile
|
40
40
|
|
41
41
|
```
|
42
|
-
gem "camaleon_cms", '>=2.3.
|
42
|
+
gem "camaleon_cms", '>=2.3.7.2' # 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
|
@@ -18,6 +18,7 @@ module CamaleonCms::EmailHelper
|
|
18
18
|
end
|
19
19
|
|
20
20
|
# short method of send_email
|
21
|
+
# args: content='', from=nil, attachs=[], url_base='', current_site, template_name, layout_name, extra_data, format, cc_to
|
21
22
|
def cama_send_email(email_to, subject, args = {})
|
22
23
|
args = {url_base: cama_root_url, current_site: current_site, subject: subject}.merge(args)
|
23
24
|
args[:attachments] = args[:attachs] if args[:attachs].present?
|
@@ -47,4 +48,9 @@ module CamaleonCms::EmailHelper
|
|
47
48
|
send_email(user_to_send.email, t('camaleon_cms.admin.login.message.subject_email'), '', nil, [], 'password_reset', 'camaleon_cms/mailer', extra_data)
|
48
49
|
end
|
49
50
|
|
51
|
+
# send email to the first administrator
|
52
|
+
# args: same arguments than cama_send_email
|
53
|
+
def cama_send_mail_to_admin(subject, args = {})
|
54
|
+
cama_send_email(current_site.get_option('system_email', current_site.users.admin_scope.first.email), subject, args)
|
55
|
+
end
|
50
56
|
end
|
data/lib/camaleon_cms/version.rb
CHANGED
data/lib/ext/string.rb
CHANGED
@@ -81,8 +81,9 @@ class String
|
|
81
81
|
res = self
|
82
82
|
values.each do |k, v|
|
83
83
|
v = v.join(',') if v.is_a?(Array)
|
84
|
-
res = res.gsub("[#{k}]", v) if format_code == '['
|
85
|
-
res = res.gsub("{#{k}}", v) if format_code == '{'
|
84
|
+
res = res.gsub("[#{k}]", v.to_s) if format_code == '['
|
85
|
+
res = res.gsub("{#{k}}", v.to_s) if format_code == '{'
|
86
|
+
res = res.gsub("%{#{k}}", v.to_s) if format_code == '%{'
|
86
87
|
end
|
87
88
|
res
|
88
89
|
end
|
data/lib/plugin_routes.rb
CHANGED
@@ -106,7 +106,7 @@ class PluginRoutes
|
|
106
106
|
end
|
107
107
|
# convert action parameter into hash
|
108
108
|
def fixActionParameter(h)
|
109
|
-
(h.is_a?(ActionController::Parameters) ? (h.to_h rescue h.to_hash) : h)
|
109
|
+
(h.is_a?(ActionController::Parameters) ? (h.permit!.to_h rescue h.to_hash) : h)
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
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.3.7.
|
4
|
+
version: 2.3.7.2
|
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-12-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bcrypt
|