repp 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: d0e64beac3df37288beb466cfe647e6ddf855d6ca70e1cc3502602cc7b57d340
4
- data.tar.gz: e0c4ff3a28e1703ba70dd3e731f53921f0acf549dc9d316668150d9b5cd0c5b6
3
+ metadata.gz: d99c55bb3b5b9a0bb971833d669d6e20f7c3832d334b75309285cb7ebe870baa
4
+ data.tar.gz: '03248ecc10db6525d5a91d2327d397a7e5d3120af3fbb1d7782346831b28a5ee'
5
5
  SHA512:
6
- metadata.gz: 168361e7d16ae907b1ee0e38225af53feeb0317ddf36d47bc41612c0948dc3fa83181a2beaf2ef6f710c944e480d3f21f23f46b10f3577d4307809e633b547a4
7
- data.tar.gz: cff245448996af9994bdeb24f56a58ca12891e8b82f7c2965afd28f8f59acaf7b3a8ff6d7d7db8d6e52595e615665acefeaa5d62fa68754f56728228591370b4
6
+ metadata.gz: 2025525b45694117be1f29509ab9c934843a852fbce390b4678f2d8039aacfc064db6e93942a962187ab49de1dd1f4fec140ea28149893378bbb8da4309c3e29
7
+ data.tar.gz: 3648058e784ff73c4bdf6e8b551648684f2d6db4a1ea2afd96f7a1845f888597a19e4cdc1ae8804129a9b7bd0c82d5fab0f020964a076e5c7d0a27532fe3ff3a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2
4
+
5
+ - Add ticker to shell handler [Add ticker to shell handler by kinoppyd · Pull Request #8 · kinoppyd/repp](https://github.com/kinoppyd/repp/pull/8)
6
+
3
7
  ## 0.3.1
4
8
 
5
9
  - Fix wrong slack api method name [#7](https://github.com/kinoppyd/repp/pull/7)
@@ -5,7 +5,7 @@ module Repp
5
5
  class Shell
6
6
  module KeyboardHandler
7
7
  include EM::Protocols::LineText2
8
- def initialize(app) @app = app.new; end
8
+ def initialize(app) @app = app; end
9
9
  def receive_line(data)
10
10
  reply_to = /@\w+/.match(data)&.[](1)
11
11
  message = Event::Receive.new(type: :message, body: data, reply_to: reply_to, bot?: false)
@@ -19,7 +19,15 @@ module Repp
19
19
  def self.run(app, options = {})
20
20
  yield self if block_given?
21
21
 
22
- EM.run { EM.open_keyboard(KeyboardHandler, app) }
22
+ application = app.new
23
+ @ticker = Ticker.task(application) do |res|
24
+ if res.any?
25
+ $stdout.puts res.first
26
+ end
27
+ end
28
+
29
+ @ticker.run!
30
+ EM.run { EM.open_keyboard(KeyboardHandler, application) }
23
31
  end
24
32
 
25
33
  def self.stop
data/lib/repp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Repp
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kinoppyd
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-19 00:00:00.000000000 Z
11
+ date: 2018-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine