axn 0.1.0.pre.alpha.2.5.3 → 0.1.0.pre.alpha.2.5.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d62aa4b98c8f159761234817e6b2ded26e0fcafa46d07685049d827281e92235
4
- data.tar.gz: d3ffb46353e17db427393049767a6a03fbf3d5b30e94e4011a47397644364c32
3
+ metadata.gz: d67c51bf6cef09cdbfb8246769eefb7c9b1baa3f7d75168d599f898d66d00157
4
+ data.tar.gz: 06d6b82b58b9a65bd1d8da9e68a8a640a5fcf0e1dafdbd5d756ea1d1682f7e95
5
5
  SHA512:
6
- metadata.gz: 54a4ea06f021850cc1d4e1e9bf18a6ec20f495871f23efab20380cd2a8135c52df46099f03281944c4dbe4419c836a72309cfd719e769ae3fd7e48a2ad7683db
7
- data.tar.gz: 474eea3af1b53ad4ae85096a2e39d4b141b01c8c4f239f710cd13de933046d92b7efc67333902c78ed29c882bda5ada0a44e9e2efeab05721681f5ded1633b41
6
+ metadata.gz: a656fe06eec316eb1c974586adec336afe6f09257da62f88789f467fe06f0f3677249fccb1aec7dd83c3328c1cc0ee505640e786b1892338ff0be71723b758c3
7
+ data.tar.gz: 337a92138da80dcf5e00947b4cb00589d689e1dc6dae3340d91e76874e4a335feb3a1ef254c3e6220c6a0d271f49fe8f77f9deea5d731ed1caa3f3c4317c1b42
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  ## Unreleased
4
4
  * N/A
5
5
 
6
+ ## 0.1.0-alpha.2.5.3.1
7
+ * Remove explicit 'require rspec' from `axn/testing/spec_helpers` (must already be loaded)
8
+
6
9
  ## 0.1.0-alpha.2.5.3
7
10
  * More aggressive logging of swallowed exceptions when not in production mode
8
11
  * Make automatic pre/post logging more digestible
@@ -95,11 +95,11 @@ Accepts `error` and/or `success` keys. Values can be a string (returned directl
95
95
  messages success: "All good!", error: ->(e) { "Bad news: #{e.message}" }
96
96
  ```
97
97
 
98
- ## `error_for` and `rescues`
98
+ ## `error_from` and `rescues`
99
99
 
100
100
  While `.messages` sets the _default_ error/success messages and is more commonly used, there are times when you want specific error messages for specific failure cases.
101
101
 
102
- `error_for` and `rescues` both register a matcher (exception class, exception class name (string), or callable) and a message to use if the matcher succeeds. They act exactly the same, except if a matcher registered with `rescues` succeeds, the exception _will not_ trigger the configured exception handlers (global or specific to this class).
102
+ `error_from` and `rescues` both register a matcher (exception class, exception class name (string), or callable) and a message to use if the matcher succeeds. They act exactly the same, except if a matcher registered with `rescues` succeeds, the exception _will not_ trigger the configured exception handlers (global or specific to this class).
103
103
 
104
104
  ```ruby
105
105
  messages error: "bad"
@@ -108,8 +108,8 @@ messages error: "bad"
108
108
  rescues ActiveRecord::InvalidRecord => "Invalid params provided"
109
109
 
110
110
  # These WILL trigger error handler (second demonstrates callable matcher AND message)
111
- error_for ArgumentError, ->(e) { "Argument error: #{e.message}" }
112
- error_for -> { name == "bad" }, -> { "was given bad name: #{name}" }
111
+ error_from ArgumentError, ->(e) { "Argument error: #{e.message}" }
112
+ error_from -> { name == "bad" }, -> { "was given bad name: #{name}" }
113
113
  ```
114
114
 
115
115
  ## Callbacks
@@ -153,7 +153,7 @@ class Foo
153
153
  end
154
154
  ```
155
155
 
156
- Note that by default the `on_exception` block will be applied to _any_ `StandardError` that is raised, but you can specify a matcher using the same logic as for [`error_for` and `rescues`](#error-for-and-rescues):
156
+ Note that by default the `on_exception` block will be applied to _any_ `StandardError` that is raised, but you can specify a matcher using the same logic as for [`error_from` and `rescues`](#error-for-and-rescues):
157
157
 
158
158
  ```ruby
159
159
  class Foo
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "rspec"
4
-
5
3
  module Axn
6
4
  module Testing
7
5
  module SpecHelpers
data/lib/axn/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Axn
4
- VERSION = "0.1.0-alpha.2.5.3"
4
+ VERSION = "0.1.0-alpha.2.5.3.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axn
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.alpha.2.5.3
4
+ version: 0.1.0.pre.alpha.2.5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kali Donovan