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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/generators/indexmap/templates/initializer.rb.tt +1 -0
- data/lib/indexmap/pinger/base.rb +4 -1
- data/lib/indexmap/version.rb +1 -1
- data/test/indexmap/install_generator_test.rb +2 -0
- data/test/indexmap/pinger/google_test.rb +8 -4
- data/test/indexmap/pinger/index_now_test.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3d31112daf5ee0b501338d564a4e7e9ef30487c88e65439a67543faac070d64
|
|
4
|
+
data.tar.gz: 550713d5205e26bc9c42a4a37660d0c72e493898b47f7bf5dbb4ef92e2488e6b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
|
data/lib/indexmap/pinger/base.rb
CHANGED
|
@@ -51,7 +51,10 @@ module Indexmap
|
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def sitemap_files
|
|
54
|
-
|
|
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)
|
data/lib/indexmap/version.rb
CHANGED
|
@@ -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
|
|
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
|
-
|
|
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"
|