ruboty-do_it_later 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a09d6b9845cb9bff5e45ee6b5503b6ad19827569
4
+ data.tar.gz: 30f5d38468cce1be6431d28dd795ac4f16d15518
5
+ SHA512:
6
+ metadata.gz: 334caa3c0b20a62bccd53f8eb81f7e5806405cbb2cde26abfac7b81677f575933bffb17bf4ea1f355a2ff865a253002b7087831c7adc59436aac1f3e20ec2381
7
+ data.tar.gz: 5dc6f075b96b77ab43595f5751a6b9d3919d24ef372781c3b773a479765ac013099cf2a813bdd6ef0a45940178296e14f6833fc61132a8b6ad8c99ae2abb77c3
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,38 @@
1
+ # Ruboty::DoItLater
2
+
3
+ Ruboty plugin to notify do it later.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'ruboty-do_it_later'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install ruboty-scheduler
20
+
21
+ ## Usage
22
+
23
+ ```
24
+ @ruboty do <since> <do_it_later>
25
+
26
+ @ruboty do 5s hello # say hello in 5 seconds later
27
+ @ruboty do 1d hello # say hello in 1 day later
28
+ ```
29
+
30
+ About syntax of `since`, see https://github.com/jmettraux/rufus-scheduler
31
+
32
+ ## Contributing
33
+
34
+ 1. Fork it ( https://github.com/bitjourney/ruboty-do_it_later/fork )
35
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
36
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
37
+ 4. Push to the branch (`git push origin my-new-feature`)
38
+ 5. Create a new Pull Request
@@ -0,0 +1,6 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task default: :spec
@@ -0,0 +1,16 @@
1
+ require 'rufus-scheduler'
2
+
3
+ module Ruboty
4
+ module Handlers
5
+ class DoItLater < Base
6
+ on /do\s+(?<since>.*?)\s+(?<do_it_later>.*)\z/i, name: 'do', description: 'Notify doing it later'
7
+
8
+ def do(message)
9
+ scheduler = Rufus::Scheduler.new
10
+ scheduler.in "#{message[:since]}" do
11
+ message.reply message[:do_it_later]
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module Ruboty
2
+ module DoItLater
3
+ VERSION = '0.1.0'
4
+ end
5
+ end
@@ -0,0 +1,25 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'ruboty/do_it_later/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'ruboty-do_it_later'
7
+ spec.version = Ruboty::DoItLater::VERSION
8
+ spec.authors = ['Masahiro Ihara']
9
+ spec.email = ['ihara2525@gmail.com']
10
+
11
+ spec.summary = %q{Ruboty plugin to notify doing it later}
12
+ spec.description = %q{Ruboty plugin to notify doing it later}
13
+ spec.homepage = 'http://github.com/ihara2525/ruboty-do_it_later'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = 'exe'
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'ruboty'
22
+ spec.add_dependency 'rufus-scheduler'
23
+ spec.add_development_dependency 'bundler', '~> 1.10'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ end
metadata ADDED
@@ -0,0 +1,108 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruboty-do_it_later
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Masahiro Ihara
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ruboty
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rufus-scheduler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: bundler
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.10'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.10'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.0'
69
+ description: Ruboty plugin to notify doing it later
70
+ email:
71
+ - ihara2525@gmail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - Gemfile
79
+ - README.md
80
+ - Rakefile
81
+ - lib/ruboty/do_it_later.rb
82
+ - lib/ruboty/do_it_later/version.rb
83
+ - ruboty-do_it_later.gemspec
84
+ homepage: http://github.com/ihara2525/ruboty-do_it_later
85
+ licenses:
86
+ - MIT
87
+ metadata: {}
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project:
104
+ rubygems_version: 2.4.5
105
+ signing_key:
106
+ specification_version: 4
107
+ summary: Ruboty plugin to notify doing it later
108
+ test_files: []