argosnap 0.0.4 → 0.0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +43 -37
- data/argosnap.gemspec +2 -2
- data/bin/argosnap +2 -9
- data/lib/argosnap/install.rb +1 -1
- data/lib/argosnap/version.rb +1 -1
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 696e301ac27f9dd17331161df5c31f302b8163cf
|
4
|
+
data.tar.gz: f576bb88e66428e2babf57b751ca27c421205170
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a680ac6a16e91ad24491683d552abdc8a06d567327581feba679e52dc395c32bfaff54e065cd8a8781483486f3e2ac93f5a22760abaed9f16b542678bb14d2c6
|
7
|
+
data.tar.gz: fec5b2bf62572f0c6b67822b0788682378d0e4eac6f4704d6cc21927d892cf7cc09a539caa3accba562856c904a8f805fbaadc8d28dd104e79425a5ea40678e0
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,53 +1,59 @@
|
|
1
1
|
# Argosnap
|
2
|
-
|
3
|
-
This gem allows you to displays your current amount of picodollars along with [OSX notifications](http://support.apple.com/kb/ht5362) when your [tarsnap account](http://www.tarsnap.com/) falls bellow a predefined threshold of [picodollars](http://www.tarsnap.com/picoUSD-why.html).
|
2
|
+
Argosnap is a ruby script that displays your current [tarsnap](http://www.tarsnap.com/) ballance in [picoUSD](http://www.tarsnap.com/picoUSD-why.html). The script can send notifications when the account balance falls below the predefined threshold. Argosnap supports email, [pushover](https://pushover.net/) and [OSX notifications](https://support.apple.com/en-us/HT204079).
|
4
3
|
|
5
4
|
# Installation
|
6
5
|
|
7
|
-
|
6
|
+
## Linux, *BSD and MacOSX
|
7
|
+
In order to run `argosnap` you need only the [mechanize](https://github.com/sparklemotion/mechanize) gem. If you want to use receive [HTML](https://en.wikipedia.org/wiki/HTML) email notifications you are going to need the `haml` as well and `mail` gem. In case you want TXT email, you are going to need only the `mail` gem.
|
8
|
+
|
9
|
+
Install the gems via rubygems:
|
10
|
+
|
11
|
+
$ gem install mail mechanize haml argosnap
|
8
12
|
|
9
|
-
|
13
|
+
## MacOSX Launchd
|
14
|
+
If you want to use OSX notifications, you need to instal `plist` and `terminal-notifier` too. To install the gems type:
|
15
|
+
|
16
|
+
$ gem install mail mechanize haml plist terminal-notifier argosnap
|
17
|
+
|
18
|
+
# Settings
|
10
19
|
|
11
|
-
|
20
|
+
## General Setup
|
12
21
|
|
13
|
-
|
22
|
+
After successful installation, run the following command:
|
14
23
|
|
15
24
|
$ argosnap -i config
|
16
25
|
|
17
|
-
|
26
|
+
Argosnap will create a configuration file. You need to adjust the settings accordingly. The configuration `$HOME/.argosnap/config.yml` looks like this:
|
18
27
|
|
19
28
|
---
|
20
|
-
:email:
|
21
|
-
:password:
|
29
|
+
:email: tarsnap_email@domain.net
|
30
|
+
:password: tarsnap_password
|
22
31
|
:threshold: 10
|
23
|
-
:seconds:
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
4.8812
|
49
|
-
|
50
|
-
That's all :-)
|
32
|
+
:seconds: 86400
|
33
|
+
:notifications_osx: false
|
34
|
+
:notifications_email: true
|
35
|
+
:smtp:
|
36
|
+
:email_delivery_method: smtp
|
37
|
+
:smtpd_user: my_smtp_user
|
38
|
+
:smtpd_password: my_smtp_password
|
39
|
+
:smtpd_address: smtp.domain.net
|
40
|
+
:smtpd_port: 465
|
41
|
+
:smtpd_from: no-reply@domain.net
|
42
|
+
:smtpd_to: user@domain.net
|
43
|
+
:format: txt
|
44
|
+
:notifications_pushover: false
|
45
|
+
:pushover:
|
46
|
+
:key: <my-hash-key>
|
47
|
+
:token: <app-token-key>
|
48
|
+
|
49
|
+
You need to enable the notifications you are going to use. For example is you plan to use email notifications, you must enable them in your config like `notifications_email: true` and adjust the SMTPd settings accordingly.
|
50
|
+
|
51
|
+
For more detailed info read [notifications](https://github.com/atmosx/argosnap/wiki/notifications).
|
52
|
+
|
53
|
+
|
54
|
+
# License
|
55
|
+
|
56
|
+
MIT, see [License.txt](https://github.com/atmosx/argosnap/blob/master/LICENSE.txt) for details.
|
51
57
|
|
52
58
|
# Contributing
|
53
59
|
|
data/argosnap.gemspec
CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = Argosnap::VERSION
|
9
9
|
spec.authors = ["Panagiotis Atmatzidis"]
|
10
10
|
spec.email = ["atma@convalesco.org"]
|
11
|
-
spec.summary = %q{
|
12
|
-
spec.description = %q{A ruby script that displays
|
11
|
+
spec.summary = %q{Command line utility that displays your current tarsnap picoUSD amount.}
|
12
|
+
spec.description = %q{A ruby script that displays your current tarsnap ballance in picoUSD. The script can send notifications when the account balance falls below the predefined threshold. Argosnap supports email, pushover and OSX notifications.}
|
13
13
|
spec.homepage = "https://github.com/atmosx/argosnap"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
data/bin/argosnap
CHANGED
@@ -9,24 +9,19 @@ opt_parser = OptionParser.new do |opt|
|
|
9
9
|
opt.separator ""
|
10
10
|
opt.separator " -v: dislay version"
|
11
11
|
opt.separator " -i config: install configuration files"
|
12
|
-
opt.separator " -i cron: display sample cron entry"
|
13
12
|
opt.separator " -i plist: install plist file for OSX"
|
14
13
|
opt.separator " -p: prints the current amount in picoUSD"
|
15
14
|
opt.separator " -p clean: prints only the picollars (float rounded in 4 decimals), to use in cli"
|
16
15
|
opt.separator " -n mail: send notification via email"
|
17
16
|
opt.separator " -n pushover: send notification via pushover"
|
18
17
|
opt.separator " -n osx: display osx notification"
|
19
|
-
opt.separator " -n
|
18
|
+
opt.separator " -n notify: send notifications everywhere"
|
20
19
|
opt.separator ""
|
21
20
|
|
22
21
|
opt.on("-v","--version","display version") do |version|
|
23
22
|
options[:version] = version
|
24
23
|
end
|
25
24
|
|
26
|
-
opt.on("-c","--cron","run notifications - to use with cron") do |version|
|
27
|
-
options[:cron] = cron
|
28
|
-
end
|
29
|
-
|
30
25
|
opt.on("-i","--install [OPTION]", "install configuration files") do |install|
|
31
26
|
options[:install] = install || 'config'
|
32
27
|
end
|
@@ -53,8 +48,6 @@ begin
|
|
53
48
|
elsif options[:install]
|
54
49
|
if options[:install] == 'config'
|
55
50
|
Argosnap::Install.new.install
|
56
|
-
elsif options[:install] == 'cron'
|
57
|
-
Argosnap::Install.new.cron_entry
|
58
51
|
elsif options[:install] == 'plist'
|
59
52
|
Argosnap::Helpers.new.install_plist
|
60
53
|
end
|
@@ -67,7 +60,7 @@ begin
|
|
67
60
|
Argosnap::Notifications.new.send_osx_notification
|
68
61
|
elsif options[:notification] == 'osx_check'
|
69
62
|
Argosnap::Notifications.new.osx_check
|
70
|
-
elsif options[:notification] == '
|
63
|
+
elsif options[:notification] == 'notify'
|
71
64
|
Argosnap::Notifications.new.notify
|
72
65
|
else
|
73
66
|
puts "You need to need to speficy notification option: 'mail' or 'pushover'"
|
data/lib/argosnap/install.rb
CHANGED
data/lib/argosnap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: argosnap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.4
|
4
|
+
version: 0.0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Panagiotis Atmatzidis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,8 +38,8 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: A ruby script that displays
|
42
|
-
script can send notifications when the
|
41
|
+
description: A ruby script that displays your current tarsnap ballance in picoUSD.
|
42
|
+
The script can send notifications when the account balance falls below the predefined
|
43
43
|
threshold. Argosnap supports email, pushover and OSX notifications.
|
44
44
|
email:
|
45
45
|
- atma@convalesco.org
|
@@ -94,8 +94,7 @@ rubyforge_project:
|
|
94
94
|
rubygems_version: 2.4.8
|
95
95
|
signing_key:
|
96
96
|
specification_version: 4
|
97
|
-
summary:
|
98
|
-
runs out!.
|
97
|
+
summary: Command line utility that displays your current tarsnap picoUSD amount.
|
99
98
|
test_files:
|
100
99
|
- test/lib/argosnap/options_test.rb
|
101
100
|
- test/lib/argosnap/version_test.rb
|