macbot 0.1.4 → 0.1.5
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/README.md +10 -6
- data/lib/macbot/cli.rb +3 -3
- data/lib/macbot/metadata.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2abd4d7000693597ba8544026b103e88c6b9ae25
|
4
|
+
data.tar.gz: d70c437faed9614d6f93153985bbf8c37a5c4401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f37da9c774dfcff39e0bbbac6868c39364ae81799aebf26c389191a2bd8476055ee7b823fec3eed8c288ac8048674775798671657c887f089e2e1c0d7f8d9d7f
|
7
|
+
data.tar.gz: d9c2382656d17b58fa789f49cb6456c94fa10ed48dd6e1b8327934040a142129a2fc18173dce97e7cc92d3781dbfc042a3c328bd06e42a255cb8e480d033e8fc
|
data/README.md
CHANGED
@@ -14,6 +14,9 @@ I often found myself in the situation where I'm at work and personal email keeps
|
|
14
14
|
$ gem install macbot
|
15
15
|
|
16
16
|
$ macbot setup #creates initial yml file
|
17
|
+
|
18
|
+
A file `.macbot.yml` is created in your home directory. You can edit the file directly or use the commands below to add groups and accounts
|
19
|
+
|
17
20
|
## Usage
|
18
21
|
The initial setup has two groups: work and privat, but you can create your own groups and manage them as you like
|
19
22
|
|
@@ -27,19 +30,20 @@ The initial setup has two groups: work and privat, but you can create your own g
|
|
27
30
|
|
28
31
|
$ macbot add --group yourGroupName --account youAccountName
|
29
32
|
|
33
|
+
|
30
34
|
### Disable/Enable accounts
|
31
35
|
|
32
36
|
If your config is the following
|
33
37
|
````yaml
|
34
38
|
work:
|
35
|
-
|
36
|
-
|
39
|
+
- work1
|
40
|
+
- work2
|
37
41
|
private:
|
38
|
-
|
39
|
-
|
42
|
+
- private1
|
43
|
+
- private2
|
40
44
|
someother:
|
41
|
-
|
42
|
-
|
45
|
+
- other1
|
46
|
+
- other2
|
43
47
|
````
|
44
48
|
And u simply want to enable your work accounts
|
45
49
|
|
data/lib/macbot/cli.rb
CHANGED
@@ -30,7 +30,7 @@ module Macbot
|
|
30
30
|
c.option '--group STRING', String, 'Create email group'
|
31
31
|
c.option '--account STING', String, 'Add email to group'
|
32
32
|
c.action do |args, options|
|
33
|
-
abort(
|
33
|
+
abort('Missing group') unless options.group
|
34
34
|
data = YAML.load_file(Macbot::YAML_PATH)
|
35
35
|
|
36
36
|
unless data[options.group]
|
@@ -60,7 +60,7 @@ module Macbot
|
|
60
60
|
c.option '--group STRING', String, 'remove email group'
|
61
61
|
c.option '--account STING', String, 'remove email from group'
|
62
62
|
c.action do |args, options|
|
63
|
-
abort(
|
63
|
+
abort('Missing group') unless options.group
|
64
64
|
data = YAML.load_file(Macbot::YAML_PATH)
|
65
65
|
|
66
66
|
if options.account
|
@@ -86,7 +86,7 @@ module Macbot
|
|
86
86
|
c.description = 'creat yml file'
|
87
87
|
c.action do |args, options|
|
88
88
|
if File.exists? Macbot::YAML_PATH
|
89
|
-
unless agree(
|
89
|
+
unless agree('Are u sure? This will reset all your settings')
|
90
90
|
abort "Ok, I didn't remove anything"
|
91
91
|
end
|
92
92
|
end
|
data/lib/macbot/metadata.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
|
3
3
|
module Macbot
|
4
|
-
VERSION = '0.1.
|
4
|
+
VERSION = '0.1.5'
|
5
5
|
NAME = 'Macbot'
|
6
|
-
SUMMARY = 'Set it up to disable/enable accounts'
|
7
|
-
YAML_PATH = '
|
6
|
+
SUMMARY = 'Set it up to disable/enable email accounts in Mail for OSX'
|
7
|
+
YAML_PATH = File.join(Dir.home, '/.macbot.yml')
|
8
8
|
EMAIL_GROUPS = if File.exists? Macbot::YAML_PATH
|
9
9
|
YAML.load_file(Macbot::YAML_PATH).keys
|
10
10
|
else
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: macbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hilde Vestol
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
-
description: Set it up to disable/enable accounts
|
55
|
+
description: Set it up to disable/enable email accounts in Mail for OSX
|
56
56
|
email:
|
57
57
|
- hilde@rubynor.com
|
58
58
|
executables:
|
@@ -95,5 +95,5 @@ rubyforge_project:
|
|
95
95
|
rubygems_version: 2.2.0
|
96
96
|
signing_key:
|
97
97
|
specification_version: 4
|
98
|
-
summary: Set it up to disable/enable accounts
|
98
|
+
summary: Set it up to disable/enable email accounts in Mail for OSX
|
99
99
|
test_files: []
|