notifyor 0.5.2 → 0.5.3
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 +4 -4
- data/lib/notifyor/cli.rb +12 -6
- data/lib/notifyor/configuration.rb +0 -9
- data/lib/notifyor/remote/connection.rb +5 -7
- data/lib/notifyor/version.rb +1 -1
- metadata +1 -2
- data/lib/notifyor/errors/ssh_error.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9e242dcbf0034ef3dad8c6d042b89f61409db2c
|
4
|
+
data.tar.gz: 2dca225b3198b28e373648783a01078edf553dad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a3c1f3c12b0437d34013a38ab4e81d90b41560464b3a6ffd527871d06d1de06865673d572e04030fb13ec09d87b1c0b938a1b857a8d35619b6ab82a8750ddba
|
7
|
+
data.tar.gz: 2473a4b4fcfd4160fc986422d1a994b3862f2fdb4dedab5f40cef669f63fcb11ad1ac0d6839fcf804d93f204c24a75ee7cf9bf25c7eacce642f489893fc74d8c
|
data/lib/notifyor/cli.rb
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
require 'notifyor'
|
1
|
+
require 'notifyor/version'
|
2
2
|
require 'active_support/dependencies'
|
3
3
|
|
4
4
|
module Notifyor
|
5
5
|
class CLI
|
6
6
|
|
7
7
|
def parse
|
8
|
+
# Default configuration.
|
9
|
+
ENV['ssh_host'] = 'localhost'
|
10
|
+
ENV['ssh_port'] = '22'
|
11
|
+
ENV['ssh_tunnel_port'] = '2000'
|
12
|
+
ENV['ssh_redis_port'] = '6379'
|
13
|
+
|
8
14
|
OptionParser.new do |opts|
|
9
15
|
opts.banner = 'Usage: notify_me [options]'
|
10
16
|
|
@@ -14,23 +20,23 @@ module Notifyor
|
|
14
20
|
end
|
15
21
|
|
16
22
|
opts.on('--ssh-host host', 'Provide the host address to your deployment/remote server') do |host|
|
17
|
-
|
23
|
+
ENV['ssh_host'] = host
|
18
24
|
end
|
19
25
|
|
20
26
|
opts.on('--ssh-port port', 'Provide the ssh port for the deployment/remote server') do |port|
|
21
|
-
|
27
|
+
ENV['ssh_port'] = port
|
22
28
|
end
|
23
29
|
|
24
30
|
opts.on('--ssh-user user', 'Provide the ssh user for the deployment/remote server') do |user|
|
25
|
-
|
31
|
+
ENV['ssh_user'] = user
|
26
32
|
end
|
27
33
|
|
28
34
|
opts.on('--tunnel-port tunnel_port', 'Provide the ssh user for the deployment/remote server') do |tunnel_port|
|
29
|
-
|
35
|
+
ENV['ssh_tunnel_port'] = tunnel_port
|
30
36
|
end
|
31
37
|
|
32
38
|
opts.on('--redis-port redis_port', 'Provide the ssh user for the deployment/remote server') do |redis_port|
|
33
|
-
|
39
|
+
ENV['ssh_redis_port'] = redis_port
|
34
40
|
end
|
35
41
|
end.parse!
|
36
42
|
end
|
@@ -3,18 +3,9 @@ require 'connection_pool'
|
|
3
3
|
module Notifyor
|
4
4
|
class Configuration
|
5
5
|
attr_accessor :redis_connection
|
6
|
-
attr_accessor :ssh_host
|
7
|
-
attr_accessor :ssh_user
|
8
|
-
attr_accessor :ssh_port
|
9
|
-
attr_accessor :tunnel_port
|
10
|
-
attr_accessor :redis_port
|
11
6
|
|
12
7
|
def initialize
|
13
8
|
@redis_connection = ::Redis.new
|
14
|
-
@ssh_port = '22'
|
15
|
-
@ssh_host = 'localhost'
|
16
|
-
@tunnel_port ='2000'
|
17
|
-
@redis_port = '6379'
|
18
9
|
end
|
19
10
|
end
|
20
11
|
end
|
@@ -1,19 +1,17 @@
|
|
1
1
|
require 'redis-objects'
|
2
|
-
require 'notifyor'
|
3
2
|
require 'notifyor/growl'
|
4
3
|
require 'notifyor/util/formatter'
|
5
|
-
require 'notifyor/errors/ssh_error'
|
6
4
|
require 'net/ssh/gateway'
|
7
5
|
module Notifyor
|
8
6
|
module Remote
|
9
7
|
class Connection
|
10
8
|
|
11
9
|
def initialize
|
12
|
-
@ssh_host =
|
13
|
-
@ssh_port =
|
14
|
-
@ssh_user =
|
15
|
-
@tunnel_port =
|
16
|
-
@redis_port =
|
10
|
+
@ssh_host = ENV['ssh_host']
|
11
|
+
@ssh_port = ENV['ssh_port']
|
12
|
+
@ssh_user = ENV['ssh_user']
|
13
|
+
@tunnel_port = ENV['ssh_tunnel_port']
|
14
|
+
@redis_port = ENV['ssh_redis_port']
|
17
15
|
@ssh_gateway = nil
|
18
16
|
@redis_tunnel_connection = nil
|
19
17
|
end
|
data/lib/notifyor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: notifyor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erwin Schens
|
@@ -123,7 +123,6 @@ files:
|
|
123
123
|
- lib/notifyor.rb
|
124
124
|
- lib/notifyor/cli.rb
|
125
125
|
- lib/notifyor/configuration.rb
|
126
|
-
- lib/notifyor/errors/ssh_error.rb
|
127
126
|
- lib/notifyor/growl.rb
|
128
127
|
- lib/notifyor/growl/adapters/terminal_notifier.rb
|
129
128
|
- lib/notifyor/plugin.rb
|