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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e2f7ab993c9ab719e8d1e61a5a7cba4df0c5cc9f
4
- data.tar.gz: 19c050dbdc81bf51f0845f21e25980ac24ecdc3e
3
+ metadata.gz: a581f6bf0589e98293c753f2cbbdbc4e85899bfc
4
+ data.tar.gz: 5fe9a38a0b8f1f891fab15d0dd9351d783f5ea5f
5
5
  SHA512:
6
- metadata.gz: 8567af9b2af80bdeb77ca3845a009f727761ef4d79a14c15fda8b24c7a1d12de358d032a54a8fdc9318268fe45ae6f13fe83e9c47f2ea6fb057965faaaf9c95d
7
- data.tar.gz: fb7fe40f368ff3746616f05ef4cfa40c13fb79fd134d0a31161df4fdaae16c497f645483666fa43c514587ec4a4f8ed9aabd37b562497c8ba5421483e1f8b1bc
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
- * Rename: Ellen -> Ruboty
5
+ - Rename: Ellen -> Ruboty
3
6
 
4
7
  ## 0.0.8
5
- * Fix loaded modules
8
+ - Fix loaded modules
6
9
 
7
10
  ## 0.0.7
8
- * Format message if adapter supports :code option
11
+ - Format message if adapter supports :code option
9
12
 
10
13
  ## 0.0.6
11
- * Store & Rebuild all message attributes
14
+ - Store & Rebuild all message attributes
12
15
 
13
16
  ## 0.0.5
14
- * Says where job is registered on
17
+ - Says where job is registered on
15
18
 
16
19
  ## 0.0.4
17
- * Support Ruboty v0.2.0
20
+ - Support Ruboty v0.2.0
18
21
 
19
22
  ## 0.0.3
20
- * Remember registered jobs after initialized
21
- * Stop running job before its deletion
23
+ - Remember registered jobs after initialized
24
+ - Stop running job before its deletion
22
25
 
23
26
  ## 0.0.2
24
- * Support the new Brain interface
27
+ - Support the new Brain interface
25
28
 
26
29
  ## 0.0.1
27
- * 1st Release
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
- ![](https://raw.githubusercontent.com/r7kamura/ruboty-cron/master/images/screenshot.png)
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
+ ```
@@ -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
- Message.new(
14
- attributes.symbolize_keys.except(:body, :id, :schedule).merge(robot: robot)
15
- ).reply(body)
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
@@ -1,5 +1,5 @@
1
1
  module Ruboty
2
2
  module Cron
3
- VERSION = "0.0.9"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
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.9
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: 2014-05-31 00:00:00.000000000 Z
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.2.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.