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: 46fec440350448dd22519a7740c457ab8da3d36e5baa02507a947cf4ee2d3c53
4
- data.tar.gz: d10aef18ee049858221c75570cd0b656f34a14b80bda87cecfd380cafc9f49dd
3
+ metadata.gz: 29bd23e10568ddc7089481dcd364de4a24521ab19dbab5b6c3e32be9d76abc3f
4
+ data.tar.gz: fa96fb54b6ec5e07b8ca025fd20d04addafb1f94eeb0a950f44ee35f4821527d
5
5
  SHA512:
6
- metadata.gz: 32f839f9bc654915fef22d051fbfce5404b4efedd0e6298d490a6a909876b855f64c7294f70867abecca8b211accf2eb8a24b24eaeab3bf136b53cc6870232f8
7
- data.tar.gz: ccd77df77bbb88de39aad14c83bcaec5f274220c7d745b4859118a305c259196a5fb54ede22ddd26593ea79420547477e3830e5627479d558d7aca1730e1d9f5
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
@@ -9,7 +9,7 @@ module Rails
9
9
  isolate_namespace Rails::Index::Now
10
10
 
11
11
  generators do
12
- require_relative "generators/install_generator"
12
+ require "generators/index_now/install_generator"
13
13
  end
14
14
 
15
15
  initializer "rails_index_now.add_routes" do |app|
@@ -3,7 +3,7 @@
3
3
  module Rails
4
4
  module Index
5
5
  module Now
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.2"
7
7
  end
8
8
  end
9
9
  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.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-26 00:00:00.000000000 Z
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