camaleon_sitemap_customizer 0.5.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be7b9704e52550cba5caa8869028deed68efe625a26fe6a8b5362b02183878a4
4
- data.tar.gz: a73189b20357610bb82a5b9cc44b8a42cc750a1901000002c2ca266a296e2f1a
3
+ metadata.gz: 47f7e334d8871af77787cbb93c8ee67d8eb4dd4875a3e72431f096bde4ac2639
4
+ data.tar.gz: 0275d3ff621df32f43db0bde33cf31ebab70dfdf5b90b0e257f7278d83bd5187
5
5
  SHA512:
6
- metadata.gz: 136bbaa7a5bb308037442d4925f7d89347f6a05f8b6108a97b324274efda818272058531648bc40773797d092929bfee3daf19352fa683f958af6f9428cb9332
7
- data.tar.gz: '082cfb453c7773b9731ba32a775d9664034848b450dde2e886efff56d5295263fcc4733f3d638ba2cb4f6d47d85174602016a922937042ba7127c378cd028091'
6
+ metadata.gz: 594c6b76c5ed1555aedd439b9745087a8d0624ffb9b31db84562ede0dd89d81361b93f4c40f80a513afc4ccea3949f57cdb5cce04d925b9a394ccb913cb98388
7
+ data.tar.gz: 17b371adc579434eaad5bf609e2ce1baab2491c22d9ec98fad9ff716566b7396d18987cad7ddfe12cff703e34c82261188a802a630dcdfce9841a4adb29e0a27
data/README.md CHANGED
@@ -1,14 +1,19 @@
1
- # Sitemap Customizer
2
- Camaleon CMS automatically generates sitemaps for all content of your site. This plugin allows you to select content to omit from the sitemap.
1
+ ![](https://img.shields.io/badge/ruby-2.5%2B-red.svg)
2
+ ![Gem Version](https://img.shields.io/gem/v/camaleon_sitemap_customizer.svg?colorB=blue)
3
+ [![Ruby Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/testdouble/standard)
4
+ [![Build Status](https://travis-ci.com/brian-kephart/camaleon_sitemap_customizer.svg?branch=master)](https://travis-ci.com/brian-kephart/camaleon_sitemap_customizer)
3
5
 
4
- Use the site settings (/admin/plugins/camaleon_sitemap_customizer/settings) to:
5
- - Select **content types** to exclude **completely** (individual posts and list pages).
6
- - Select **content types** for which to exclude **list pages only**. For example, if you have a content type called 'Podcast', this option would allow you to exclude 'http://yoursite.com/podcast' (the page listing all posts of type 'Podcast') without excluding the pages for each individual post.
7
- - Select **categories** for which to exclude list pages, same as above.
8
- - Exclude all **tag** list pages.
9
- - Exclude post url for page designated as the homepage. For example, if you have a page called '/index' that you have set as your homepage in the site settings, the sitemap will list the same page at 'http://yoursite.com/' and 'http://yoursite.com/index'. This option allows you to avoid the duplicate listing.
10
6
 
11
- This plugin (as of version 0.3.0) also adds an option to each post for exclusion from the sitemap. This is accessible via the regular post editor, rather than in the plugin settings.
7
+ # Camaleon Sitemap Customizer
8
+ Camaleon CMS automatically generates sitemaps for all content of your site. This plugin allows you to select content to omit from the sitemap. You may wish to do this for a variety of reasons:
9
+ - Keep search engines from indexing pages that are not relevant to the general public.
10
+ - Keep search engines from indexing summary pages that only contain duplicate content.
11
+ - Remove redundant entries. (ex. – 'https://yoursite.com', 'https://yoursite.com/index')
12
+
13
+ This plugin also comes with:
14
+ - an optional sitemap template that includes caching to speed up rendering,
15
+ - links in plugin settings to submit your sitemap to Google,
16
+ - an option to automatically resubmit your sitemap to Google when changes are made (requires ActiveJob).
12
17
 
13
18
  ## Installation
14
19
  Add this line to your application's Gemfile:
@@ -27,12 +32,28 @@ Or install it yourself as:
27
32
  $ gem install camaleon_sitemap_customizer
28
33
  ```
29
34
 
35
+ ## Usage
36
+ Use the site settings (/admin/plugins/camaleon_sitemap_customizer/settings) to:
37
+ - Select **content types** to exclude **completely** (individual posts and list pages).
38
+ - Select **content types** for which to exclude **list pages only**. For example, if you have a content type called 'Podcast', this option would allow you to exclude 'http://yoursite.com/podcast' (the page listing all posts of type 'Podcast') without excluding the pages for each individual post.
39
+ - Select **categories** for which to exclude list pages, same as above.
40
+ - Exclude all **tag** list pages.
41
+ - Exclude post url for page designated as the homepage. For example, if you have a page called '/index' that you have set as your homepage in the site settings, the sitemap will list the same page at 'http://yoursite.com/' and 'http://yoursite.com/index'. This option allows you to avoid the duplicate listing.
42
+ - Choose whether to use the included sitemap template, which includes caching to speed up rendering.
43
+
44
+ This plugin also adds an option to each post for exclusion from the sitemap. This is accessible via the regular post editor, rather than in the plugin settings.
45
+
46
+ ### About sitemap caching
47
+ The default sitemaps in Camaleon render very slowly due to the many database queries required for them to be accurate. This may not be noticeable on small sites, but large ones can sometimes take several seconds to render. This can be sped up with caching, but Camaleon's Front Cache plugin does not render XML.
48
+
49
+ This plugin offers an XML builder template that uses Russian doll caching to speed up rendering. It can be enabled on the settings page.
50
+
51
+ If you wish to make changes to the included template:
52
+ 1. **Disable** the caching option in the plugin settings.
53
+ 2. Copy the included `app/views/camaleon_cms/default_theme/sitemap_with_caching.xml.builder` into your app's `app/apps/themes/your_theme/views/sitemap.xml.builder` and make your changes. Camaleon will use the `sitemap.xml.builder` file in your theme directory by default.
54
+
30
55
  ## Contributing
31
- - Fork it.
32
- - Create a branch (git checkout -b my_feature_branch)
33
- - Commit your changes (git commit -am "Added a sweet feature")
34
- - Push to the branch (git push origin my_feature_branch)
35
- - Create a pull request from your branch into master (Please be sure to provide enough detail for us to cipher what this change is doing)
56
+ See CONTRIBUTING.md
36
57
 
37
58
  ## License
38
59
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -1,36 +1,34 @@
1
+ # frozen_string_literal: true
2
+
1
3
  begin
2
- require 'bundler/setup'
4
+ require "bundler/setup"
3
5
  rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
5
7
  end
6
8
 
7
- require 'rdoc/task'
9
+ require "rdoc/task"
8
10
 
9
11
  RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'CamaleonSitemapCustomizer'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.md')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
12
+ rdoc.rdoc_dir = "rdoc"
13
+ rdoc.title = "CamaleonSitemapCustomizer"
14
+ rdoc.options << "--line-numbers"
15
+ rdoc.rdoc_files.include("README.md")
16
+ rdoc.rdoc_files.include("lib/**/*.rb")
15
17
  end
16
18
 
17
- APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
18
- load 'rails/tasks/engine.rake'
19
-
20
-
21
- load 'rails/tasks/statistics.rake'
19
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
20
+ load "rails/tasks/engine.rake"
22
21
 
22
+ load "rails/tasks/statistics.rake"
23
23
 
24
+ require "bundler/gem_tasks"
24
25
 
25
- require 'bundler/gem_tasks'
26
-
27
- require 'rake/testtask'
26
+ require "rake/testtask"
28
27
 
29
28
  Rake::TestTask.new(:test) do |t|
30
- t.libs << 'test'
31
- t.pattern = 'test/**/*_test.rb'
29
+ t.libs << "test"
30
+ t.pattern = "test/**/*_test.rb"
32
31
  t.verbose = false
33
32
  end
34
33
 
35
-
36
34
  task default: :test
@@ -1,4 +1,17 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class Plugins::CamaleonSitemapCustomizer::AdminController < CamaleonCms::Apps::PluginsAdminController
4
+ DEFAULT_OPTIONS = {
5
+ "skip_post_types" => [],
6
+ "skip_post_list_types" => [],
7
+ "skip_category_list_types" => [],
8
+ "skip_all_categories" => false,
9
+ "skip_tags" => false,
10
+ "skip_home" => false,
11
+ "cache" => Rails.env.test?,
12
+ "submit_changes_to_google" => false
13
+ }.freeze
14
+
2
15
  include Plugins::CamaleonSitemapCustomizer::MainHelper
3
16
  def index
4
17
  end
@@ -9,16 +22,10 @@ class Plugins::CamaleonSitemapCustomizer::AdminController < CamaleonCms::Apps::P
9
22
 
10
23
  # save values from settings form
11
24
  def save_settings
12
- params[:options] ||= {}
13
- params[:options]['skip_post_types'] ||= []
14
- params[:options]['skip_post_list_types'] ||= []
15
- params[:options]['skip_category_list_types'] ||= []
16
- params[:options]['skip_all_categories'] ||= false
17
- params[:options]['skip_tags'] ||= false
18
- params[:options]['skip_home'] ||= false
19
- @plugin.set_options(params[:options]) # save option values
25
+ options = DEFAULT_OPTIONS.merge(params[:options]&.to_unsafe_h.presence || {})
26
+ @plugin.set_options(options) # save option values
20
27
  @plugin.set_metas(params[:metas]) if params[:metas].present? # save meta values
21
28
  @plugin.set_field_values(params[:field_options]) if params[:field_options].present? # save custom field values
22
- redirect_to url_for(action: :settings), notice: 'Settings Saved Successfully'
29
+ redirect_to url_for(action: :settings), notice: "Settings Saved Successfully"
23
30
  end
24
31
  end
@@ -1,71 +1,101 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Plugins::CamaleonSitemapCustomizer::MainHelper
4
+ # methods accessible from views
2
5
  def self.included(klass)
3
- # klass.helper_method [:my_helper_method] rescue "" # here your methods accessible from views
6
+ klass.helper_method [:camaleon_sitemap_customizer_google_submit_url]
7
+ rescue
8
+ ""
4
9
  end
5
10
 
6
11
  def camaleon_sitemap_customizer_on_active(plugin)
7
- set_skip_posts plugin
12
+ skip_posts plugin
8
13
  end
9
14
 
10
15
  def camaleon_sitemap_customizer_on_inactive(plugin)
11
16
  end
12
17
 
13
18
  def camaleon_sitemap_customizer_on_upgrade(plugin)
14
- set_skip_posts plugin
19
+ skip_posts plugin
15
20
  end
16
21
 
17
22
  def camaleon_sitemap_customizer_on_plugin_options(args)
18
- args[:links] << [link_to('Settings', admin_plugins_camaleon_sitemap_customizer_settings_path), link_to('View Sitemap', '/sitemap', target: :blank)]
23
+ args[:links] << [
24
+ link_to("Settings", admin_plugins_camaleon_sitemap_customizer_settings_path),
25
+ link_to("View Sitemap", cama_sitemap_url, target: :blank),
26
+ link_to("Submit Sitemap to Google", camaleon_sitemap_customizer_google_submit_url, target: :blank)
27
+ ]
19
28
  end
20
29
 
21
- def customize_sitemap(r)
22
-
30
+ def customize_sitemap(args)
23
31
  # completely excluded content types
24
- r[:skip_posttype_ids] += current_plugin.get_option('skip_post_types').map(&:to_i) rescue nil
25
- r[:skip_posttype_ids].each do |ptype|
32
+ args[:skip_posttype_ids] += current_plugin.get_option("skip_post_types")&.map(&:to_i).presence || []
33
+ args[:skip_posttype_ids].each do |ptype|
26
34
  # leave out post pages within content type
27
- current_site.the_posts(ptype).each do |post|
28
- r[:skip_post_ids] += [post.id]
29
- end
35
+ args[:skip_post_ids] += current_site.the_posts(ptype).map(&:id)
30
36
  # leave out category pages within content type
31
- current_site.the_categories(ptype).each do |cat|
32
- r[:skip_cat_ids] += [cat.id]
33
- end
37
+ args[:skip_cat_ids] += current_site.the_categories(ptype).map(&:id)
34
38
  end
35
39
 
36
40
  # excluded list pages
37
- r[:skip_posttype_ids] += current_plugin.get_option('skip_post_list_types') .map(&:to_i) rescue []
38
- r[:skip_cat_ids] += select_categories
39
- r[:skip_tag_ids] += current_site.the_tags.map(&:id) if current_plugin.get_option('skip_tags')
40
- r[:skip_post_ids] += [@_site_options[:home_page].to_i] if current_plugin.get_option('skip_home')
41
- r[:skip_post_ids] += current_plugin.get_option('skip_posts').presence || []
41
+ args[:skip_posttype_ids] += current_plugin.get_option("skip_post_list_types")&.map(&:to_i).presence || []
42
+ args[:skip_cat_ids] += select_categories
43
+ args[:skip_tag_ids] += current_site.the_tags.map(&:id) if current_plugin.get_option("skip_tags")
44
+
45
+ # exclude individual posts via post editor option
46
+ args[:skip_post_ids] += current_plugin.get_option("skip_posts").presence || []
47
+
48
+ # exclude redundant home page url
49
+ args[:skip_post_ids] << current_site.options.dig(:home_page).to_i if current_plugin.get_option("skip_home") && current_site.options.dig(:home_page).present?
50
+
51
+ # use caching in sitemap
52
+ args[:render] = cached_sitemap_template if current_plugin.get_option("cache").present?
42
53
  end
43
54
 
44
55
  def camaleon_sitemap_customizer_form(args)
45
56
  args[:extra_settings] << "
46
57
  <div class='form-group'>
47
58
  <label for='options_hide_in_sitemap' class='control-label'>
48
- <input type='checkbox' name='options[hide_in_sitemap]' id='options_hide_in_sitemap' value='true' #{'checked' if args[:post].get_option('hide_in_sitemap').present?}>
49
- &nbsp;&nbsp;#{cama_t('hide_in_sitemap')}?
59
+ <input type='checkbox' name='options[hide_in_sitemap]' id='options_hide_in_sitemap' value='true' #{"checked" if args[:post].get_option("hide_in_sitemap").present?}>
60
+ &nbsp;&nbsp;#{cama_t("hide_in_sitemap")}?
50
61
  </label>
51
62
  </div>
52
63
  "
53
64
  end
54
65
 
66
+ def camaleon_sitemap_customizer_google_submit_url
67
+ "https://www.google.com/ping?sitemap=#{cama_sitemap_url}"
68
+ end
69
+
55
70
  def camaleon_sitemap_customizer_save(args)
56
- args[:post].set_option 'hide_in_sitemap', nil unless params.dig(:options, 'hide_in_sitemap').present?
57
- set_skip_posts current_plugin
71
+ args[:post].set_option "hide_in_sitemap", false unless params.dig(:options, "hide_in_sitemap").present?
72
+ skip_posts current_plugin
58
73
  end
59
74
 
60
- def set_skip_posts(plugin)
61
- plugin.set_option 'skip_posts', current_site.the_posts.eager_load(:metas).select { |post| post.get_option('hide_in_sitemap').present? } .map(&:id)
75
+ def camaleon_sitemap_customizer_submit_sitemap(_args)
76
+ plugin = current_site.get_plugin("camaleon_sitemap_customizer").decorate
77
+ return unless plugin.get_option "submit_changes_to_google"
78
+ CamaleonSitemapCustomizer::SubmitSitemapJob.perform_later camaleon_sitemap_customizer_google_submit_url
79
+ flash[:alert] = "Sitemap submitted."
80
+ rescue => e
81
+ flash[:alert] = e.message
82
+ end
83
+
84
+ private
85
+
86
+ def skip_posts(plugin)
87
+ plugin.set_option "skip_posts", current_site.the_posts.eager_load(:metas).select { |post| post.get_option("hide_in_sitemap").present? }.map(&:id)
62
88
  end
63
89
 
64
90
  def select_categories
65
- current_plugin.get_option('skip_all_categories').present? ?
66
- current_site.the_full_categories.pluck(:id) :
67
- current_plugin.get_option('skip_category_list_types').map(&:to_i)
68
- rescue
69
- []
91
+ if current_plugin.get_option("skip_all_categories").present?
92
+ current_site.the_full_categories.pluck(:id)
93
+ else
94
+ current_plugin.get_option("skip_category_list_types")&.map(&:to_i).presence || []
95
+ end
96
+ end
97
+
98
+ def cached_sitemap_template
99
+ "sitemap_with_caching"
70
100
  end
71
101
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CamaleonSitemapCustomizer::SubmitSitemapJob < ActiveJob::Base
4
+ queue_as :default
5
+
6
+ def perform(submit_url)
7
+ url = URI.parse submit_url
8
+ Net::HTTP.get url
9
+ end
10
+ end
@@ -0,0 +1,87 @@
1
+ # frozen_string_literal: true
2
+
3
+ xml.instruct! :xml, version: "1.0"
4
+ xml.urlset xmlns: "http://www.sitemaps.org/schemas/sitemap/0.9" do
5
+ current_site.get_languages.each_with_index do |lang, index|
6
+ lang = (index.zero? ? nil : lang)
7
+ xml.url do
8
+ xml.loc current_site.the_url(locale: lang)
9
+ xml.lastmod current_site.updated_at.to_date
10
+ xml.changefreq "daily"
11
+ xml.priority "1.0"
12
+ end
13
+
14
+ cache ["xml_sitemap/posts/#{current_site.the_posts.maximum :updated_at}", @r[:skip_post_ids]] do
15
+ current_site.the_posts.decorate.each do |post|
16
+ next if @r[:skip_post_ids].include? post.id
17
+
18
+ cache post do
19
+ xml.url do
20
+ xml.loc post.the_url(locale: lang)
21
+ xml.lastmod post.updated_at.to_date
22
+ xml.changefreq "monthly"
23
+ xml.priority "0.5"
24
+ end
25
+ end
26
+ end
27
+ end
28
+
29
+ cache ["xml_sitemap/categories/#{current_site.full_categories.maximum :updated_at}", @r[:skip_cat_ids]] do
30
+ current_site.full_categories.no_empty.decorate.each do |cat|
31
+ next if @r[:skip_cat_ids].include? cat.id
32
+
33
+ cache cat do
34
+ xml.url do
35
+ xml.loc cat.the_url(locale: lang)
36
+ xml.lastmod cat.updated_at.to_date
37
+ xml.changefreq "monthly"
38
+ xml.priority "0.5"
39
+ end
40
+ end
41
+ end
42
+ end
43
+
44
+ cache ["xml_sitemap/post_types/#{current_site.post_types.maximum :updated_at}", @r[:skip_posttype_ids]] do
45
+ current_site.post_types.decorate.each do |ptype|
46
+ next if @r[:skip_posttype_ids].include? ptype.id
47
+
48
+ cache ptype do
49
+ xml.url do
50
+ xml.loc ptype.the_url(locale: lang)
51
+ xml.lastmod ptype.updated_at.to_date
52
+ xml.changefreq "monthly"
53
+ xml.priority "0.5"
54
+ end
55
+ end
56
+ end
57
+ end
58
+
59
+ cache ["xml_sitemap/post_tags/#{current_site.post_types.maximum :updated_at}", @r[:skip_tag_ids]] do
60
+ current_site.post_tags.decorate.each do |tag|
61
+ next if @r[:skip_tag_ids].include? tag.id
62
+
63
+ cache tag do
64
+ xml.url do
65
+ xml.loc tag.the_url(locale: lang)
66
+ xml.lastmod tag.updated_at.to_date
67
+ xml.changefreq "monthly"
68
+ xml.priority "0.5"
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+
75
+ cache @r[:custom] do
76
+ @r[:custom].each do |_key, item|
77
+ cache item do
78
+ xml.url do
79
+ xml.loc item[:url]
80
+ xml.lastmod item[:lastmod] || Date.today.to_s
81
+ xml.changefreq item[:changefreq] || "monthly"
82
+ xml.priority item[:priority] || "0.5"
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
@@ -56,8 +56,18 @@
56
56
  <%= check_box_tag "options[skip_home]", 1, @plugin.get_option('skip_home'), style: 'display: block;' %>
57
57
  </div>
58
58
 
59
+ <div class="form-group">
60
+ <label><%= cama_t 'cache' %></label>
61
+ <%= check_box_tag "options[cache]", 1, @plugin.get_option('cache'), style: 'display: block;' %>
62
+ </div>
63
+
64
+ <div class="form-group">
65
+ <label><%= cama_t 'submit_changes_to_google' %></label>
66
+ <%= check_box_tag "options[submit_changes_to_google]", 1, @plugin.get_option('submit_changes_to_google'), style: 'display: block;' %>
67
+ </div>
59
68
 
60
69
  <div class="form-group text-right">
70
+ <%= link_to cama_t("submit_sitemap_to_google"), camaleon_sitemap_customizer_google_submit_url, target: :blank %>&nbsp;&nbsp;&nbsp;&nbsp;
61
71
  <%= link_to 'View Sitemap', '/sitemap', target: 'blank' %>&nbsp;&nbsp;&nbsp;&nbsp;
62
72
  <%= submit_tag 'Save Settings', class: 'btn btn-primary' %>
63
73
  </div>
@@ -6,12 +6,15 @@
6
6
  "Plugins::CamaleonSitemapCustomizer::MainHelper"
7
7
  ],
8
8
  "hooks": {
9
- "new_post":["camaleon_sitemap_customizer_form"],
10
- "edit_post":["camaleon_sitemap_customizer_form"],
11
- "updated_post": ["camaleon_sitemap_customizer_save"],
9
+ "created_post": ["camaleon_sitemap_customizer_submit_sitemap"],
10
+ "edit_post": ["camaleon_sitemap_customizer_form"],
11
+ "new_post": ["camaleon_sitemap_customizer_form"],
12
12
  "on_active": ["camaleon_sitemap_customizer_on_active"],
13
13
  "on_inactive": ["camaleon_sitemap_customizer_on_inactive"],
14
+ "on_render_sitemap": ["customize_sitemap"],
14
15
  "plugin_options": ["camaleon_sitemap_customizer_on_plugin_options"],
15
- "on_render_sitemap": ["customize_sitemap"]
16
+ "restored_post": ["camaleon_sitemap_customizer_submit_sitemap"],
17
+ "trashed_post": ["camaleon_sitemap_customizer_submit_sitemap"],
18
+ "updated_post": ["camaleon_sitemap_customizer_save", "camaleon_sitemap_customizer_submit_sitemap"]
16
19
  }
17
20
  }
@@ -8,3 +8,6 @@ en:
8
8
  categories_all: "Exclude ALL Categories (overrides above setting)"
9
9
  tags: "Exclude Tags"
10
10
  homepage: "Exclude duplicate home page url? (ex. – remove www.mysite.com/home if this renders the same post as www.mysite.com)"
11
+ cache: "Use caching to speed up sitemap rendering?"
12
+ submit_changes_to_google: "Submit sitemap to Google when changes are made? (requires ActiveJob)"
13
+ submit_sitemap_to_google: "Submit sitemap to Google"
data/config/routes.rb CHANGED
@@ -1,17 +1,21 @@
1
- Rails.application.routes.draw do
1
+ # frozen_string_literal: true
2
+
3
+ require "plugin_routes"
4
+ require "camaleon_cms/engine"
2
5
 
3
- scope PluginRoutes.system_info["relative_url_root"] do
4
- #Admin Panel
5
- scope :admin, as: 'admin', path: PluginRoutes.system_info['admin_path_name'] do
6
- namespace 'plugins' do
7
- namespace 'camaleon_sitemap_customizer' do
8
- controller :admin do
9
- get :index
10
- get :settings
11
- post :save_settings
12
- end
6
+ Rails.application.routes.draw do
7
+ scope PluginRoutes.system_info["relative_url_root"] do
8
+ # Admin Panel
9
+ scope :admin, as: "admin", path: PluginRoutes.system_info["admin_path_name"] do
10
+ namespace "plugins" do
11
+ namespace "camaleon_sitemap_customizer" do
12
+ controller :admin do
13
+ get :index
14
+ get :settings
15
+ post :save_settings
13
16
  end
14
17
  end
15
18
  end
16
19
  end
17
20
  end
21
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require "camaleon_sitemap_customizer/engine"
2
4
 
3
5
  module CamaleonSitemapCustomizer
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module CamaleonSitemapCustomizer
2
4
  class Engine < ::Rails::Engine
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module CamaleonSitemapCustomizer
2
- VERSION = '0.5.0'
4
+ VERSION = "1.1.1"
3
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camaleon_sitemap_customizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Kephart
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-04 00:00:00.000000000 Z
11
+ date: 2021-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: camaleon_cms
@@ -24,6 +24,34 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.4'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.4'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 6.1.0
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 6.1.0
27
55
  description: Customize auto-generated sitemap in Camaleon CMS. Eliminate duplicate
28
56
  content and list pages.
29
57
  email:
@@ -37,6 +65,8 @@ files:
37
65
  - Rakefile
38
66
  - app/controllers/plugins/camaleon_sitemap_customizer/admin_controller.rb
39
67
  - app/helpers/plugins/camaleon_sitemap_customizer/main_helper.rb
68
+ - app/jobs/camaleon_sitemap_customizer/submit_sitemap_job.rb
69
+ - app/views/camaleon_cms/default_theme/sitemap_with_caching.xml.builder
40
70
  - app/views/plugins/camaleon_sitemap_customizer/admin/settings.html.erb
41
71
  - config/camaleon_plugin.json
42
72
  - config/locales/en.yml
@@ -47,8 +77,11 @@ files:
47
77
  homepage: https://www.github.com/brian-kephart/camaleon_sitemap_customizer
48
78
  licenses:
49
79
  - MIT
50
- metadata: {}
51
- post_install_message:
80
+ metadata:
81
+ homepage_uri: https://www.github.com/brian-kephart/camaleon_sitemap_customizer
82
+ changelog_uri: https://www.github.com/brian-kephart/camaleon_sitemap_customizer/blob/master/CHANGELOG.md
83
+ source_code_uri: https://www.github.com/brian-kephart/camaleon_sitemap_customizer
84
+ post_install_message:
52
85
  rdoc_options: []
53
86
  require_paths:
54
87
  - lib
@@ -56,16 +89,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
56
89
  requirements:
57
90
  - - ">="
58
91
  - !ruby/object:Gem::Version
59
- version: '0'
92
+ version: '2.5'
60
93
  required_rubygems_version: !ruby/object:Gem::Requirement
61
94
  requirements:
62
95
  - - ">="
63
96
  - !ruby/object:Gem::Version
64
97
  version: '0'
65
98
  requirements: []
66
- rubyforge_project:
67
- rubygems_version: 2.7.5
68
- signing_key:
99
+ rubygems_version: 3.1.4
100
+ signing_key:
69
101
  specification_version: 4
70
102
  summary: Customize auto-generated sitemap in Camaleon CMS
71
103
  test_files: []