11# ActiveRecord::OverflowSignalizer
22
3- One day primary key field will overflow, but if you use this gem, you will know about it before it happened .
3+ One day primary key field will overflow, but if you use this gem, you will know about it before it happens .
44
55## Installation
66
@@ -20,17 +20,17 @@ Or install it yourself as:
2020
2121## Usage
2222
23- Just placed it somewhere in your app:
23+ Just place it somewhere in your app:
2424``` ruby
2525ActiveRecord ::OverflowSignalizer .new .analyse!
2626```
2727
28- By default it check all models in your application and log if some primary key will overflow soon or overflowed.
28+ By default it checks all models in your application and logs if some primary key will overflow soon or overflowed.
2929
30- You can placed it in some job and perform it by [ clockwork] ( https://github.com/adamwiggins/clockwork )
31- or just run it when app started in separated thread.
30+ You can place it in some job and perform it by [ clockwork] ( https://github.com/adamwiggins/clockwork )
31+ or just run it when app starts in a separate thread.
3232
33- Also you can pass some parameters in initializer:
33+ Also you can pass some parameters to the initializer:
3434
3535+ Specify logger
3636``` ruby
@@ -42,15 +42,15 @@ By default ActiveRecord::Base.logger
4242``` ruby
4343ActiveRecord ::OverflowSignalizer .new (models: [ModelName ])
4444```
45- By default it retrieve all descendants of ActiveRecord::Base
45+ By default it retrieves all descendants of ActiveRecord::Base
4646
47- + Specify count of days. Gem start notify you if some primary key will overflow over the next numbers of days.
47+ + Specify count of days. Gem starts to notify you if some primary key will overflow over the next number of days.
4848``` ruby
4949ActiveRecord ::OverflowSignalizer .new (days_count: 360 )
5050```
515160 days by default
5252
53- + You can use own signalizer for sending notification to e-mail, slack, hipchat, etc.
53+ + You can use your own signalizer for notification sending to e-mail, slack, hipchat, etc.
5454``` ruby
5555class MyAwesomeSignalizer
5656 def initialize (some_params )
6464
6565ActiveRecord ::OverflowSignalizer .new (signalizer: MyAwesomeSignalizer .new (some_params))
6666```
67- By default it use only logging
67+ By default it uses only logging
6868
6969## Development
7070
71- For tests you need postgresql connection specified in ` spec/database.yml ` .
71+ For tests you need a postgresql connection specified in ` spec/database.yml ` .
7272
7373## Contributing
7474
0 commit comments