mongo-keepalive 1.0.0 โ†’ 1.0.1

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +84 -0
  3. metadata +9 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28d074e5002228d1b11a3ed4bd8f337693ce0fcb29d35e0fd0348843bffaa5a4
4
- data.tar.gz: e95137f53edb576bb1b4bcc953a75c0863f6e46669912ba962a06d5cab3bbc81
3
+ metadata.gz: d21d8dbc31a2a97bf96f558aaf4e40e33d0f9886c10c67f47ab3ec92d9221d9a
4
+ data.tar.gz: df2d6d9fcea5f35806cdeabf0f225988002d69c3e21b2cd558b2c772dadd8f3f
5
5
  SHA512:
6
- metadata.gz: c05c2f202e951c5902df82e4ccc5ee3bba2aacc2dfd024dfedbfe26545e888251162aa6e3acee20cee4e678fa2d98a79983529c8aa1047e209abb2e6ea6c8b09
7
- data.tar.gz: ec86a1e185684e704dae11142d57384d59ddcf7c3586b649a55a23e2279490c515a7f4f65498118880f56eefd1f90c67c8c75f17b219baf9bf31bab7005de0da
6
+ metadata.gz: be43f97eecf07aa8e3a56f071503d327dbd601fbbfc460c31b7d3a1c07983d38509bf25919965456cdb4c943bd28bca2f3ee274b364b0eecc7883277bd51cb18
7
+ data.tar.gz: d48502927db739c2627fc304807faf54f3a40e9094bdbcf0454a87c6d78a456d42d6d09ecd4ff0a3171445f7792faeac62f8e07bb1f6d7dd4ac04b538c94f468
data/README.md ADDED
@@ -0,0 +1,84 @@
1
+ # mongo-keepalive (Ruby)
2
+
3
+ [![Gem Version](https://img.shields.io/gem/v/mongo-keepalive?style=flat-square&logo=rubygems&label=gem)](https://rubygems.org/gems/mongo-keepalive)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](../LICENSE)
5
+
6
+ Prevent MongoDB Atlas free-tier clusters from becoming inactive by periodically sending a `ping` command.
7
+
8
+ MongoDB Atlas pauses free-tier (M0) clusters after **60 days of inactivity**. This library keeps your cluster alive by running `db.adminCommand({ ping: 1 })` on a configurable interval (default: every 12 hours).
9
+
10
+ ## Installation
11
+
12
+ Add this line to your application's Gemfile:
13
+
14
+ ```ruby
15
+ gem 'mongo-keepalive'
16
+ ```
17
+
18
+ And then execute:
19
+
20
+ ```bash
21
+ bundle install
22
+ ```
23
+
24
+ Or install it yourself as:
25
+
26
+ ```bash
27
+ gem install mongo-keepalive
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```ruby
33
+ require 'mongo_keepalive'
34
+
35
+ # Start keep-alive with default 12-hour interval
36
+ handle = MongoKeepAlive.start_keep_alive(
37
+ uri: 'mongodb+srv://user:pass@cluster.mongodb.net/db'
38
+ )
39
+
40
+ # Or specify custom interval
41
+ handle = MongoKeepAlive.start_keep_alive(
42
+ uri: 'mongodb+srv://user:pass@cluster.mongodb.net/db',
43
+ interval: '6h'
44
+ )
45
+
46
+ # Graceful shutdown
47
+ handle.stop
48
+ ```
49
+
50
+ ## Features
51
+
52
+ - ๐ŸŽฏ **Simple API** - One method call to start
53
+ - ๐Ÿ”„ **Automatic retry** - 3 attempts with 5-second delays
54
+ - ๐Ÿ“ **Logging** - Built-in logger with timestamps
55
+ - ๐Ÿงต **Background thread** - Non-blocking execution
56
+ - โ™ป๏ธ **Graceful shutdown** - Clean stop mechanism
57
+
58
+ ## Configuration
59
+
60
+ | Parameter | Type | Default | Description |
61
+ |-----------|------|---------|-------------|
62
+ | `uri` | String | - | MongoDB connection string (required) |
63
+ | `interval` | String | `"12h"` | Ping interval (e.g. `"6h"`, `"30m"`) |
64
+
65
+ ### Interval Format
66
+
67
+ - `"30m"` โ†’ 30 minutes
68
+ - `"6h"` โ†’ 6 hours
69
+ - `"12h"` โ†’ 12 hours (default)
70
+
71
+ ## Requirements
72
+
73
+ - Ruby 3.0 or later
74
+ - mongo gem ~> 2.20
75
+
76
+ ## Links
77
+
78
+ - ๐Ÿ“ฆ [GitHub Repository](https://github.com/YadavSourabhGH/mongo-keepalive)
79
+ - ๐Ÿ“š [Full Documentation](https://github.com/YadavSourabhGH/mongo-keepalive#readme)
80
+ - ๐Ÿ› [Report Issues](https://github.com/YadavSourabhGH/mongo-keepalive/issues)
81
+
82
+ ## License
83
+
84
+ This project is licensed under the [MIT License](../LICENSE).
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongo-keepalive
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
- - mongo-keepalive contributors
7
+ - YadavSourabhGH
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
@@ -26,16 +26,21 @@ dependencies:
26
26
  version: '2.20'
27
27
  description: Periodically sends a ping command to prevent MongoDB Atlas free-tier
28
28
  clusters from becoming inactive.
29
- email:
29
+ email: []
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - README.md
34
35
  - lib/keepalive.rb
35
36
  homepage: https://github.com/YadavSourabhGH/mongo-keepalive
36
37
  licenses:
37
38
  - MIT
38
- metadata: {}
39
+ metadata:
40
+ bug_tracker_uri: https://github.com/YadavSourabhGH/mongo-keepalive/issues
41
+ changelog_uri: https://github.com/YadavSourabhGH/mongo-keepalive/releases
42
+ source_code_uri: https://github.com/YadavSourabhGH/mongo-keepalive
43
+ homepage_uri: https://github.com/YadavSourabhGH/mongo-keepalive
39
44
  post_install_message:
40
45
  rdoc_options: []
41
46
  require_paths: