ruboty-cron 0.0.9 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -10
- data/README.md +25 -1
- data/lib/ruboty/cron/job.rb +6 -11
- data/lib/ruboty/cron/version.rb +1 -1
- 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: a581f6bf0589e98293c753f2cbbdbc4e85899bfc
|
4
|
+
data.tar.gz: 5fe9a38a0b8f1f891fab15d0dd9351d783f5ea5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd5bcb8d8d7e876591b8389b7a94d487a5cccb26e158df2a4585a2bed70d24be1fd6848bda227219dabfb8f899e337efe6ff4b17a37c2941bacffe37135b5ae3
|
7
|
+
data.tar.gz: c70bd21ad5ff5137a2c317345f88aa633fd7da372bcd023a9b733923662779cb0996ce2e26285fccf3df0dacb5d033c01f7e1c6ecb88b21727de6ffd530a3ea7
|
data/CHANGELOG.md
CHANGED
@@ -1,27 +1,30 @@
|
|
1
|
+
## 1.0.0
|
2
|
+
- Chnage job behavior to receive body as message in scheduled time
|
3
|
+
|
1
4
|
## 0.0.9
|
2
|
-
|
5
|
+
- Rename: Ellen -> Ruboty
|
3
6
|
|
4
7
|
## 0.0.8
|
5
|
-
|
8
|
+
- Fix loaded modules
|
6
9
|
|
7
10
|
## 0.0.7
|
8
|
-
|
11
|
+
- Format message if adapter supports :code option
|
9
12
|
|
10
13
|
## 0.0.6
|
11
|
-
|
14
|
+
- Store & Rebuild all message attributes
|
12
15
|
|
13
16
|
## 0.0.5
|
14
|
-
|
17
|
+
- Says where job is registered on
|
15
18
|
|
16
19
|
## 0.0.4
|
17
|
-
|
20
|
+
- Support Ruboty v0.2.0
|
18
21
|
|
19
22
|
## 0.0.3
|
20
|
-
|
21
|
-
|
23
|
+
- Remember registered jobs after initialized
|
24
|
+
- Stop running job before its deletion
|
22
25
|
|
23
26
|
## 0.0.2
|
24
|
-
|
27
|
+
- Support the new Brain interface
|
25
28
|
|
26
29
|
## 0.0.1
|
27
|
-
|
30
|
+
- 1st Release
|
data/README.md
CHANGED
@@ -10,4 +10,28 @@ You can use any [Chrono](https://github.com/r7kamura/chrono/) compatible cron sy
|
|
10
10
|
@ruboty list jobs - List all cron jobs
|
11
11
|
```
|
12
12
|
|
13
|
-
|
13
|
+
### Example
|
14
|
+
```
|
15
|
+
$ bundle exec ruboty
|
16
|
+
Type `exit` or `quit` to end the session.
|
17
|
+
> @ruboty add job "* * * * *" @ruboty ping
|
18
|
+
Job 3117 created
|
19
|
+
pong
|
20
|
+
pong
|
21
|
+
pong
|
22
|
+
pong
|
23
|
+
pong
|
24
|
+
> @ruboty list jobs
|
25
|
+
3117: "* * * * *" @ruboty ping
|
26
|
+
> @ruboty delete job 3117
|
27
|
+
Deleted
|
28
|
+
>
|
29
|
+
```
|
30
|
+
|
31
|
+
### Tips
|
32
|
+
If you want to schedule Ruboty to say something,
|
33
|
+
[ruboty-echo](https://github.com/taiki45/ruboty-echo) may help you.
|
34
|
+
|
35
|
+
```
|
36
|
+
> @ruboty add job "0 8 * * 1-5" @ruboty echo It's Time for School!
|
37
|
+
```
|
data/lib/ruboty/cron/job.rb
CHANGED
@@ -10,9 +10,12 @@ module Ruboty
|
|
10
10
|
def start(robot)
|
11
11
|
@thread = Thread.new do
|
12
12
|
Chrono::Trigger.new(schedule) do
|
13
|
-
|
14
|
-
attributes.symbolize_keys.except(
|
15
|
-
|
13
|
+
robot.receive(
|
14
|
+
attributes.symbolize_keys.except(
|
15
|
+
:id,
|
16
|
+
:schedule,
|
17
|
+
),
|
18
|
+
)
|
16
19
|
end.run
|
17
20
|
end
|
18
21
|
end
|
@@ -40,14 +43,6 @@ module Ruboty
|
|
40
43
|
def body
|
41
44
|
attributes["body"]
|
42
45
|
end
|
43
|
-
|
44
|
-
def from
|
45
|
-
attributes["from"]
|
46
|
-
end
|
47
|
-
|
48
|
-
def to
|
49
|
-
attributes["to"]
|
50
|
-
end
|
51
46
|
end
|
52
47
|
end
|
53
48
|
end
|
data/lib/ruboty/cron/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruboty-cron
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
119
|
version: '0'
|
120
120
|
requirements: []
|
121
121
|
rubyforge_project:
|
122
|
-
rubygems_version: 2.
|
122
|
+
rubygems_version: 2.4.5
|
123
123
|
signing_key:
|
124
124
|
specification_version: 4
|
125
125
|
summary: Mount cron system to Ruboty to schedule messages on a specific time.
|