repp 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/repp/handler/shell.rb +10 -2
- data/lib/repp/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: d99c55bb3b5b9a0bb971833d669d6e20f7c3832d334b75309285cb7ebe870baa
|
4
|
+
data.tar.gz: '03248ecc10db6525d5a91d2327d397a7e5d3120af3fbb1d7782346831b28a5ee'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/repp/handler/shell.rb
CHANGED
@@ -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
|
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
|
-
|
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
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.
|
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-
|
11
|
+
date: 2018-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: eventmachine
|