helpstation 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/lib/helpstation/observer.rb +24 -0
- data/lib/helpstation/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9cceaab45a14e7a0acfdcdd1bbaeef1cc2376ee0
|
4
|
+
data.tar.gz: 1ce5b5603b3f88525659746a292586bfca6ef009
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15c04bc9d11bc1ff196864b2421266552e1dd448ecf1a6f564d640f0cc238339cef91acfa085ab483bad35db14e7592d95c84298457de76e9c186606292aa567
|
7
|
+
data.tar.gz: 27719e478e3192391902a89306fd585def4d415884159b972ca7d587d8b6fb52911f570cacbd27f0bf9ea5a24b81bd8df272f693121160087af8839471da6e87
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2
|
data/lib/helpstation/observer.rb
CHANGED
@@ -32,4 +32,28 @@ module Helpstation
|
|
32
32
|
@response.success?
|
33
33
|
end
|
34
34
|
end
|
35
|
+
|
36
|
+
class SuccessObserver < Observer
|
37
|
+
# Perform the observer when the response is successful
|
38
|
+
#
|
39
|
+
# @param [Substation::Response]
|
40
|
+
# the response returned when calling the action
|
41
|
+
#
|
42
|
+
# @api private
|
43
|
+
def self.call(response)
|
44
|
+
super if response.success?
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
class ErrorObserver < Observer
|
49
|
+
# Perform the observer when the response is not successful
|
50
|
+
#
|
51
|
+
# @param [Substation::Response]
|
52
|
+
# the response returned when calling the action
|
53
|
+
#
|
54
|
+
# @api private
|
55
|
+
def self.call(response)
|
56
|
+
super if !response.success?
|
57
|
+
end
|
58
|
+
end
|
35
59
|
end
|
data/lib/helpstation/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: helpstation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Indrek Juhkam
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: substation
|
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
73
73
|
version: '0'
|
74
74
|
requirements: []
|
75
75
|
rubyforge_project:
|
76
|
-
rubygems_version: 2.
|
76
|
+
rubygems_version: 2.4.2
|
77
77
|
signing_key:
|
78
78
|
specification_version: 4
|
79
79
|
summary: ''
|