alerty 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +1 -0
- data/alerty.gemspec +2 -1
- data/lib/alerty/cli.rb +3 -0
- data/lib/alerty/config.rb +8 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e8514222f9d30f9529bb65aefef3b44281a34fc
|
4
|
+
data.tar.gz: 1df34b31d04c6aec0984043abde447c44880a8ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5f2f853bea3d7ee5f27db0aab9e3d5af087a7d8022210db406d664b7889bee558bbaa10061341a54a05ede6add4688fe8bdfd8514e6acb9ad66670adce349fd
|
7
|
+
data.tar.gz: fadb6a86ea8f2a7b79bee38cc9f068aa7d26d28fe5d1fc4950cc824e44ab78e3e904172da2d0c5f0438d55da863303d07c7fdafec50df3e2d86282d802f2f2cd
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -55,6 +55,7 @@ Usage: alerty [options] -- command
|
|
55
55
|
--retry-limit NUMBER number of retries (default: 0)
|
56
56
|
--retry-wait SECONDS retry interval = retry wait +/- 12.5% randomness (default: 1.0)
|
57
57
|
-d, --debug debug mode
|
58
|
+
--dotenv Load environment variables from .env file with dotenv
|
58
59
|
```
|
59
60
|
|
60
61
|
## Plugins
|
data/alerty.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "alerty"
|
3
|
-
gem.version = '0.2.
|
3
|
+
gem.version = '0.2.1'
|
4
4
|
gem.author = ['Naotoshi Seo']
|
5
5
|
gem.email = ['sonots@gmail.com']
|
6
6
|
gem.homepage = 'https://github.com/sonots/alerty'
|
@@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.add_runtime_dependency 'hashie'
|
17
17
|
gem.add_runtime_dependency 'oneline_log_formatter'
|
18
18
|
gem.add_runtime_dependency 'frontkick', '>= 0.4.0'
|
19
|
+
gem.add_runtime_dependency 'dotenv'
|
19
20
|
|
20
21
|
gem.add_development_dependency 'rspec'
|
21
22
|
gem.add_development_dependency 'pry'
|
data/lib/alerty/cli.rb
CHANGED
data/lib/alerty/config.rb
CHANGED
@@ -18,6 +18,10 @@ class Alerty
|
|
18
18
|
def config
|
19
19
|
@config ||=
|
20
20
|
begin
|
21
|
+
if dotenv?
|
22
|
+
require 'dotenv'
|
23
|
+
Dotenv.load
|
24
|
+
end
|
21
25
|
content = File.read(config_path)
|
22
26
|
erb = ERB.new(content, nil, '-')
|
23
27
|
erb_content = erb.result
|
@@ -62,6 +66,10 @@ class Alerty
|
|
62
66
|
!!opts[:debug]
|
63
67
|
end
|
64
68
|
|
69
|
+
def dotenv?
|
70
|
+
!!opts[:dotenv]
|
71
|
+
end
|
72
|
+
|
65
73
|
def retry_interval
|
66
74
|
@random ||= Random.new
|
67
75
|
randomness = retry_wait * 0.125
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alerty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Naotoshi Seo
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 0.4.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dotenv
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rspec
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|