indexmap 0.8.1 → 0.8.2

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
  SHA256:
3
- metadata.gz: 2f78184d7ab33df85d653a915d6b9e42f7c5409fe0e01bb81991b358616cf4f5
4
- data.tar.gz: 739a22b6445ca41a090d296c7c30ea3e96fd08c120fce59dbca41ca76c5c57b5
3
+ metadata.gz: d3d31112daf5ee0b501338d564a4e7e9ef30487c88e65439a67543faac070d64
4
+ data.tar.gz: 550713d5205e26bc9c42a4a37660d0c72e493898b47f7bf5dbb4ef92e2488e6b
5
5
  SHA512:
6
- metadata.gz: a78824d383358e1bbc36ebccc37e5cda6d2311a1d37cfd5941f09c7f3a39d30a8023b94dfffdb812b37dd95e754ef908e6a73a3368a861bb761c960b192e19ef
7
- data.tar.gz: 89b5cca3351e953d92a7d0b712b56a7856c47564168e759dcd6dbb5e672e7d714ef62e864f1172bc4b4cbedb129801da9bae68fd1542d8d773f77a13314cfc63
6
+ metadata.gz: 10da855e190aab04ccd1e3dcc4fe5e49125bd431eb9831c9ea0e983169f11c08d0ce1beb093bd16d8576d637b850fa3d8da74c013b65cd5982bab0452097d272
7
+ data.tar.gz: 6e4c5cdd0a014d1e897ba94d79f22f1acb69f0eb6ff1ff4f23ef756fb1884b1ef27df96f5181b665bdefd9e80f4925b7fe985a1ddc51bdd91e1f9d9e47af98af
data/CHANGELOG.md CHANGED
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.2] - 2026-07-22
9
+
10
+
11
+ ### Fixed
12
+
13
+ - use authoritative sitemap entrypoint ([#18](https://github.com/ethos-link/indexmap/pull/18))
14
+
15
+
16
+
8
17
  ## [0.8.1] - 2026-07-21
9
18
 
10
19
 
@@ -20,6 +20,7 @@ module IndexmapConfiguration
20
20
  )
21
21
  }
22
22
 
23
+ # Search-engine pings start from config.index_filename (default: "sitemap.xml").
23
24
  # Configure the sitemap data owned by your application:
24
25
  # config.sections = -> { Sitemap.sections }
25
26
  end
@@ -51,7 +51,10 @@ module Indexmap
51
51
  end
52
52
 
53
53
  def sitemap_files
54
- storage.list(prefix: "sitemap", suffix: ".xml")
54
+ index_filename = configuration.index_filename.to_s
55
+ return [] if index_filename.empty? || !storage.exist?(index_filename)
56
+
57
+ [index_filename]
55
58
  end
56
59
 
57
60
  def ping_sitemap(_sitemap_file)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Indexmap
4
- VERSION = "0.8.1"
4
+ VERSION = "0.8.2"
5
5
  end
@@ -21,6 +21,7 @@ class IndexmapInstallGeneratorTest < Minitest::Test
21
21
  assert File.exist?(initializer)
22
22
  assert_includes File.read(initializer), "module IndexmapConfiguration"
23
23
  assert_includes File.read(initializer), "IndexmapConfiguration.apply if defined?(Indexmap)"
24
+ assert_includes File.read(initializer), "Search-engine pings start from config.index_filename"
24
25
  assert_includes rakefile, 'require "indexmap/tasks"'
25
26
  assert_operator rakefile.index('require "indexmap/tasks"'), :<, rakefile.index('require_relative "config/application"')
26
27
 
@@ -43,6 +44,7 @@ class IndexmapInstallGeneratorTest < Minitest::Test
43
44
  IndexmapConfiguration.apply
44
45
  abort "configuration replaced" unless Indexmap.configuration.equal?(configuration)
45
46
  abort "base URL missing" unless configuration.base_url == "http://localhost:3000"
47
+ abort "index filename missing" unless configuration.index_filename == "sitemap.xml"
46
48
  RUBY
47
49
  _stdout, stderr, status = Open3.capture3(
48
50
  RbConfig.ruby,
@@ -69,13 +69,19 @@ class IndexmapPingerGoogleTest < Minitest::Test
69
69
  <url><loc>https://www.example.com/about</loc></url>
70
70
  </urlset>
71
71
  XML
72
- "sitemap-posts.xml" => <<~XML
72
+ "sitemap-posts.xml" => <<~XML,
73
73
  <?xml version="1.0" encoding="UTF-8"?>
74
74
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
75
75
  <url><loc>https://www.example.com/about</loc></url>
76
76
  <url><loc>https://www.example.com/blog</loc></url>
77
77
  </urlset>
78
78
  XML
79
+ "sitemap-stale.xml" => <<~XML
80
+ <?xml version="1.0" encoding="UTF-8"?>
81
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
82
+ <url><loc>https://www.example.com/retired</loc></url>
83
+ </urlset>
84
+ XML
79
85
  )
80
86
  configuration = configuration_with(storage: storage)
81
87
  configuration.google.credentials = "{\"type\":\"service_account\"}"
@@ -88,11 +94,9 @@ class IndexmapPingerGoogleTest < Minitest::Test
88
94
  ).ping
89
95
 
90
96
  assert_equal :submitted, result[:status]
91
- assert_equal 3, result[:sitemap_count]
97
+ assert_equal 1, result[:sitemap_count]
92
98
  assert_equal 3, result[:url_count]
93
99
  assert_equal [
94
- ["sc-domain:example.com", "https://www.example.com/sitemap-pages.xml"],
95
- ["sc-domain:example.com", "https://www.example.com/sitemap-posts.xml"],
96
100
  ["sc-domain:example.com", "https://www.example.com/sitemap.xml"]
97
101
  ], service.submissions
98
102
  end
@@ -71,7 +71,14 @@ class IndexmapPingerIndexNowTest < Minitest::Test
71
71
  end
72
72
 
73
73
  def test_pings_all_sitemap_urls_when_no_cutoff_is_provided
74
- configuration = configuration_with(storage: sitemap_storage)
74
+ storage = sitemap_storage
75
+ storage.write("sitemap-stale.xml", <<~XML)
76
+ <?xml version="1.0" encoding="UTF-8"?>
77
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
78
+ <url><loc>https://www.example.com/retired</loc></url>
79
+ </urlset>
80
+ XML
81
+ configuration = configuration_with(storage: storage)
75
82
  configuration.index_now.key = VALID_KEY
76
83
 
77
84
  indexnow_url = "https://api.indexnow.org/indexnow"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indexmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Fidalgo