rails-index-now 0.1.1 → 0.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29bd23e10568ddc7089481dcd364de4a24521ab19dbab5b6c3e32be9d76abc3f
|
4
|
+
data.tar.gz: fa96fb54b6ec5e07b8ca025fd20d04addafb1f94eeb0a950f44ee35f4821527d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0acabbc857d732648c638c570039330e4d170a78302c2d6e8be00ff1a22c6379e9a38163ebd0d5d7e1609c17946b1cf395f527ea86f385433bf089f45453fde
|
7
|
+
data.tar.gz: 18945e05c71b28de394f334a87e3a378010a6fdc8654c69912039a708e378b642fd22235a0f4ebe32482ee9c4fd5e62699f75b9814d9532512618e08902936e4
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "rails/generators/base"
|
4
|
+
|
5
|
+
module IndexNow
|
6
|
+
module Generators
|
7
|
+
class InstallGenerator < ::Rails::Generators::Base
|
8
|
+
source_root File.expand_path("templates", __dir__)
|
9
|
+
|
10
|
+
desc "Creates an IndexNow initializer file"
|
11
|
+
|
12
|
+
def create_initializer_file
|
13
|
+
template "index_now.rb", "config/initializers/index_now.rb"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# IndexNow Configuration
|
4
|
+
# See https://github.com/your-username/rails-index-now for full documentation
|
5
|
+
|
6
|
+
Rails::Index::Now.configure do |config|
|
7
|
+
# Required: Your IndexNow API key
|
8
|
+
# You can get one from https://www.bing.com/indexnow/getstarted
|
9
|
+
config.api_key = ENV.fetch("INDEXNOW_API_KEY", nil)
|
10
|
+
|
11
|
+
# Required: Key file name for IndexNow verification
|
12
|
+
# This should be "YOUR_API_KEY.txt" (replace YOUR_API_KEY with your actual key)
|
13
|
+
# The gem will automatically serve this file at /YOUR_API_KEY.txt
|
14
|
+
config.key_file_name = "#{ENV.fetch("INDEXNOW_API_KEY", "your-api-key")}.txt"
|
15
|
+
|
16
|
+
# Optional: Set a specific host for all submissions
|
17
|
+
# If not set, the gem will extract the host from the submitted URLs
|
18
|
+
# config.host = "example.com"
|
19
|
+
|
20
|
+
# Optional: Disable IndexNow in specific environments
|
21
|
+
# Recommended for test and development environments
|
22
|
+
config.disabled = Rails.env.test? || Rails.env.development?
|
23
|
+
|
24
|
+
# Optional: Set a custom logger
|
25
|
+
# Defaults to Rails.logger if available, otherwise STDOUT
|
26
|
+
# config.logger = Rails.logger
|
27
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-index-now
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleks Ulanov
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-07-
|
10
|
+
date: 2025-07-27 00:00:00.000000000 Z
|
11
11
|
dependencies: []
|
12
12
|
description: Instantly notify search engines like Bing and DuckDuckGo of content changes
|
13
13
|
in your Rails app. This gem provides a simple client and Active Job integration
|
@@ -28,6 +28,8 @@ files:
|
|
28
28
|
- Rakefile
|
29
29
|
- app/controllers/rails/index/now/verification_controller.rb
|
30
30
|
- config/routes.rb
|
31
|
+
- lib/generators/index_now/install_generator.rb
|
32
|
+
- lib/generators/index_now/templates/index_now.rb
|
31
33
|
- lib/rails/index/now.rb
|
32
34
|
- lib/rails/index/now/client.rb
|
33
35
|
- lib/rails/index/now/configuration.rb
|