sanger_warren 0.4.1 → 0.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/workflows/ruby.yml +2 -2
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +41 -29
- data/README.md +16 -9
- data/lib/warren/framework_adaptor/rails_adaptor.rb +9 -1
- data/lib/warren/version.rb +1 -1
- data/lib/warren.rb +1 -1
- data/sanger-warren.gemspec +1 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdfbee5936ea1a0d909d947261f055d698f4b9b4d343559a9d2fe3432846de95
|
4
|
+
data.tar.gz: 752cf1b26528d531f12786f935526f349d2d9d003c05c9d1c9dba7be5908b062
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbbfd251869fa87a7a3fac8f96ee4f2b5ae0417e6df780ebf6add5a3610fa4502b1f3d72cbf9ac97af27099f3c54801c37d222f9d326211c73217f11fbcb4988
|
7
|
+
data.tar.gz: 834caca1dbd68fea25c1e64da6a2facdc6a68e40cda4a09dc7fb200889445e84f070f66215de6e5bea525ee46c4e7475205c9fd32dfed4360b039d8052e99fab
|
data/.github/workflows/ruby.yml
CHANGED
@@ -10,7 +10,7 @@ jobs:
|
|
10
10
|
runs-on: ubuntu-latest
|
11
11
|
strategy:
|
12
12
|
matrix:
|
13
|
-
ruby: [ '
|
13
|
+
ruby: [ '3.1' ]
|
14
14
|
name: Ruby Test ${{ matrix.ruby }}
|
15
15
|
|
16
16
|
steps:
|
@@ -32,7 +32,7 @@ jobs:
|
|
32
32
|
- name: Set up Ruby
|
33
33
|
uses: ruby/setup-ruby@v1
|
34
34
|
with:
|
35
|
-
ruby-version: 3.
|
35
|
+
ruby-version: 3.1
|
36
36
|
bundler-cache: true # Runs bundle install and caches gems. See the ruby_test.yml
|
37
37
|
# example if you need more control over bundler.
|
38
38
|
- name: Run lint
|
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1.6
|
data/CHANGELOG.md
CHANGED
@@ -5,9 +5,13 @@ Unreleased section to make new releases easy.
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
### Changed
|
9
|
+
|
10
|
+
- The WARREN_TYPE environmental variable can now fully replace the config yaml
|
11
|
+
|
8
12
|
## [0.4.1] - 2022-01-04
|
9
13
|
|
10
|
-
|
14
|
+
### Changed
|
11
15
|
|
12
16
|
- Relaxed version constraints on dependencies
|
13
17
|
|
@@ -31,7 +35,7 @@ Unreleased section to make new releases easy.
|
|
31
35
|
- Warren::Handler::Test and Warren::Handler::Test::Channel no loner respond to
|
32
36
|
`add_exchange`. These methods were undocumented, and unused internally.
|
33
37
|
|
34
|
-
|
38
|
+
### Changed
|
35
39
|
|
36
40
|
- Messages must now implement `#headers`, although simply returning an empty
|
37
41
|
hash is sufficient.
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sanger_warren (0.
|
4
|
+
sanger_warren (0.5.0)
|
5
5
|
bunny (~> 2.17)
|
6
6
|
connection_pool (~> 2.2)
|
7
7
|
multi_json (~> 1.0)
|
@@ -10,32 +10,43 @@ PATH
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activemodel (
|
14
|
-
activesupport (=
|
15
|
-
activerecord (
|
16
|
-
activemodel (=
|
17
|
-
activesupport (=
|
18
|
-
|
19
|
-
activesupport (
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
activemodel (7.2.2.1)
|
14
|
+
activesupport (= 7.2.2.1)
|
15
|
+
activerecord (7.2.2.1)
|
16
|
+
activemodel (= 7.2.2.1)
|
17
|
+
activesupport (= 7.2.2.1)
|
18
|
+
timeout (>= 0.4.0)
|
19
|
+
activesupport (7.2.2.1)
|
20
|
+
base64
|
21
|
+
benchmark (>= 0.3)
|
22
|
+
bigdecimal
|
23
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
24
|
+
connection_pool (>= 2.2.5)
|
25
|
+
drb
|
26
|
+
i18n (>= 1.6, < 2)
|
27
|
+
logger (>= 1.4.2)
|
28
|
+
minitest (>= 5.1)
|
29
|
+
securerandom (>= 0.3)
|
30
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
31
|
+
amq-protocol (2.3.3)
|
26
32
|
ast (2.4.2)
|
27
|
-
|
28
|
-
|
33
|
+
base64 (0.2.0)
|
34
|
+
benchmark (0.4.0)
|
35
|
+
bigdecimal (3.1.9)
|
36
|
+
bunny (2.24.0)
|
37
|
+
amq-protocol (~> 2.3)
|
29
38
|
sorted_set (~> 1, >= 1.0.2)
|
30
39
|
coderay (1.1.3)
|
31
|
-
concurrent-ruby (1.
|
32
|
-
connection_pool (2.
|
40
|
+
concurrent-ruby (1.3.5)
|
41
|
+
connection_pool (2.5.0)
|
33
42
|
diff-lcs (1.4.4)
|
34
43
|
docile (1.4.0)
|
35
|
-
|
44
|
+
drb (2.2.1)
|
45
|
+
i18n (1.14.7)
|
36
46
|
concurrent-ruby (~> 1.0)
|
47
|
+
logger (1.7.0)
|
37
48
|
method_source (1.0.0)
|
38
|
-
minitest (5.
|
49
|
+
minitest (5.25.5)
|
39
50
|
multi_json (1.15.0)
|
40
51
|
parallel (1.20.1)
|
41
52
|
parser (3.0.1.1)
|
@@ -45,9 +56,9 @@ GEM
|
|
45
56
|
method_source (~> 1.0)
|
46
57
|
rainbow (3.0.0)
|
47
58
|
rake (13.0.3)
|
48
|
-
rbtree (0.4.
|
59
|
+
rbtree (0.4.6)
|
49
60
|
regexp_parser (2.1.1)
|
50
|
-
rexml (3.
|
61
|
+
rexml (3.3.9)
|
51
62
|
rspec (3.10.0)
|
52
63
|
rspec-core (~> 3.10.0)
|
53
64
|
rspec-expectations (~> 3.10.0)
|
@@ -78,7 +89,8 @@ GEM
|
|
78
89
|
rubocop (~> 1.0)
|
79
90
|
rubocop-ast (>= 1.1.0)
|
80
91
|
ruby-progressbar (1.11.0)
|
81
|
-
|
92
|
+
securerandom (0.4.1)
|
93
|
+
set (1.1.1)
|
82
94
|
simplecov (0.21.2)
|
83
95
|
docile (~> 1.1)
|
84
96
|
simplecov-html (~> 0.11)
|
@@ -88,19 +100,19 @@ GEM
|
|
88
100
|
sorted_set (1.0.3)
|
89
101
|
rbtree
|
90
102
|
set (~> 1.0)
|
91
|
-
thor (1.
|
92
|
-
|
93
|
-
tzinfo (
|
94
|
-
|
103
|
+
thor (1.3.2)
|
104
|
+
timeout (0.4.3)
|
105
|
+
tzinfo (2.0.6)
|
106
|
+
concurrent-ruby (~> 1.0)
|
95
107
|
unicode-display_width (2.0.0)
|
96
|
-
yard (0.9.
|
108
|
+
yard (0.9.35)
|
97
109
|
|
98
110
|
PLATFORMS
|
99
111
|
ruby
|
100
112
|
x86_64-darwin-19
|
101
113
|
|
102
114
|
DEPENDENCIES
|
103
|
-
activerecord (~>
|
115
|
+
activerecord (~> 7.2.2.1)
|
104
116
|
pry
|
105
117
|
rake (~> 13.0)
|
106
118
|
rspec (~> 3.0)
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ RabbitMQ via the bunny gem.
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
12
|
-
gem '
|
12
|
+
gem 'sanger_warren'
|
13
13
|
```
|
14
14
|
|
15
15
|
And then execute:
|
@@ -156,15 +156,22 @@ some testing examples can be found in the documentation for the
|
|
156
156
|
|
157
157
|
## Development
|
158
158
|
|
159
|
-
|
160
|
-
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
161
|
-
prompt that will allow you to experiment.
|
159
|
+
Install the required ruby version as specified in `sanger-warren.gemspec`.
|
162
160
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
161
|
+
Install the required bundler version as specified by `BUNDLED WITH` in `Gemfile.lock`.
|
162
|
+
|
163
|
+
After checking out the repo, run `bin/setup` to install dependencies.
|
164
|
+
|
165
|
+
Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
166
|
+
|
167
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
168
|
+
|
169
|
+
To release a new version:
|
170
|
+
|
171
|
+
- update the version number in `version.rb`
|
172
|
+
- run `bundle exec rake release` (which will create a git tag for the version)
|
173
|
+
- push git commits and tags
|
174
|
+
- push the `.gem` file to [rubygems.org](https://rubygems.org) (how?)
|
168
175
|
|
169
176
|
## Contributing
|
170
177
|
|
@@ -100,7 +100,15 @@ module Warren
|
|
100
100
|
|
101
101
|
yield
|
102
102
|
ensure
|
103
|
-
ActiveRecord::Base.clear_active_connections
|
103
|
+
# Although Rails 7.2 recommends using `ActiveRecord::Base.connection_handler.clear_active_connections!`
|
104
|
+
# to clear all active connections (especially in applications with multiple databases),
|
105
|
+
# Y25-234 investigated the performance and applicability of this versus
|
106
|
+
# `ActiveRecord::Base.connection_pool.release_connection`.
|
107
|
+
#
|
108
|
+
# Since Unified Warehouse (the primary Warren consumer) does not use multiple databases,
|
109
|
+
# `release_connection` was found to be more targeted and performant.
|
110
|
+
# Using `clear_active_connections!` would be redundant and potentially less efficient in this context.
|
111
|
+
ActiveRecord::Base.connection_pool.release_connection
|
104
112
|
end
|
105
113
|
|
106
114
|
# Returns the rails environment
|
data/lib/warren/version.rb
CHANGED
data/lib/warren.rb
CHANGED
@@ -29,7 +29,7 @@ module Warren
|
|
29
29
|
#
|
30
30
|
# @return [Warren::Handler::Base] Exact class determined by the type passed in
|
31
31
|
#
|
32
|
-
def self.construct(type
|
32
|
+
def self.construct(type: 'UNSPECIFIED', config: {})
|
33
33
|
warren_type = ENV.fetch(WARREN_TYPE, type)
|
34
34
|
case warren_type
|
35
35
|
when 'test' then Warren::Handler::Test.new
|
data/sanger-warren.gemspec
CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
the ability to switch in different adapters during testing and development.
|
15
15
|
DESCRIPTION
|
16
16
|
spec.homepage = 'https://github.com/sanger/warren'
|
17
|
-
spec.required_ruby_version = Gem::Requirement.new('>=
|
17
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
|
18
18
|
spec.license = 'GPL'
|
19
19
|
|
20
20
|
spec.metadata['homepage_uri'] = spec.homepage
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sanger_warren
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Glover
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bunny
|
@@ -80,6 +80,7 @@ files:
|
|
80
80
|
- ".gitignore"
|
81
81
|
- ".rspec"
|
82
82
|
- ".rubocop.yml"
|
83
|
+
- ".ruby-version"
|
83
84
|
- ".yardopts"
|
84
85
|
- CHANGELOG.md
|
85
86
|
- Gemfile
|
@@ -141,7 +142,7 @@ metadata:
|
|
141
142
|
changelog_uri: https://github.com/sanger/warren/blob/master/CHANGELOG.md
|
142
143
|
documentation_uri: https://rubydoc.info/gems/sanger_warren
|
143
144
|
rubygems_mfa_required: 'true'
|
144
|
-
post_install_message:
|
145
|
+
post_install_message:
|
145
146
|
rdoc_options: []
|
146
147
|
require_paths:
|
147
148
|
- lib
|
@@ -149,15 +150,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
149
150
|
requirements:
|
150
151
|
- - ">="
|
151
152
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
153
|
+
version: 3.1.0
|
153
154
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
154
155
|
requirements:
|
155
156
|
- - ">="
|
156
157
|
- !ruby/object:Gem::Version
|
157
158
|
version: '0'
|
158
159
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
160
|
-
signing_key:
|
160
|
+
rubygems_version: 3.3.27
|
161
|
+
signing_key:
|
161
162
|
specification_version: 4
|
162
163
|
summary: Configuring and managing bunny RabbitMQ connections
|
163
164
|
test_files: []
|