hexx 3.2.1 → 4.0.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/.rubocop.yml +4 -2
- data/README.rdoc +6 -5
- data/lib/hexx/null.rb +1 -1
- data/lib/hexx/service.rb +2 -2
- data/lib/hexx/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaff6d822dd7f231f89ffba298094e1a311d1e26
|
4
|
+
data.tar.gz: f01924567547d0783d8b115a704bd3db1df2712d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 120122ede3804bc647773a57acb7c77cd5f12e68400a4e9bc75a5c1aef7779bc20c2e02c963577c3fb54a4fddb074900bb7e9492ef799f64f88893cd878c6c66
|
7
|
+
data.tar.gz: 2491a49115d87e35d4d6c0d3ec06ae8a1291c49e5a57ac10d931e863f75b2e1bb19fff4f09b565d7b1a2de22a339cfc67add03d0ecf9a83cd655de9962b571de
|
data/.rubocop.yml
CHANGED
@@ -25,6 +25,9 @@ Style/Documentation:
|
|
25
25
|
Exclude:
|
26
26
|
- 'spec/**/*'
|
27
27
|
|
28
|
+
Style/EmptyLinesAroundBlockBody:
|
29
|
+
Enabled: false
|
30
|
+
|
28
31
|
Style/EmptyLinesAroundClassBody:
|
29
32
|
Enabled: false
|
30
33
|
|
@@ -35,8 +38,7 @@ Style/EmptyLinesAroundModuleBody:
|
|
35
38
|
Enabled: false
|
36
39
|
|
37
40
|
Style/EmptyLineBetweenDefs:
|
38
|
-
|
39
|
-
- 'spec/**/*'
|
41
|
+
Enabled: false
|
40
42
|
|
41
43
|
Style/RaiseArgs:
|
42
44
|
EnforcedStyle: compact
|
data/README.rdoc
CHANGED
@@ -62,11 +62,12 @@ A typical service object is shown below:
|
|
62
62
|
|
63
63
|
# runs a service
|
64
64
|
def run
|
65
|
-
#
|
66
|
-
escape
|
67
|
-
|
68
|
-
|
69
|
-
|
65
|
+
# re-raises StandardErrors as Hexx::Service::Invalid
|
66
|
+
escape { MyModel.save! }
|
67
|
+
rescue => err # Hexx::Service::Invalid only
|
68
|
+
publish :error, err.messages
|
69
|
+
else
|
70
|
+
publish :success
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
data/lib/hexx/null.rb
CHANGED
@@ -7,7 +7,7 @@ module Hexx
|
|
7
7
|
# The intro to null object pattern from Dan Croak.
|
8
8
|
# @see http://devblog.avdi.org/2011/05/30/null-objects-and-falsiness/
|
9
9
|
# The post of Avdi Grimm on null object falsiness problem.
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# Except for some special cases (see examples below) calling any method
|
12
12
|
# returns the +Null+ itself.
|
13
13
|
#
|
data/lib/hexx/service.rb
CHANGED
data/lib/hexx/version.rb
CHANGED