coach 0.5.1 → 0.5.2

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
  SHA1:
3
- metadata.gz: 5f0c3cad8cac567d6a7896cb42598f1c9215cb92
4
- data.tar.gz: a235b7b236bede96cb741f6a660fcb5a1a52790b
3
+ metadata.gz: 55ee934083e8a8e015a13a1bab92877e1643475e
4
+ data.tar.gz: c54472da279b95b157b4c446d611be3fdaa5127b
5
5
  SHA512:
6
- metadata.gz: 5211eac40826156ceb6687ecaa985d06b2173f09d1d6615b3439ac892ab2d9e823c21ee205cf4b4f74d52e289268b94def61ea4f37a35292cddf1f84ec21bd01
7
- data.tar.gz: 514d4e0cde81513cc7d8386c926fca8ad7115bf8bc61e58e1cd5153d7cfa1a87069feddfa0eb9ca5f20066f270062da55c8739356d887e6cb576dea154dca029
6
+ metadata.gz: f3d692848efe36f3a591af122a3f8393a9dddae02f6cd38c122f80b37d8dc4b49512ae00b9700734b15f5be72b4f731aa49486d09185975590b1bf894631e6c2
7
+ data.tar.gz: 9fde65cf951062595231bee30227b44d083543fd84435f21b034f4a87877290918de21bce3b0cb2ff0598028d6def49696da53eeb313cac7fbfeb23cd5590d91
@@ -44,7 +44,7 @@ Metrics/CyclomaticComplexity:
44
44
  Metrics/PerceivedComplexity:
45
45
  Max: 10
46
46
 
47
- Style/AccessorMethodName:
47
+ Naming/AccessorMethodName:
48
48
  Enabled: false
49
49
 
50
50
  # Allow non-ASCII characters (e.g. £) in comments
@@ -92,7 +92,7 @@ Layout/MultilineOperationIndentation:
92
92
  Enabled: false
93
93
 
94
94
  # Configuration parameters: NamePrefix, NamePrefixBlacklist.
95
- Style/PredicateName:
95
+ Naming/PredicateName:
96
96
  Enabled: false
97
97
 
98
98
  Style/RedundantSelf:
@@ -112,3 +112,6 @@ Style/TrivialAccessors:
112
112
  Metrics/BlockLength:
113
113
  Exclude:
114
114
  - "**/*_spec.rb"
115
+
116
+ Lint/RescueWithoutErrorClass:
117
+ Enabled: false
@@ -1,43 +1,45 @@
1
1
  # CHANGELOG
2
2
 
