itsf_services 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/itsf/services/v2/service/base.rb +12 -0
- data/lib/itsf/services/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 220b9b70226b8600cac1025fd9b69540de6dce01
|
4
|
+
data.tar.gz: 99e4634d4ca1e3fa24df5f33e5619b9d06947d53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da7c465016d0a6c28b962bb9e5fdeb855430dcf8ccfc58fd8299160e7405f23fe6f90a5cb035229f5dbaba4596e228992b59eb3e523807ea74dcf71079db804d
|
7
|
+
data.tar.gz: c43dbc24afee9ddbf06fd0e1de10e845b477e595fc89453ac439847be1232560c1652ffe2effcddb2dba5ffc36bd0969cf2549624d43f1aac65e5eff54367292
|
@@ -63,6 +63,18 @@ module Itsf
|
|
63
63
|
@response
|
64
64
|
end
|
65
65
|
|
66
|
+
def say(message, options = {})
|
67
|
+
options.reverse_merge!(indent: 0)
|
68
|
+
indent = options.delete(:indent)
|
69
|
+
puts "[#{self.class.name}]: #{' ' * indent}#{message}"
|
70
|
+
true
|
71
|
+
end
|
72
|
+
|
73
|
+
def add_error_and_say(attribute, message, options = {})
|
74
|
+
errors.add(attribute, message)
|
75
|
+
say(message, options)
|
76
|
+
end
|
77
|
+
|
66
78
|
def set_errors_on_response
|
67
79
|
@response.send(:'errors=', @errors)
|
68
80
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: itsf_services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|