ssh_guard 0.0.3 → 0.0.4

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 (4) hide show
  1. data/VERSION +1 -1
  2. data/bin/ssh_guard +26 -1
  3. data/ssh_guard.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -2,5 +2,30 @@
2
2
 
3
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
4
4
  require "ssh_guard"
5
+ if ARGV.include?('-i')
6
+ File.open("/Library/LaunchDaemons/be.hcode.SshGuard.plist", 'w') do |f|
7
+ f.write <<-PLIST.gsub(/^\s+/,"")
8
+ <?xml version="1.0" encoding="UTF-8"?>
9
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
10
+ <plist version="1.0">
11
+ <dict>
12
+ <key>KeepAlive</key>
13
+ <true/>
14
+ <key>Label</key>
15
+ <string>be.hcode.SshGuard</string>
16
+ <key>ProgramArguments</key>
17
+ <array>
18
+ <string>ssh_guard</string>
19
+ </array>
20
+ <key>RunAtLoad</key>
21
+ <true/>
22
+ </dict>
23
+ </plist>
24
+
25
+ PLIST
26
+ end
27
+ `launchctl load /Library/LaunchDaemons/be.hcode.SshGuard.plist`
28
+ else
29
+ SshGuard::Core.new.start
30
+ end
5
31
 
6
- SshGuard::Core.new.start
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ssh_guard}
8
- s.version = "0.0.3"
8
+ s.version = "0.0.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jelle Helsen"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssh_guard
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jelle Helsen