3
+ * [#29](https://github.com/gocardless/coach/pull/29) Replace Coach.require_matchers! with actual require
4
+
3
5
  # 0.5.1 / 2017-08-21
4
6
 
5
- * [https://github.com/gocardless/coach/pull/26](#26) Add `started_at` to the
7
+ * [#26](https://github.com/gocardless/coach/pull/26) Add `started_at` to the
6
8
  request event metadata.
7
9
 
8
10
  # 0.5.0 / 2017-08-07
9
11
 
10
- * [https://github.com/gocardless/coach/pull/24](#24) Use
12
+ * [#24](https://github.com/gocardless/coach/pull/24) Use
11
13
  ActiveSupport.instrument for coach.handler.finish event. Potentially breaking
12
14
  change as the coach.handler.finish subscribers may trigger twice, depending on
13
15
  how users have subscribed to them.
14
16
 
15
17
  # 0.4.6
16
18
 
17
- * [https://github.com/gocardless/coach/pull/22](#22) Publish ActiveSupport notifications
19
+ * [#22](https://github.com/gocardless/coach/pull/22) Publish ActiveSupport notifications
18
20
  even on errors
19
21
 
20
22
  # 0.4.5 / 2017-04-26
21
23
 
22
- * [https://github.com/gocardless/coach/pull/17] Only require rspec/expectations
24
+ * [#17](https://github.com/gocardless/coach/pull/17) Only require rspec/expectations
23
25
  when adding new matchers
24
- * [https://github.com/gocardless/coach/pull/18] Properly pin version of rubocop
26
+ * [#18](https://github.com/gocardless/coach/pull/18) Properly pin version of rubocop
25
27
 
26
28
  # 0.4.4 / 2016-08-26
27
29
 
28
- * [https://github.com/gocardless/coach/pull/16] Fix middleware lookup issue in router
30
+ * [#16](https://github.com/gocardless/coach/pull/16) Fix middleware lookup issue in router
29
31
 
30
32
  # 0.4.3 / 2016-05-07
31
33
 
32
- * [https://github.com/gocardless/coach/pull/15] Clean up `Coach::Handler#inspect`
34
+ * [#15](https://github.com/gocardless/coach/pull/15) Clean up `Coach::Handler#inspect`
33
35
 
34
36
  # 0.4.2 / 2016-05-07
35
37
 
36
- * [https://github.com/gocardless/coach/pull/13] Add support for Rails 5.
38
+ * [#13](https://github.com/gocardless/coach/pull/13) Add support for Rails 5.
37
39
 
38
40
  # 0.4.1 / 2016-03-09
39
41
 
40
- * [https://github.com/gocardless/coach/pull/10] Removed a dependency that Coach's RSpec matchers had on Rails' `.third` array method.
42
+ * [#10](https://github.com/gocardless/coach/pull/10) Removed a dependency that Coach's RSpec matchers had on Rails' `.third` array method.
41
43
 
42
44
  # 0.4.0 / 2015-12-21
43
45
 
data/README.md CHANGED
@@ -181,6 +181,10 @@ Each middleware is encouraged to rely on data passed through the `provide`/`requ
181
181
  syntax exclusively, except in stateful operations (such as database queries). By sticking
182
182
  to this rule, testing becomes as simple as mocking a `context` hash.
183
183
 
184
+ Coach comes with some RSpec matchers to help simplify your testing, however they aren't
185
+ required by default. You'll need to run `require 'coach/rspec'`, we recommend putting this
186
+ in your `spec/spec_helper.rb` or `spec/rails_helper.rb` file.
187
+
184
188
  ```ruby
185
189
  require 'spec_helper'
186
190
 
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
  require 'coach/version'
@@ -23,5 +21,5 @@ Gem::Specification.new do |spec|
23
21
  spec.add_development_dependency 'rspec', '~> 3.2'
24
22
  spec.add_development_dependency 'rspec-its', '~> 1.2'
25
23
  spec.add_development_dependency 'pry', '~> 0.10'
26
- spec.add_development_dependency 'rubocop', '~> 0.49.1'
24
+ spec.add_development_dependency 'rubocop', '~> 0.50.0'
27
25
  end
@@ -14,6 +14,8 @@ require_relative 'coach/version'
14
14
 
15
15
  module Coach
16
16
  def self.require_matchers!
17
- require_relative 'spec/matchers'
17
+ puts "Calling Coach.require_matchers! is deprecated, " \
18
+ "please use `require 'coach/rspec'` instead"
19
+ require_relative 'coach/rspec'
18
20
  end
19
21
  end
File without changes
@@ -1,3 +1,3 @@
1
1
  module Coach
2
- VERSION = '0.5.1'.freeze
2
+ VERSION = '0.5.2'.freeze
3
3
  end
@@ -1,8 +1,7 @@
1
1
  require 'rspec/its'
2
2
  require 'pry'
3
- require_relative '../lib/coach'
4
-
5
- Coach.require_matchers!
3
+ require 'coach'
4
+ require 'coach/rspec'
6
5
 
7
6
  RSpec.configure do |config|
8
7
  config.expect_with :rspec do |expectations|
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: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-21 00:00:00.000000000 Z
11
+ date: 2017-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.49.1
89
+ version: 0.50.0
90
90
  type: :development
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: 0.49.1
96
+ version: 0.50.0
97
97
  description:
98
98
  email:
99
99
  - developers@gocardless.com
@@ -120,8 +120,8 @@ files:
120
120
  - lib/coach/request_benchmark.rb
121
121
  - lib/coach/request_serializer.rb
122
122
  - lib/coach/router.rb
123
+ - lib/coach/rspec.rb
123
124
  - lib/coach/version.rb
124
- - lib/spec/matchers.rb
125
125
  - spec/lib/coach/handler_spec.rb
126
126
  - spec/lib/coach/middleware_spec.rb
127
127
  - spec/lib/coach/middleware_validator_spec.rb
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  version: '0'
151
151
  requirements: []
152
152
  rubyforge_project:
153
- rubygems_version: 2.6.11
153
+ rubygems_version: 2.6.13
154
154
  signing_key:
155
155
  specification_version: 4
156
156
  summary: Alternative controllers built with middleware