slackdo 0.3.0 → 0.3.1
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/Gemfile.lock +1 -1
- data/README.md +7 -27
- data/bin/slackdo +3 -1
- data/lib/slackdo/version.rb +1 -1
- data/lib/slackdo.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12b080b35b45b1272d182d03b24a7c203cd27a1e
|
4
|
+
data.tar.gz: ad488697f3f6bd554cc918e94d9a14ce52860442
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b83205bcaa8dd678a2b37cb1eb3e4954421a201d5185d6558f7c21a738a53113675203e406a5e6dc016becbfff17b18c6cbd9083ca76e83936f78a416715e191
|
7
|
+
data.tar.gz: 695b1898c35a06a11d0d4359b93870b13a9d1f7ee1177119eede154d8910d69f11eb53a69532780b93378a71c082e679f09c0db37aa60462eeb5cb3ba89181de
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,7 @@
|
|
1
1
|
# Slackdo
|
2
2
|

|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
It simplifies the process of maintaining your TODO list from the CLI without having to leave the CLI while working.
|
4
|
+
SlackDO is a simple CLI tool that allows you to send TODO items and reminders to a channel on Slack or to yourself. It simplifies the process of maintaining your TODO list from the CLI without having to leave it.
|
7
5
|
|
8
6
|
## Prerequisites
|
9
7
|
- Ruby
|
@@ -17,27 +15,10 @@ gem install slackdo
|
|
17
15
|
|
18
16
|
In order to use slackdo you still have to add the rubygem's bin location to your $PATH.
|
19
17
|
|
20
|
-
eg. for OSX:
|
21
|
-
|
22
|
-
```bash
|
23
|
-
export PATH=$PATH:/usr/local/lib/ruby/gems/<ruby-version>/gems/slackdo-<gem-version>/bin
|
24
|
-
```
|
25
|
-
|
26
|
-
To get to know your general gem installation path use the following for your general rubygems information and look for the GEM PATHS variable:
|
27
|
-
|
28
18
|
```bash
|
29
|
-
|
19
|
+
export PATH=$PATH:$(gem which slackdo | rev | cut -d'/' -f3- | rev)/bin
|
30
20
|
```
|
31
21
|
|
32
|
-
Or just check the specific gem information to see the location where it's installed:
|
33
|
-
|
34
|
-
```bash
|
35
|
-
$ gem which slackdo
|
36
|
-
/usr/local/lib/ruby/gems/<ruby-version>/gems/slackdo-<gem-version>/lib/slackdo.rb
|
37
|
-
```
|
38
|
-
|
39
|
-
This indicates that your gem binary is located at `/usr/local/lib/ruby/gems/<ruby-version>/gems/slackdo-<gem-version>/bin`.
|
40
|
-
|
41
22
|
## Usage
|
42
23
|
### Slack
|
43
24
|
First thing you should do is configure your incoming webhook by doing the following:
|
@@ -59,30 +40,29 @@ slackdo reminder
|
|
59
40
|
```
|
60
41
|
|
61
42
|
### Trello
|
62
|
-
To start using the Trello integration of SlackDO, which enables you to push your TODO items to a list on Trello use:
|
43
|
+
To start using the Trello integration of SlackDO, which enables you to push your TODO items to a list on Trello, use:
|
63
44
|
|
64
45
|
```
|
65
46
|
slackdo configure trello
|
66
47
|
```
|
67
48
|
|
68
|
-
Now that this has been configured SlackDO will send your items to Trello
|
49
|
+
Now that this has been configured SlackDO will send your items to both Slack and Trello everytime you use the command:
|
69
50
|
|
70
51
|
```
|
71
52
|
slackdo task
|
72
53
|
```
|
73
54
|
|
74
|
-

|
75
55
|

|
76
56
|

|
77
57
|
|
78
|
-
|
58
|
+
### Configuration
|
59
|
+
The config file is located at `~/.slackdo/config.json` if you like to change things manually.
|
79
60
|
|
61
|
+
## Development
|
80
62
|
Slackdo is still under development and might still be buggy. Feel free to contribute to the project.
|
81
63
|
|
82
64
|
## Contributing
|
83
|
-
|
84
65
|
Bug reports and pull requests are welcome on GitHub at https://github.com/segersniels/slackdo.
|
85
66
|
|
86
67
|
## License
|
87
|
-
|
88
68
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/bin/slackdo
CHANGED
@@ -8,7 +8,9 @@ config.configure_init
|
|
8
8
|
case ARGV[0]
|
9
9
|
when 'configure'
|
10
10
|
config.configure_slack_webhook if ARGV[1] == 'slack'
|
11
|
-
config.configure_trello_api if ARGV[1] == 'trello'
|
11
|
+
config.configure_trello_api if ARGV[1] == 'trello' && ARGV[2].nil?
|
12
|
+
config.disable_trello if ARGV[1] == 'trello' && ARGV[2] == 'disable'
|
13
|
+
config.enable_trello if ARGV[1] == 'trello' && ARGV[2] == 'enable'
|
12
14
|
when 'task'
|
13
15
|
slack = Slackdo::Task.new
|
14
16
|
slack.add_task
|
data/lib/slackdo/version.rb
CHANGED
data/lib/slackdo.rb
CHANGED
@@ -22,6 +22,24 @@ module Slackdo
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
25
|
+
def enable_trello
|
26
|
+
file = File.read("#{ENV['HOME']}/.slackdo/config.json")
|
27
|
+
hash = JSON.parse(file)
|
28
|
+
hash["allow_trello_pushing"] = "true"
|
29
|
+
File.open("#{ENV['HOME']}/.slackdo/config.json",'w') do |f|
|
30
|
+
f.write(hash.to_json)
|
31
|
+
end
|
32
|
+
puts 'Trello has been enabled...'
|
33
|
+
end
|
34
|
+
def disable_trello
|
35
|
+
file = File.read("#{ENV['HOME']}/.slackdo/config.json")
|
36
|
+
hash = JSON.parse(file)
|
37
|
+
hash["allow_trello_pushing"] = "false"
|
38
|
+
File.open("#{ENV['HOME']}/.slackdo/config.json",'w') do |f|
|
39
|
+
f.write(hash.to_json)
|
40
|
+
end
|
41
|
+
puts 'Trello has been disabled...'
|
42
|
+
end
|
25
43
|
def configure_trello_api
|
26
44
|
cli = HighLine.new
|
27
45
|
file = File.read("#{ENV['HOME']}/.slackdo/config.json")
|