lita 4.7.1 → 4.8.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +5 -7
- data/Rakefile +0 -7
- data/lib/lita/adapter.rb +1 -1
- data/lib/lita/handler/common.rb +1 -1
- data/lib/lita/handlers/info.rb +5 -1
- data/lib/lita/template.rb +1 -1
- data/lib/lita/version.rb +1 -1
- data/lita.gemspec +13 -13
- data/script/ci +4 -0
- data/spec/lita/configuration_builder_spec.rb +9 -0
- data/spec/lita/handler/http_router_spec.rb +1 -1
- data/spec/lita/robot_spec.rb +9 -0
- data/spec/lita_spec.rb +7 -0
- data/spec/spec_helper.rb +0 -5
- metadata +34 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f20cc77c412f1649c46ec2b8ffad7ebdf91310ec1c5985983faaabe8888f2c3f
|
4
|
+
data.tar.gz: 74d03bf2b6d3ce8b20ae84c3b56f20641a78a439a24bca26d55e952eadd0bc1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0926727362e120bb091d2f34721d2d486190acdc78b7f0a0fc92ba032934032bc0f501b04133e953fa6e26f79bb4bb69c9b6fca9bdca711c9f16493ec67f8072'
|
7
|
+
data.tar.gz: 2cd9def0da8c9fbb63c9fa96233886f6eb656391a39924d8d9210668b8e47335e35bbd072b393a7d1a7d9e4a8640ed9ab3da3061dd3aee1ef0d163844ae0f2f1
|
data/.travis.yml
CHANGED
@@ -2,17 +2,15 @@ language: ruby
|
|
2
2
|
sudo: false
|
3
3
|
cache: bundler
|
4
4
|
rvm:
|
5
|
-
- 2.
|
6
|
-
- 2.
|
7
|
-
- 2.
|
8
|
-
- jruby
|
9
|
-
- rbx-2
|
5
|
+
- 2.5
|
6
|
+
- 2.6
|
7
|
+
- 2.7
|
8
|
+
- jruby
|
10
9
|
matrix:
|
11
10
|
allow_failures:
|
12
11
|
- rvm: jruby-9.0.0.0
|
13
|
-
- rvm: rbx-2
|
14
12
|
fast_finish: true
|
15
|
-
script:
|
13
|
+
script: script/ci
|
16
14
|
before_install:
|
17
15
|
- gem update --system
|
18
16
|
- gem update bundler
|
data/Rakefile
CHANGED
data/lib/lita/adapter.rb
CHANGED
@@ -47,7 +47,7 @@ module Lita
|
|
47
47
|
# @param hash [Hash] An optional hash of values to be interpolated in the string.
|
48
48
|
# @return [String] The translated string.
|
49
49
|
def translate(key, hash = {})
|
50
|
-
I18n.translate("lita.adapters.#{namespace}.#{key}", hash)
|
50
|
+
I18n.translate("lita.adapters.#{namespace}.#{key}", **hash)
|
51
51
|
end
|
52
52
|
|
53
53
|
alias_method :t, :translate
|
data/lib/lita/handler/common.rb
CHANGED
@@ -33,7 +33,7 @@ module Lita
|
|
33
33
|
# @return [String] The translated string.
|
34
34
|
# @since 3.0.0
|
35
35
|
def translate(key, hash = {})
|
36
|
-
I18n.translate("lita.handlers.#{namespace}.#{key}", hash)
|
36
|
+
I18n.translate("lita.handlers.#{namespace}.#{key}", **hash)
|
37
37
|
end
|
38
38
|
|
39
39
|
alias_method :t, :translate
|
data/lib/lita/handlers/info.rb
CHANGED
@@ -40,7 +40,11 @@ module Lita
|
|
40
40
|
|
41
41
|
# A hash of information about Redis.
|
42
42
|
def redis_info
|
43
|
-
@redis_info ||=
|
43
|
+
@redis_info ||= begin
|
44
|
+
r = redis.redis
|
45
|
+
r = r.redis while r.respond_to?(:redis)
|
46
|
+
r.info
|
47
|
+
end
|
44
48
|
end
|
45
49
|
|
46
50
|
# The current version of Redis.
|
data/lib/lita/template.rb
CHANGED
data/lib/lita/version.rb
CHANGED
data/lita.gemspec
CHANGED
@@ -18,23 +18,23 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.required_ruby_version = ">= 2.
|
21
|
+
spec.required_ruby_version = ">= 2.5.0"
|
22
22
|
|
23
|
-
spec.add_runtime_dependency "bundler", ">=
|
24
|
-
spec.add_runtime_dependency "faraday", ">= 0
|
25
|
-
spec.add_runtime_dependency "http_router", ">= 0.11
|
26
|
-
spec.add_runtime_dependency "ice_nine", ">= 0.11
|
27
|
-
spec.add_runtime_dependency "i18n", ">=
|
28
|
-
spec.add_runtime_dependency "multi_json", ">= 1.
|
29
|
-
spec.add_runtime_dependency "puma", ">=
|
30
|
-
spec.add_runtime_dependency "rack", ">=
|
31
|
-
spec.add_runtime_dependency "rb-readline", ">= 0.5
|
32
|
-
spec.add_runtime_dependency "redis-namespace", ">= 1.
|
33
|
-
spec.add_runtime_dependency "thor", ">= 0
|
23
|
+
spec.add_runtime_dependency "bundler", ">= 2.0"
|
24
|
+
spec.add_runtime_dependency "faraday", ">= 1.0"
|
25
|
+
spec.add_runtime_dependency "http_router", ">= 0.11"
|
26
|
+
spec.add_runtime_dependency "ice_nine", ">= 0.11"
|
27
|
+
spec.add_runtime_dependency "i18n", ">= 1.8"
|
28
|
+
spec.add_runtime_dependency "multi_json", ">= 1.15"
|
29
|
+
spec.add_runtime_dependency "puma", ">= 4.3"
|
30
|
+
spec.add_runtime_dependency "rack", ">= 2.2"
|
31
|
+
spec.add_runtime_dependency "rb-readline", ">= 0.5"
|
32
|
+
spec.add_runtime_dependency "redis-namespace", ">= 1.7"
|
33
|
+
spec.add_runtime_dependency "thor", ">= 1.0"
|
34
34
|
|
35
35
|
spec.add_development_dependency "rake"
|
36
36
|
spec.add_development_dependency "rack-test"
|
37
|
-
spec.add_development_dependency "rspec"
|
37
|
+
spec.add_development_dependency "rspec"
|
38
38
|
spec.add_development_dependency "simplecov"
|
39
39
|
spec.add_development_dependency "coveralls"
|
40
40
|
spec.add_development_dependency "pry"
|
data/script/ci
ADDED
@@ -3,6 +3,15 @@ require "spec_helper"
|
|
3
3
|
describe Lita::ConfigurationBuilder do
|
4
4
|
let(:config) { subject.build }
|
5
5
|
|
6
|
+
# For some reason RSpec is no longer capturing tracebacks to
|
7
|
+
# stderr, so we do it manually to avoid cluttering the test output.
|
8
|
+
around do |example|
|
9
|
+
stderr = $stderr
|
10
|
+
$stderr = StringIO.new
|
11
|
+
example.run
|
12
|
+
$stderr = stderr
|
13
|
+
end
|
14
|
+
|
6
15
|
describe ".load_user_config" do
|
7
16
|
it "loads and evals lita_config.rb" do
|
8
17
|
allow(File).to receive(:exist?).and_return(true)
|
@@ -92,7 +92,7 @@ describe handler, lita_handler: true do
|
|
92
92
|
it "calls the error handler with the exception as argument" do
|
93
93
|
expect(registry.config.robot.error_handler).to receive(:call).with(instance_of(TypeError))
|
94
94
|
|
95
|
-
expect { http.get("/boom") }.to raise_error(TypeError, "String can't be coerced into
|
95
|
+
expect { http.get("/boom") }.to raise_error(TypeError, "String can't be coerced into Integer")
|
96
96
|
end
|
97
97
|
end
|
98
98
|
end
|
data/spec/lita/robot_spec.rb
CHANGED
@@ -77,6 +77,15 @@ describe Lita::Robot, lita: true do
|
|
77
77
|
describe "#run" do
|
78
78
|
let(:thread) { instance_double("Thread", :abort_on_exception= => true, join: nil) }
|
79
79
|
|
80
|
+
# For some reason RSpec is no longer capturing tracebacks to
|
81
|
+
# stderr, so we do it manually to avoid cluttering the test output.
|
82
|
+
around do |example|
|
83
|
+
stderr = $stderr
|
84
|
+
$stderr = StringIO.new
|
85
|
+
example.run
|
86
|
+
$stderr = stderr
|
87
|
+
end
|
88
|
+
|
80
89
|
before do
|
81
90
|
allow_any_instance_of(Lita::Adapters::Shell).to receive(:run)
|
82
91
|
allow_any_instance_of(Puma::Server).to receive(:run)
|
data/spec/lita_spec.rb
CHANGED
@@ -84,8 +84,15 @@ describe Lita do
|
|
84
84
|
around do |example|
|
85
85
|
test_mode = Lita.test_mode?
|
86
86
|
Lita.test_mode = false
|
87
|
+
|
88
|
+
stderr = $stderr
|
89
|
+
$stderr = StringIO.new
|
90
|
+
|
87
91
|
example.run
|
92
|
+
|
88
93
|
Lita.test_mode = test_mode
|
94
|
+
|
95
|
+
$stderr = stderr
|
89
96
|
end
|
90
97
|
|
91
98
|
it "logs a fatal warning and raises an exception if it can't connect to Redis" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.8.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jimmy Cuadra
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,160 +16,154 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: faraday
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0
|
33
|
+
version: '1.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0
|
40
|
+
version: '1.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: http_router
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.11
|
47
|
+
version: '0.11'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.11
|
54
|
+
version: '0.11'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: ice_nine
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.11
|
61
|
+
version: '0.11'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.11
|
68
|
+
version: '0.11'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: i18n
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '1.8'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '1.8'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: multi_json
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.
|
89
|
+
version: '1.15'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.
|
96
|
+
version: '1.15'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: puma
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - ">="
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: '4.3'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: '4.3'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rack
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version:
|
118
|
-
- - "<"
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: 2.0.0
|
117
|
+
version: '2.2'
|
121
118
|
type: :runtime
|
122
119
|
prerelease: false
|
123
120
|
version_requirements: !ruby/object:Gem::Requirement
|
124
121
|
requirements:
|
125
122
|
- - ">="
|
126
123
|
- !ruby/object:Gem::Version
|
127
|
-
version:
|
128
|
-
- - "<"
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
version: 2.0.0
|
124
|
+
version: '2.2'
|
131
125
|
- !ruby/object:Gem::Dependency
|
132
126
|
name: rb-readline
|
133
127
|
requirement: !ruby/object:Gem::Requirement
|
134
128
|
requirements:
|
135
129
|
- - ">="
|
136
130
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.5
|
131
|
+
version: '0.5'
|
138
132
|
type: :runtime
|
139
133
|
prerelease: false
|
140
134
|
version_requirements: !ruby/object:Gem::Requirement
|
141
135
|
requirements:
|
142
136
|
- - ">="
|
143
137
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.5
|
138
|
+
version: '0.5'
|
145
139
|
- !ruby/object:Gem::Dependency
|
146
140
|
name: redis-namespace
|
147
141
|
requirement: !ruby/object:Gem::Requirement
|
148
142
|
requirements:
|
149
143
|
- - ">="
|
150
144
|
- !ruby/object:Gem::Version
|
151
|
-
version: 1.
|
145
|
+
version: '1.7'
|
152
146
|
type: :runtime
|
153
147
|
prerelease: false
|
154
148
|
version_requirements: !ruby/object:Gem::Requirement
|
155
149
|
requirements:
|
156
150
|
- - ">="
|
157
151
|
- !ruby/object:Gem::Version
|
158
|
-
version: 1.
|
152
|
+
version: '1.7'
|
159
153
|
- !ruby/object:Gem::Dependency
|
160
154
|
name: thor
|
161
155
|
requirement: !ruby/object:Gem::Requirement
|
162
156
|
requirements:
|
163
157
|
- - ">="
|
164
158
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0
|
159
|
+
version: '1.0'
|
166
160
|
type: :runtime
|
167
161
|
prerelease: false
|
168
162
|
version_requirements: !ruby/object:Gem::Requirement
|
169
163
|
requirements:
|
170
164
|
- - ">="
|
171
165
|
- !ruby/object:Gem::Version
|
172
|
-
version: 0
|
166
|
+
version: '1.0'
|
173
167
|
- !ruby/object:Gem::Dependency
|
174
168
|
name: rake
|
175
169
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,14 +198,14 @@ dependencies:
|
|
204
198
|
requirements:
|
205
199
|
- - ">="
|
206
200
|
- !ruby/object:Gem::Version
|
207
|
-
version:
|
201
|
+
version: '0'
|
208
202
|
type: :development
|
209
203
|
prerelease: false
|
210
204
|
version_requirements: !ruby/object:Gem::Requirement
|
211
205
|
requirements:
|
212
206
|
- - ">="
|
213
207
|
- !ruby/object:Gem::Version
|
214
|
-
version:
|
208
|
+
version: '0'
|
215
209
|
- !ruby/object:Gem::Dependency
|
216
210
|
name: simplecov
|
217
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -338,6 +332,7 @@ files:
|
|
338
332
|
- lib/lita/util.rb
|
339
333
|
- lib/lita/version.rb
|
340
334
|
- lita.gemspec
|
335
|
+
- script/ci
|
341
336
|
- spec/lita/adapter_spec.rb
|
342
337
|
- spec/lita/adapters/shell_spec.rb
|
343
338
|
- spec/lita/authorization_spec.rb
|
@@ -396,7 +391,7 @@ homepage: https://github.com/jimmycuadra/lita
|
|
396
391
|
licenses:
|
397
392
|
- MIT
|
398
393
|
metadata: {}
|
399
|
-
post_install_message:
|
394
|
+
post_install_message:
|
400
395
|
rdoc_options: []
|
401
396
|
require_paths:
|
402
397
|
- lib
|
@@ -404,16 +399,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
404
399
|
requirements:
|
405
400
|
- - ">="
|
406
401
|
- !ruby/object:Gem::Version
|
407
|
-
version: 2.
|
402
|
+
version: 2.5.0
|
408
403
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
409
404
|
requirements:
|
410
|
-
- - "
|
405
|
+
- - ">"
|
411
406
|
- !ruby/object:Gem::Version
|
412
|
-
version:
|
407
|
+
version: 1.3.1
|
413
408
|
requirements: []
|
414
|
-
|
415
|
-
|
416
|
-
signing_key:
|
409
|
+
rubygems_version: 3.1.2
|
410
|
+
signing_key:
|
417
411
|
specification_version: 4
|
418
412
|
summary: ChatOps framework for Ruby. Lita is a robot companion for your chat room.
|
419
413
|
test_files:
|