ruboty 1.4.0 → 1.5.0
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/.github/release.yml +23 -0
- data/.github/workflows/actions.lock +37 -0
- data/.github/workflows/bump-request.yml +26 -0
- data/.github/workflows/release.yml +11 -0
- data/.github/workflows/test.yml +25 -0
- data/README.md +3 -4
- data/lib/ruboty/adapters/shell.rb +3 -3
- data/lib/ruboty/version.rb +1 -1
- data/ruboty.gemspec +2 -1
- data/spec/ruboty/adapters/shell_spec.rb +5 -5
- metadata +22 -5
- data/.travis.yml +0 -8
- data/CHANGELOG.md +0 -190
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7ee2862090c75bfe8bd8ead796f9e20afab74869494240d6f5b9ebc44b69d478
|
|
4
|
+
data.tar.gz: 4db93449967f4c6731009252546a49a4207f7a0a3e454d633ec1aa02072dd84d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b507cfd9781c1a33c2fea8823016faad863c89e2522c41d5925a543e5088bf0e96ecfebac65ae59709c950a20f47993da26223ef102bf3161434e683306d0ad9
|
|
7
|
+
data.tar.gz: f979a3af692e2012c3f03da2092ba7009e8fdf0a0913c428ab999db247849dd5be353ecae99d512e985ce54d6060b11f8daa7bd99028ac5f3a9a6b472ebd96ef
|
data/.github/release.yml
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
categories:
|
|
3
|
+
- title: Added
|
|
4
|
+
labels:
|
|
5
|
+
- add
|
|
6
|
+
- title: Changed
|
|
7
|
+
labels:
|
|
8
|
+
- change
|
|
9
|
+
- title: Deprecated
|
|
10
|
+
labels:
|
|
11
|
+
- deprecate
|
|
12
|
+
- title: Fixed
|
|
13
|
+
labels:
|
|
14
|
+
- fix
|
|
15
|
+
- title: Removed
|
|
16
|
+
labels:
|
|
17
|
+
- remove
|
|
18
|
+
- title: Security
|
|
19
|
+
labels:
|
|
20
|
+
- security
|
|
21
|
+
- title: Others
|
|
22
|
+
labels:
|
|
23
|
+
- "*"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# This file is machine-generated by `gh actions-lock`.
|
|
2
|
+
# Do not edit by hand; run `gh actions-lock` to update.
|
|
3
|
+
# Docs: https://gh.io/actions-lockfile
|
|
4
|
+
version: 'v0.0.3'
|
|
5
|
+
workflows:
|
|
6
|
+
'.github/workflows/bump-request.yml':
|
|
7
|
+
- 'actions/checkout@v7.0.1'
|
|
8
|
+
- 'r7kamura/bump-request@v0.7.1'
|
|
9
|
+
- 'ruby/setup-ruby@v1.336.0'
|
|
10
|
+
'.github/workflows/release.yml': []
|
|
11
|
+
'.github/workflows/test.yml':
|
|
12
|
+
- 'actions/checkout@v7.0.1'
|
|
13
|
+
- 'ruby/setup-ruby@v1.336.0'
|
|
14
|
+
dependencies:
|
|
15
|
+
'actions/checkout@v7.0.1':
|
|
16
|
+
ref: 'v7.0.1'
|
|
17
|
+
commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
|
|
18
|
+
owner_id: 44036562
|
|
19
|
+
repo_id: 197814629
|
|
20
|
+
'actions/setup-node@v7.1.0':
|
|
21
|
+
ref: 'v7.1.0'
|
|
22
|
+
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
|
|
23
|
+
owner_id: 44036562
|
|
24
|
+
repo_id: 189476904
|
|
25
|
+
'r7kamura/bump-request@v0.7.1':
|
|
26
|
+
ref: 'v0.7.1'
|
|
27
|
+
commit: 'sha1-b27937188d404bc0c2fd442403e6de1d20f9b349'
|
|
28
|
+
owner_id: 111689
|
|
29
|
+
repo_id: 533135195
|
|
30
|
+
uses:
|
|
31
|
+
- 'actions/checkout@v7.0.1'
|
|
32
|
+
- 'actions/setup-node@v7.1.0'
|
|
33
|
+
'ruby/setup-ruby@v1.336.0':
|
|
34
|
+
ref: 'v1.336.0'
|
|
35
|
+
commit: 'sha1-de492cf36cbab201753d720ce4f4e336cd688c94'
|
|
36
|
+
owner_id: 210414
|
|
37
|
+
repo_id: 231208785
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: bump-request
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: Version to change to.
|
|
8
|
+
required: true
|
|
9
|
+
type: string
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
run:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7.0.1
|
|
16
|
+
- name: Set up Ruby
|
|
17
|
+
uses: ruby/setup-ruby@v1.336.0
|
|
18
|
+
with:
|
|
19
|
+
ruby-version: 3.3
|
|
20
|
+
bundler-cache: true
|
|
21
|
+
- uses: r7kamura/bump-request@v0.7.1
|
|
22
|
+
with:
|
|
23
|
+
command: |
|
|
24
|
+
sed -i -r 's/([0-9]+\.[0-9]+\.[0-9]+)/${{ inputs.version }}/' lib/ruboty/version.rb
|
|
25
|
+
bundle install
|
|
26
|
+
version: ${{ inputs.version }}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
name: Ruby ${{ matrix.ruby }}
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
matrix:
|
|
16
|
+
ruby: ['3.3', '3.4', '4.0']
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v7.0.1
|
|
19
|
+
- name: Set up Ruby
|
|
20
|
+
uses: ruby/setup-ruby@v1.336.0
|
|
21
|
+
with:
|
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
|
23
|
+
bundler-cache: true
|
|
24
|
+
rubygems: latest
|
|
25
|
+
- run: bundle exec rspec
|
data/README.md
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# Ruboty
|
|
2
2
|
|
|
3
|
-
[](https://rubygems.org/gems/ruboty)
|
|
4
|
-
[](https://travis-ci.org/r7kamura/ruboty)
|
|
5
|
-
|
|
6
3
|
Ruby + Bot = Ruboty.
|
|
7
4
|
|
|
8
5
|
## Dependencies
|
|
9
6
|
|
|
10
|
-
- Ruby
|
|
7
|
+
- Ruby 3.3 or later
|
|
11
8
|
|
|
12
9
|
## Adapter
|
|
13
10
|
|
|
@@ -76,3 +73,5 @@ RUBOTY_NAME - Name to respond to mention (default: ruboty)
|
|
|
76
73
|
See [r7kamura/ruboty-template](https://github.com/r7kamura/ruboty-template) for example.
|
|
77
74
|
|
|
78
75
|
[](https://heroku.com/deploy?template=https://github.com/r7kamura/ruboty-template)
|
|
76
|
+
|
|
77
|
+
ruboty was originally designed to be deployed on Heroku. Heroku no longer offers free plans, so this may no longer work there.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require "
|
|
1
|
+
require "reline"
|
|
2
2
|
|
|
3
3
|
module Ruboty
|
|
4
4
|
module Adapters
|
|
@@ -32,7 +32,7 @@ module Ruboty
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def read
|
|
35
|
-
|
|
35
|
+
Reline.readline(PROMPT, true).tap do |line|
|
|
36
36
|
history_file.puts(line)
|
|
37
37
|
end
|
|
38
38
|
end
|
|
@@ -63,7 +63,7 @@ module Ruboty
|
|
|
63
63
|
def remember
|
|
64
64
|
if history_pathname.exist?
|
|
65
65
|
history_pathname.each_line do |line|
|
|
66
|
-
|
|
66
|
+
Reline::HISTORY << line.rstrip
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
end
|
data/lib/ruboty/version.rb
CHANGED
data/ruboty.gemspec
CHANGED
|
@@ -16,12 +16,13 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
17
17
|
spec.require_paths = ["lib"]
|
|
18
18
|
|
|
19
|
-
spec.required_ruby_version = ">=
|
|
19
|
+
spec.required_ruby_version = ">= 3.3"
|
|
20
20
|
|
|
21
21
|
spec.add_dependency "activesupport"
|
|
22
22
|
spec.add_dependency "bundler"
|
|
23
23
|
spec.add_dependency "dotenv"
|
|
24
24
|
spec.add_dependency "mem"
|
|
25
|
+
spec.add_dependency "reline"
|
|
25
26
|
spec.add_dependency "slop"
|
|
26
27
|
spec.add_development_dependency "rake"
|
|
27
28
|
spec.add_development_dependency "rspec", "3.4.0"
|
|
@@ -16,7 +16,7 @@ describe Ruboty::Adapters::Shell do
|
|
|
16
16
|
describe "#run" do
|
|
17
17
|
context "with `exit`" do
|
|
18
18
|
it "stops" do
|
|
19
|
-
allow(
|
|
19
|
+
allow(Reline).to receive(:readline).and_return("exit")
|
|
20
20
|
expect(adapter).to receive(:stop).and_call_original
|
|
21
21
|
adapter.run
|
|
22
22
|
end
|
|
@@ -24,7 +24,7 @@ describe Ruboty::Adapters::Shell do
|
|
|
24
24
|
|
|
25
25
|
context "with `quit`" do
|
|
26
26
|
it "stops" do
|
|
27
|
-
allow(
|
|
27
|
+
allow(Reline).to receive(:readline).and_return("quit")
|
|
28
28
|
expect(adapter).to receive(:stop).and_call_original
|
|
29
29
|
adapter.run
|
|
30
30
|
end
|
|
@@ -32,7 +32,7 @@ describe Ruboty::Adapters::Shell do
|
|
|
32
32
|
|
|
33
33
|
context "with EOF" do
|
|
34
34
|
it "stops" do
|
|
35
|
-
allow(
|
|
35
|
+
allow(Reline).to receive(:readline).and_return(nil)
|
|
36
36
|
expect(adapter).to receive(:stop).and_call_original
|
|
37
37
|
adapter.run
|
|
38
38
|
end
|
|
@@ -40,7 +40,7 @@ describe Ruboty::Adapters::Shell do
|
|
|
40
40
|
|
|
41
41
|
context "with Inturrupt from console" do
|
|
42
42
|
it "stops" do
|
|
43
|
-
allow(
|
|
43
|
+
allow(Reline).to receive(:readline).and_raise(Interrupt)
|
|
44
44
|
expect(adapter).to receive(:stop).and_call_original
|
|
45
45
|
adapter.run
|
|
46
46
|
end
|
|
@@ -48,7 +48,7 @@ describe Ruboty::Adapters::Shell do
|
|
|
48
48
|
|
|
49
49
|
context "without `exit` nor `quit`" do
|
|
50
50
|
it "passes given message to robot" do
|
|
51
|
-
allow(
|
|
51
|
+
allow(Reline).to receive(:readline).and_return("a", "exit")
|
|
52
52
|
expect(robot).to receive(:receive).with(body: "a", source: described_class::SOURCE)
|
|
53
53
|
adapter.run
|
|
54
54
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruboty
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryo Nakamura
|
|
@@ -65,6 +65,20 @@ dependencies:
|
|
|
65
65
|
- - ">="
|
|
66
66
|
- !ruby/object:Gem::Version
|
|
67
67
|
version: '0'
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: reline
|
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
|
71
|
+
requirements:
|
|
72
|
+
- - ">="
|
|
73
|
+
- !ruby/object:Gem::Version
|
|
74
|
+
version: '0'
|
|
75
|
+
type: :runtime
|
|
76
|
+
prerelease: false
|
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
78
|
+
requirements:
|
|
79
|
+
- - ">="
|
|
80
|
+
- !ruby/object:Gem::Version
|
|
81
|
+
version: '0'
|
|
68
82
|
- !ruby/object:Gem::Dependency
|
|
69
83
|
name: slop
|
|
70
84
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -128,9 +142,12 @@ executables:
|
|
|
128
142
|
extensions: []
|
|
129
143
|
extra_rdoc_files: []
|
|
130
144
|
files:
|
|
145
|
+
- ".github/release.yml"
|
|
146
|
+
- ".github/workflows/actions.lock"
|
|
147
|
+
- ".github/workflows/bump-request.yml"
|
|
148
|
+
- ".github/workflows/release.yml"
|
|
149
|
+
- ".github/workflows/test.yml"
|
|
131
150
|
- ".gitignore"
|
|
132
|
-
- ".travis.yml"
|
|
133
|
-
- CHANGELOG.md
|
|
134
151
|
- Gemfile
|
|
135
152
|
- LICENSE.txt
|
|
136
153
|
- README.md
|
|
@@ -187,14 +204,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
187
204
|
requirements:
|
|
188
205
|
- - ">="
|
|
189
206
|
- !ruby/object:Gem::Version
|
|
190
|
-
version:
|
|
207
|
+
version: '3.3'
|
|
191
208
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
209
|
requirements:
|
|
193
210
|
- - ">="
|
|
194
211
|
- !ruby/object:Gem::Version
|
|
195
212
|
version: '0'
|
|
196
213
|
requirements: []
|
|
197
|
-
rubygems_version:
|
|
214
|
+
rubygems_version: 4.0.20
|
|
198
215
|
specification_version: 4
|
|
199
216
|
summary: Ruby + Bot = Ruboty
|
|
200
217
|
test_files:
|
data/.travis.yml
DELETED
data/CHANGELOG.md
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
## Unreleased
|
|
2
|
-
|
|
3
|
-
- Use reline gem instead of readline (thx @unasuke)
|
|
4
|
-
- Change required Ruby version from 2.2 to 2.6
|
|
5
|
-
|
|
6
|
-
## 1.3.1
|
|
7
|
-
|
|
8
|
-
- Support unicode spaces like U+00a0 (thx @sugi)
|
|
9
|
-
|
|
10
|
-
## 1.3.0
|
|
11
|
-
|
|
12
|
-
- Add --daemonize option
|
|
13
|
-
- Add --pid option
|
|
14
|
-
- Require Ruby 2.2.2 or later for ActiveSupport
|
|
15
|
-
|
|
16
|
-
## 1.2.4
|
|
17
|
-
|
|
18
|
-
- Improve help command output (thx @k0kubun)
|
|
19
|
-
|
|
20
|
-
## 1.2.3
|
|
21
|
-
|
|
22
|
-
- User default Logger class (thx @eagletmt)
|
|
23
|
-
|
|
24
|
-
## 1.2.2
|
|
25
|
-
|
|
26
|
-
- Support ^D on shell adapter (thx @suu-g)
|
|
27
|
-
|
|
28
|
-
## 1.2.1
|
|
29
|
-
|
|
30
|
-
- Refer Bundler from top-level
|
|
31
|
-
|
|
32
|
-
## 1.2.0
|
|
33
|
-
|
|
34
|
-
- Add DISABLE_DEFAULT_HANDLERS env
|
|
35
|
-
- Get away from help message indentation
|
|
36
|
-
- Support filter query on help handler (e.g. `@ruboty help ping`)
|
|
37
|
-
|
|
38
|
-
## 1.1.9
|
|
39
|
-
|
|
40
|
-
- Support slop both version 3 and 4
|
|
41
|
-
|
|
42
|
-
## 1.1.8
|
|
43
|
-
|
|
44
|
-
- Fix shell adapter
|
|
45
|
-
|
|
46
|
-
## 1.1.7
|
|
47
|
-
|
|
48
|
-
- Enable sync option of stdout to prevent buffering
|
|
49
|
-
|
|
50
|
-
## 1.1.6
|
|
51
|
-
|
|
52
|
-
- Add LOG_LEVEL env
|
|
53
|
-
|
|
54
|
-
## 1.1.5
|
|
55
|
-
|
|
56
|
-
- Use slop version 4 or higher
|
|
57
|
-
- Fix --load option (thx @amacou)
|
|
58
|
-
|
|
59
|
-
## 1.1.4
|
|
60
|
-
|
|
61
|
-
- Support slop version 4
|
|
62
|
-
|
|
63
|
-
## 1.1.3
|
|
64
|
-
|
|
65
|
-
- Fix slop version (thx @parroty)
|
|
66
|
-
|
|
67
|
-
## 1.1.2
|
|
68
|
-
|
|
69
|
-
- Fix message matching pattern so that "rubotyping" is not responded
|
|
70
|
-
|
|
71
|
-
## 1.1.1
|
|
72
|
-
|
|
73
|
-
- Use action's returned-value to check if :missing action is invoked or not
|
|
74
|
-
|
|
75
|
-
## 1.1.0
|
|
76
|
-
|
|
77
|
-
- Add :missing option for handler to respond with messages that didn't match any handlers
|
|
78
|
-
|
|
79
|
-
## 1.0.4
|
|
80
|
-
|
|
81
|
-
- Support RUBOTY_NAME and obsolete ROBOT_NAME
|
|
82
|
-
|
|
83
|
-
## 1.0.3
|
|
84
|
-
|
|
85
|
-
- Fix help handler
|
|
86
|
-
|
|
87
|
-
## 1.0.2
|
|
88
|
-
|
|
89
|
-
- Add RUBOTY_ENV to change bundled gems with environment
|
|
90
|
-
|
|
91
|
-
## 1.0.1
|
|
92
|
-
|
|
93
|
-
- Ignore if no Gemfile found in current directory or given path
|
|
94
|
-
|
|
95
|
-
## 1.0.0
|
|
96
|
-
|
|
97
|
-
- Rename: Ellen -> Ruboty
|
|
98
|
-
|
|
99
|
-
## 0.2.8
|
|
100
|
-
|
|
101
|
-
- Use Ruboty::Message#from_name in whoami action
|
|
102
|
-
|
|
103
|
-
## 0.2.7
|
|
104
|
-
|
|
105
|
-
- Add Ruboty::Message#from_name for rich chat service
|
|
106
|
-
|
|
107
|
-
## 0.2.6
|
|
108
|
-
|
|
109
|
-
- Add `who am i?` handler
|
|
110
|
-
- Sort commands in help message
|
|
111
|
-
|
|
112
|
-
## 0.2.5
|
|
113
|
-
|
|
114
|
-
- Hide action defined with `:hidden` option in Help message
|
|
115
|
-
|
|
116
|
-
## 0.2.4
|
|
117
|
-
|
|
118
|
-
- Reveal message prefix pattern as a class method
|
|
119
|
-
|
|
120
|
-
## 0.2.3
|
|
121
|
-
|
|
122
|
-
- Help message is formatted if adapter supported
|
|
123
|
-
|
|
124
|
-
## 0.2.2
|
|
125
|
-
|
|
126
|
-
- Now `Ruboty::Robot#say(message)` can use `message[:original]`
|
|
127
|
-
|
|
128
|
-
## 0.2.1
|
|
129
|
-
|
|
130
|
-
- Store shell history in ~/.ruboty_history
|
|
131
|
-
|
|
132
|
-
## 0.2.0
|
|
133
|
-
|
|
134
|
-
- Change adapter & message interface
|
|
135
|
-
|
|
136
|
-
## 0.1.3
|
|
137
|
-
|
|
138
|
-
- Change Ruboty::Message interface
|
|
139
|
-
|
|
140
|
-
## 0.1.2
|
|
141
|
-
|
|
142
|
-
- Make Handler validatable
|
|
143
|
-
|
|
144
|
-
## 0.1.1
|
|
145
|
-
|
|
146
|
-
- Improve Brain interface
|
|
147
|
-
|
|
148
|
-
## 0.1.0
|
|
149
|
-
|
|
150
|
-
- Deprecate --adapter option
|
|
151
|
-
|
|
152
|
-
## 0.0.9
|
|
153
|
-
|
|
154
|
-
- Adapt mention name to `@<name>: <text>` format
|
|
155
|
-
|
|
156
|
-
## 0.0.8
|
|
157
|
-
|
|
158
|
-
- Mount Brain
|
|
159
|
-
- Change handler interface
|
|
160
|
-
|
|
161
|
-
## 0.0.7
|
|
162
|
-
|
|
163
|
-
- Add PING handler
|
|
164
|
-
|
|
165
|
-
## 0.0.6
|
|
166
|
-
|
|
167
|
-
- `ruboty help` to show actions list
|
|
168
|
-
|
|
169
|
-
## 0.0.5
|
|
170
|
-
|
|
171
|
-
- Now Action can access to MatchData object via Message
|
|
172
|
-
- ENV["ROBOT_NAME"] or "ruboty" is default name
|
|
173
|
-
- Robot only responds to mention unless :all option specified
|
|
174
|
-
|
|
175
|
-
## 0.0.4
|
|
176
|
-
|
|
177
|
-
- Add --dotenv option to load .env before running
|
|
178
|
-
|
|
179
|
-
## 0.0.3
|
|
180
|
-
|
|
181
|
-
- Add env DSL to define adapter
|
|
182
|
-
|
|
183
|
-
## 0.0.2
|
|
184
|
-
|
|
185
|
-
- Add Handler DSL Syntax
|
|
186
|
-
- Add --load option to load a ruby file before running
|
|
187
|
-
|
|
188
|
-
## 0.0.1
|
|
189
|
-
|
|
190
|
-
- 1st release
|