active_interaction 3.6.0 → 3.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +7 -8
- data/lib/active_interaction/errors.rb +3 -3
- data/lib/active_interaction/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1f2275eefa77d0a7af95d2537668610cafb348cb29386c06982b90758bcef0e0
|
4
|
+
data.tar.gz: d9be7e4426d65bf090375fbff7a6029d2d262cd00276518723358b343e17b108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b18bce2073a060c54cb3423089f4deef7f8f8d819724dfed87ee7723e54d7d56055455efe502b4a7d12f33b321b8c15382aca70797dc2a38664213bf2dd65ba
|
7
|
+
data.tar.gz: d6529e228bc09d7b29577d59da4bda6ebf15890eada0afcee39f9301ce82872f109b291da5009833dfe64db0ed09530f215a9937259d03c5ce0096fb8ff0aa19
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@ ActiveInteraction manages application-specific business logic.
|
|
4
4
|
It's an implementation of the command pattern in Ruby.
|
5
5
|
|
6
6
|
[![Version](https://badge.fury.io/rb/active_interaction.svg)](https://rubygems.org/gems/active_interaction)
|
7
|
-
[![Build](https://travis-ci.org/
|
7
|
+
[![Build](https://travis-ci.org/AaronLasseigne/active_interaction.svg?branch=master)](https://travis-ci.org/orgsync/active_interaction)
|
8
8
|
[![Coverage](https://coveralls.io/repos/github/orgsync/active_interaction/badge.svg?branch=master)](https://coveralls.io/r/orgsync/active_interaction)
|
9
9
|
[![Climate](https://codeclimate.com/github/orgsync/active_interaction/badges/gpa.svg)](https://codeclimate.com/github/orgsync/active_interaction)
|
10
10
|
[![Dependencies](https://gemnasium.com/orgsync/active_interaction.svg)](https://gemnasium.com/orgsync/active_interaction)
|
@@ -16,8 +16,6 @@ you write safer code by validating that your inputs conform to your
|
|
16
16
|
expectations. If ActiveModel deals with your nouns, then ActiveInteraction
|
17
17
|
handles your verbs.
|
18
18
|
|
19
|
-
Read more on [the project page][] or check out [the full documentation][].
|
20
|
-
|
21
19
|
- [Installation](#installation)
|
22
20
|
- [Basic usage](#basic-usage)
|
23
21
|
- [Validations](#validations)
|
@@ -62,6 +60,8 @@ Read more on [the project page][] or check out [the full documentation][].
|
|
62
60
|
- [Translations](#translations)
|
63
61
|
- [Credits](#credits)
|
64
62
|
|
63
|
+
[Full Documentation][]
|
64
|
+
|
65
65
|
## Installation
|
66
66
|
|
67
67
|
Add it to your Gemfile:
|
@@ -1453,18 +1453,17 @@ available on GitHub.
|
|
1453
1453
|
|
1454
1454
|
ActiveInteraction is licensed under [the MIT License][].
|
1455
1455
|
|
1456
|
-
[activeinteraction]: https://github.com/
|
1457
|
-
[
|
1458
|
-
[the full documentation]: http://rubydoc.info/github/orgsync/active_interaction
|
1456
|
+
[activeinteraction]: https://github.com/AaronLasseigne/active_interaction
|
1457
|
+
[Full Documentation]: http://rubydoc.info/github/orgsync/active_interaction
|
1459
1458
|
[semantic versioning]: http://semver.org/spec/v2.0.0.html
|
1460
|
-
[GitHub releases]: https://github.com/
|
1459
|
+
[GitHub releases]: https://github.com/AaronLasseigne/active_interaction/releases
|
1461
1460
|
[the announcement post]: http://devblog.orgsync.com/2015/05/06/announcing-active-interaction-2/
|
1462
1461
|
[active_model-errors_details]: https://github.com/cowbell/active_model-errors_details
|
1463
1462
|
[aaron lasseigne]: https://github.com/AaronLasseigne
|
1464
1463
|
[taylor fausak]: https://github.com/tfausak
|
1465
1464
|
[orgsync]: https://github.com/orgsync
|
1466
1465
|
[our contribution guidelines]: CONTRIBUTING.md
|
1467
|
-
[complete list of contributors]: https://github.com/
|
1466
|
+
[complete list of contributors]: https://github.com/AaronLasseigne/active_interaction/graphs/contributors
|
1468
1467
|
[the mit license]: LICENSE.md
|
1469
1468
|
[formtastic]: https://rubygems.org/gems/formtastic
|
1470
1469
|
[simple_form]: https://rubygems.org/gems/simple_form
|
@@ -134,7 +134,7 @@ module ActiveInteraction
|
|
134
134
|
if attribute?(attribute) || attribute == :base
|
135
135
|
add(attribute, error, detail) unless added?(attribute, error, detail)
|
136
136
|
else
|
137
|
-
translated_error = translate(other, attribute, error)
|
137
|
+
translated_error = translate(other, attribute, error, detail)
|
138
138
|
message = full_message(attribute, translated_error)
|
139
139
|
attribute = :base
|
140
140
|
add(attribute, message) unless added?(attribute, message)
|
@@ -145,9 +145,9 @@ module ActiveInteraction
|
|
145
145
|
@base.respond_to?(attribute)
|
146
146
|
end
|
147
147
|
|
148
|
-
def translate(other, attribute, error)
|
148
|
+
def translate(other, attribute, error, detail)
|
149
149
|
if error.is_a?(Symbol)
|
150
|
-
other.generate_message(attribute, error)
|
150
|
+
other.generate_message(attribute, error, detail)
|
151
151
|
else
|
152
152
|
error
|
153
153
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_interaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.6.
|
4
|
+
version: 3.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Lasseigne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-11-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -275,7 +275,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
275
275
|
version: '0'
|
276
276
|
requirements: []
|
277
277
|
rubyforge_project:
|
278
|
-
rubygems_version: 2.
|
278
|
+
rubygems_version: 2.7.2
|
279
279
|
signing_key:
|
280
280
|
specification_version: 4
|
281
281
|
summary: Manage application specific business logic.
|