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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c860a61cf9cd83f6e1fb193151d500b8db2aaf43
4
- data.tar.gz: 29afa31ceec77c140c7b232f54f8487bc8d7b6b0
2
+ SHA256:
3
+ metadata.gz: f20cc77c412f1649c46ec2b8ffad7ebdf91310ec1c5985983faaabe8888f2c3f
4
+ data.tar.gz: 74d03bf2b6d3ce8b20ae84c3b56f20641a78a439a24bca26d55e952eadd0bc1e
5
5
  SHA512:
6
- metadata.gz: 04b51c4e0b3f0f48bd58820e6d6412b09f32b5a82c91b24a8e51cc308adacdd04dbc72f5fc62abfb39e320189425d5d92c54085f71cdb12697e325ed1eb21aaf
7
- data.tar.gz: 0e990277cd623b5b62f0e092c8ad185de15dedbe5a052b0e013bd56ddf7f0c3064e224b8084f670fa27aca03eedffbb1be80bf8761ccc8ef133e3e69bfc40dec
6
+ metadata.gz: '0926727362e120bb091d2f34721d2d486190acdc78b7f0a0fc92ba032934032bc0f501b04133e953fa6e26f79bb4bb69c9b6fca9bdca711c9f16493ec67f8072'
7
+ data.tar.gz: 2cd9def0da8c9fbb63c9fa96233886f6eb656391a39924d8d9210668b8e47335e35bbd072b393a7d1a7d9e4a8640ed9ab3da3061dd3aee1ef0d163844ae0f2f1
@@ -2,17 +2,15 @@ language: ruby
2
2
  sudo: false
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.0
6
- - 2.1
7
- - 2.2
8
- - jruby-9.0.0.0
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: bundle exec rake
13
+ script: script/ci
16
14
  before_install:
17
15
  - gem update --system
18
16
  - gem update bundler
data/Rakefile CHANGED
@@ -1,8 +1 @@
1
1
  require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rubocop/rake_task"
4
-
5
- RSpec::Core::RakeTask.new
6
- RuboCop::RakeTask.new
7
-
8
- task default: [:spec, :rubocop]
@@ -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
@@ -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
@@ -40,7 +40,11 @@ module Lita
40
40
 
41
41
  # A hash of information about Redis.
42
42
  def redis_info
43
- @redis_info ||= 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.
@@ -23,7 +23,7 @@ module Lita
23
23
 
24
24
  # @param source [String] A string to use as the template's content.
25
25
  def initialize(source)
26
- @erb = ERB.new(source, $SAFE, "<>")
26
+ @erb = ERB.new(source, trim_mode: "<>")
27
27
  self.helpers = Set.new
28
28
  end
29
29
 
@@ -1,4 +1,4 @@
1
1
  module Lita
2
2
  # The current version of Lita.
3
- VERSION = "4.7.1"
3
+ VERSION = "4.8.0.beta1"
4
4
  end
@@ -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.0.0"
21
+ spec.required_ruby_version = ">= 2.5.0"
22
22
 
23
- spec.add_runtime_dependency "bundler", ">= 1.3"
24
- spec.add_runtime_dependency "faraday", ">= 0.8.7"
25
- spec.add_runtime_dependency "http_router", ">= 0.11.2"
26
- spec.add_runtime_dependency "ice_nine", ">= 0.11.0"
27
- spec.add_runtime_dependency "i18n", ">= 0.6.9"
28
- spec.add_runtime_dependency "multi_json", ">= 1.7.7"
29
- spec.add_runtime_dependency "puma", ">= 2.7.1"
30
- spec.add_runtime_dependency "rack", ">= 1.5.2", "< 2.0.0"
31
- spec.add_runtime_dependency "rb-readline", ">= 0.5.1"
32
- spec.add_runtime_dependency "redis-namespace", ">= 1.3.0"
33
- spec.add_runtime_dependency "thor", ">= 0.18.1"
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", ">= 3.0.0"
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"
@@ -0,0 +1,4 @@
1
+ #!/bin/bash
2
+
3
+ bundle exec rspec
4
+ bundle exec rubocop
@@ -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 Fixnum")
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
@@ -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)
@@ -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
@@ -1,9 +1,4 @@
1
1
  require "simplecov"
2
- require "coveralls"
3
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
4
- SimpleCov::Formatter::HTMLFormatter,
5
- Coveralls::SimpleCov::Formatter
6
- ]
7
2
  SimpleCov.start { add_filter "/spec/" }
8
3
 
9
4
  require "pry"
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.7.1
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: 2016-09-16 00:00:00.000000000 Z
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: '1.3'
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: '1.3'
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.8.7
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.8.7
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.2
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.2
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.0
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.0
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: 0.6.9
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: 0.6.9
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.7.7
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.7.7
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: 2.7.1
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: 2.7.1
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: 1.5.2
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: 1.5.2
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.1
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.1
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.3.0
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.3.0
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.18.1
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.18.1
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: 3.0.0
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: 3.0.0
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.0.0
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: '0'
407
+ version: 1.3.1
413
408
  requirements: []
414
- rubyforge_project:
415
- rubygems_version: 2.5.1
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: