coach 3.0.0 → 3.0.1

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
2
  SHA256:
3
- metadata.gz: 9fbde870cfebdaad825256983d4ef36b9b413e9f22495a16ba09be11ff17f61b
4
- data.tar.gz: ddb38d9c732b21937cd5a9f6ad7c3693531d8973b49939250771b251976054ba
3
+ metadata.gz: b856ca96430e985e877986007588466ee8f9e88c28922bbe04cd11b3fdb4fbbd
4
+ data.tar.gz: e81299bebd9725a6312de76d3fc4bd8adb73d518cbbd846d222309c6656b3430
5
5
  SHA512:
6
- metadata.gz: eac833c21c43ba291a7e68506d1378d22b64dbc2aeeb2899f02db9ae68b6a9390e7231598ed4197465807f5958decfd3403c02db01526f48d8978366ae279d2d
7
- data.tar.gz: 8a4b8dbd37680569451d321219e3b157fc202d72a368e9855b477997c8fc42f17a026ca7fe1ce445766f8af55a77f79d1e8a81b1384855b954de15b463e38bf0
6
+ metadata.gz: b855a60f92ba081cbce364d8c900106372370288a2683691c3f155ad7ad4a826a56e46ac024f253a9f64f212faabf88779c0b40b20ff709a1ec1780e7baebb83
7
+ data.tar.gz: ffa8f6e7a854093c66c826bb4bbb5b32fec0e3daf120e8dc131590175af0a94181af8a494efdfd4232cf0d813aec4db34e73e8c78297dc678656066c855a35fa
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  # Unreleased
4
4
 
5
+ # 3.0.1 / 2022-03-09
6
+
7
+ * [#120](https://github.com/gocardless/coach/pull/120) Fixes missing method from middleware in Rails 7
8
+
5
9
  # 3.0.0 / 2021-09-09
6
10
 
7
11
  * [#105](https://github.com/gocardless/coach/pull/105) Add support for module/class names to be
data/lib/coach/handler.rb CHANGED
@@ -93,7 +93,7 @@ module Coach
93
93
  end
94
94
 
95
95
  def middleware
96
- @middleware ||= ActiveSupport::Dependencies.constantize(name)
96
+ @middleware ||= ActiveSupport::Inflector.constantize(name)
97
97
  end
98
98
 
99
99
  # Remove middleware that have been included multiple times with the same
data/lib/coach/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Coach
4
- VERSION = "3.0.0"
4
+ VERSION = "3.0.1"
5
5
  end
@@ -47,14 +47,14 @@ describe Coach::Handler do
47
47
  subject(:handler) { described_class.new(terminal_middleware.name, handler: true) }
48
48
 
49
49
  before do
50
- allow(ActiveSupport::Dependencies).to receive(:constantize).and_call_original
51
- allow(ActiveSupport::Dependencies).to receive(:constantize).
50
+ allow(ActiveSupport::Inflector).to receive(:constantize).and_call_original
51
+ allow(ActiveSupport::Inflector).to receive(:constantize).
52
52
  with(terminal_middleware.name).
53
53
  and_return(terminal_middleware)
54
54
  end
55
55
 
56
56
  it "does not load the route when initialized" do
57
- expect(ActiveSupport::Dependencies).
57
+ expect(ActiveSupport::Inflector).
58
58
  to_not receive(:constantize).with(terminal_middleware.name)
59
59
 
60
60
  handler
@@ -86,10 +86,10 @@ describe Coach::Router do
86
86
  let(:resource_routes) { Routes::Thing.name }
87
87
 
88
88
  before do
89
- allow(ActiveSupport::Dependencies).to receive(:constantize).and_call_original
89
+ allow(ActiveSupport::Inflector).to receive(:constantize).and_call_original
90
90
 
91
91
  routes.each do |class_name|
92
- allow(ActiveSupport::Dependencies).to receive(:constantize).
92
+ allow(ActiveSupport::Inflector).to receive(:constantize).
93
93
  with("Routes::Thing::#{class_name}").
94
94
  and_return(Routes::Thing.const_get(class_name))
95
95
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coach
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-25 00:00:00.000000000 Z
11
+ date: 2022-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack