ruboty-toggl_team 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/ruboty/handlers/toggl_team.rb +11 -0
- data/lib/ruboty/toggl_team/actions/toggl_team.rb +9 -0
- data/lib/ruboty/toggl_team/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 387fc35235be107052ab84dab491fb8e9147288fb712d53fa625693fe74f1a34
|
4
|
+
data.tar.gz: '069ae7fad28b761f950d37dc21fc20f745258f79f6f179844e5003e80a6427df'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ade8193f092dfc8daa1b0e419929e9a772c1452b974af6c9148133661878dae514ead63d4c3670ffed1491be018e5c78dbe05787dbdaea6f8f18e3145c18540
|
7
|
+
data.tar.gz: 9317ef42b3f628105fb7f9ef65412f86e0c571360095728a370dc28bf0e86726b9dbef41e2cf34f5cf31fc788d22452edda01e365abb17a2c47a26c11dd11f7d
|
data/README.md
CHANGED
@@ -15,6 +15,13 @@ module Ruboty
|
|
15
15
|
description: 'set toggl workspace name'
|
16
16
|
)
|
17
17
|
|
18
|
+
on(
|
19
|
+
/^projects$/,
|
20
|
+
name: 'projects',
|
21
|
+
description: 'get projects',
|
22
|
+
all: true
|
23
|
+
)
|
24
|
+
|
18
25
|
on(
|
19
26
|
/^start (?<task>\S+)(?<project_name>.*)/,
|
20
27
|
name: 'start',
|
@@ -37,6 +44,10 @@ module Ruboty
|
|
37
44
|
action(message).set_workspace
|
38
45
|
end
|
39
46
|
|
47
|
+
def projects(message)
|
48
|
+
action(message).projects
|
49
|
+
end
|
50
|
+
|
40
51
|
def start(message)
|
41
52
|
action(message).start
|
42
53
|
end
|
@@ -37,6 +37,15 @@ module Ruboty
|
|
37
37
|
message.reply("error! #{e}")
|
38
38
|
end
|
39
39
|
|
40
|
+
def projects
|
41
|
+
unless user_token && user_workspace
|
42
|
+
message.reply("please set #{user}'s toggl token and workspace!") and return
|
43
|
+
end
|
44
|
+
|
45
|
+
projects = toggl.projects(user_workspace['id'], active: true)
|
46
|
+
message.reply(projects.map {|p| p['name'] }.join("\n"))
|
47
|
+
end
|
48
|
+
|
40
49
|
def start
|
41
50
|
unless user_token && user_workspace
|
42
51
|
message.reply("please set #{user}'s toggl token and workspace!") and return
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-toggl_team
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kimromi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruboty
|