camaleon_cms 1.0.9 → 1.1.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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cea0e20904867353221500a789c0be49e87c80eb
|
|
4
|
+
data.tar.gz: 022d415a2db1170f92adac875566e29620e4db71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1bace7010fdafbfea80899f224db85e909b519fe72c56599d042fe451f56dcad563e78ab122e1dd9346e7c49758ac4bed09a9274aaf5ab39c094ea105d690312
|
|
7
|
+
data.tar.gz: f3917659e5ac4cf78271802c9ba07960267c2bebc86624aaad146ace1887756d695a64c04e396e0b9eadaea54db2d2d885c21aa1e93030463c14dccc022dd195
|
data/README.md
CHANGED
|
@@ -28,8 +28,7 @@
|
|
|
28
28
|
* Add the gem in your Gemfile
|
|
29
29
|
|
|
30
30
|
```
|
|
31
|
-
gem 'camaleon_cms', '
|
|
32
|
-
gem 'camaleon_cms' # if you want the latest version (1.0)
|
|
31
|
+
gem 'camaleon_cms', '1.1.0' # if you want the stable version before 2x
|
|
33
32
|
```
|
|
34
33
|
* Install the gem
|
|
35
34
|
|
|
@@ -10,17 +10,17 @@ class Api::ApiController < CamaleonController
|
|
|
10
10
|
|
|
11
11
|
def render_json_error_message(internal_message = 'Unexpected error', code = 100, status = 404, user_message = 'Unexpected error')
|
|
12
12
|
error = {
|
|
13
|
-
userMessage
|
|
14
|
-
internalMessage
|
|
15
|
-
code
|
|
13
|
+
:userMessage => user_message,
|
|
14
|
+
:internalMessage => internal_message,
|
|
15
|
+
:code => code
|
|
16
16
|
}
|
|
17
17
|
render_json_error(error, status)
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def render_json_ok(message = 'Success', status = 200, more_info = {})
|
|
21
21
|
msg = {
|
|
22
|
-
message
|
|
23
|
-
more_info
|
|
22
|
+
:message => message,
|
|
23
|
+
:more_info => more_info
|
|
24
24
|
}
|
|
25
25
|
render json: msg, status: status
|
|
26
26
|
end
|
|
@@ -13,7 +13,7 @@ module FrontendConcern extend ActiveSupport::Concern
|
|
|
13
13
|
# you can add custom sitemap elements in the attr "custom", like: https://github.com/owen2345/camaleon-cms/issues/106#issuecomment-146232211
|
|
14
14
|
# you can customize your content for html or xml format
|
|
15
15
|
def sitemap
|
|
16
|
-
r = {layout: (params[:format] == "html" ? (self.send :_layout) : false), render: "sitemap", custom: {
|
|
16
|
+
r = {layout: (params[:format] == "html" ? (self.send :_layout) : false), render: "sitemap", custom: {}, format: params[:format], skip_post_ids: [], skip_posttype_ids: [], skip_cat_ids: [], skip_tag_ids: []}
|
|
17
17
|
hooks_run("on_render_sitemap", r)
|
|
18
18
|
@r = r
|
|
19
19
|
render r[:render], layout: r[:layout]
|
|
@@ -3,7 +3,7 @@ xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
|
|
3
3
|
current_site.get_languages.each_with_index do |lang, index| lang = (index == 0 ? nil : lang);
|
|
4
4
|
xml.url do
|
|
5
5
|
xml.loc current_site.the_url(locale: lang)
|
|
6
|
-
xml.lastmod current_site.updated_at
|
|
6
|
+
xml.lastmod current_site.updated_at.to_date
|
|
7
7
|
xml.changefreq "daily"
|
|
8
8
|
xml.priority "1.0"
|
|
9
9
|
end
|
|
@@ -12,7 +12,7 @@ xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
|
|
12
12
|
next if @r[:skip_post_ids].include?(post.id)
|
|
13
13
|
xml.url do
|
|
14
14
|
xml.loc post.the_url(locale: lang)
|
|
15
|
-
xml.lastmod post.updated_at
|
|
15
|
+
xml.lastmod post.updated_at.to_date
|
|
16
16
|
xml.changefreq "monthly"
|
|
17
17
|
xml.priority "0.5"
|
|
18
18
|
end
|
|
@@ -22,7 +22,7 @@ xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
|
|
22
22
|
next if @r[:skip_cat_ids].include?(cat.id)
|
|
23
23
|
xml.url do
|
|
24
24
|
xml.loc cat.the_url(locale: lang)
|
|
25
|
-
xml.lastmod cat.updated_at
|
|
25
|
+
xml.lastmod cat.updated_at.to_date
|
|
26
26
|
xml.changefreq "monthly"
|
|
27
27
|
xml.priority "0.5"
|
|
28
28
|
end
|
|
@@ -32,7 +32,7 @@ xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
|
|
32
32
|
next if @r[:skip_posttype_ids].include?(ptype.id)
|
|
33
33
|
xml.url do
|
|
34
34
|
xml.loc ptype.the_url(locale: lang)
|
|
35
|
-
xml.lastmod ptype.updated_at
|
|
35
|
+
xml.lastmod ptype.updated_at.to_date
|
|
36
36
|
xml.changefreq "monthly"
|
|
37
37
|
xml.priority "0.5"
|
|
38
38
|
end
|
|
@@ -42,7 +42,7 @@ xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
|
|
|
42
42
|
next if @r[:skip_tag_ids].include?(tag.id)
|
|
43
43
|
xml.url do
|
|
44
44
|
xml.loc tag.the_url(locale: lang)
|
|
45
|
-
xml.lastmod tag.updated_at
|
|
45
|
+
xml.lastmod tag.updated_at.to_date
|
|
46
46
|
xml.changefreq "monthly"
|
|
47
47
|
xml.priority "0.5"
|
|
48
48
|
end
|
data/lib/camaleon_cms/version.rb
CHANGED
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: 1.0
|
|
4
|
+
version: 1.1.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: 2015-11-
|
|
11
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: actionpack-page_caching
|
|
@@ -974,9 +974,8 @@ requirements:
|
|
|
974
974
|
- ruby >= 1.9.3
|
|
975
975
|
- imagemagick
|
|
976
976
|
rubyforge_project:
|
|
977
|
-
rubygems_version: 2.4.
|
|
977
|
+
rubygems_version: 2.4.5.1
|
|
978
978
|
signing_key:
|
|
979
979
|
specification_version: 4
|
|
980
980
|
summary: Camaleon is a cms for Ruby on Rails 4 as an alternative to wordpress.
|
|
981
981
|
test_files: []
|
|
982
|
-
has_rdoc:
|