finapps 0.13.0.pre → 0.13.1.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/finapps/rest/alert.rb +9 -6
- data/lib/finapps/rest/defaults.rb +1 -1
- data/lib/finapps/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: 8ef6ba809ba7dd91f998cb2045e26a7409ed3d01
|
4
|
+
data.tar.gz: bfef4428cc8429073dad267e98440d5d8d92fd5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0efc7a1009ed9662c5ebec45985a9054076111f71317eb1b37df423441c899a9525430c44554bd18249b1e3c62dcd65c7745ad95b374d06de53b63905f722cc0
|
7
|
+
data.tar.gz: e5e9972f8fb004e699c8b06807a16927fd08c2383f6ef6f85da26fdae16c348274af36f070c60712c6ca61959cb84354a6fdc1a7d233abc4fddb1f2e03434382
|
data/lib/finapps/rest/alert.rb
CHANGED
@@ -7,7 +7,7 @@ module FinApps
|
|
7
7
|
include FinApps::REST::Defaults
|
8
8
|
|
9
9
|
# @return [Hash, Array<String>]
|
10
|
-
def list(page = 1, requested=100, sort='date', asc=false, read=
|
10
|
+
def list(page = 1, requested=100, sort='date', asc=false, read='all')
|
11
11
|
logger.debug "##{__method__.to_s} => Started"
|
12
12
|
|
13
13
|
end_point = Defaults::END_POINTS[:alert_list]
|
@@ -27,19 +27,22 @@ module FinApps
|
|
27
27
|
end
|
28
28
|
|
29
29
|
# @return [Hash, Array<String>]
|
30
|
-
def update(
|
30
|
+
def update(alert_id, read=true)
|
31
31
|
logger.debug "##{__method__.to_s} => Started"
|
32
32
|
|
33
|
-
raise MissingArgumentsError.new 'Missing argument:
|
34
|
-
logger.debug "##{__method__.to_s} =>
|
33
|
+
raise MissingArgumentsError.new 'Missing argument: alert_id.' if alert_id.blank?
|
34
|
+
logger.debug "##{__method__.to_s} => alert_id: #{alert_id.inspect}"
|
35
|
+
raise MissingArgumentsError.new 'Missing argument: alert_id.' if read.blank?
|
36
|
+
logger.debug "##{__method__.to_s} => alert_id: #{read.inspect}"
|
35
37
|
|
36
38
|
end_point = Defaults::END_POINTS[:alert_update]
|
37
39
|
logger.debug "##{__method__.to_s} => end_point: #{end_point}"
|
38
40
|
|
39
|
-
path = end_point
|
41
|
+
path = end_point.sub ':alert_id', ERB::Util.url_encode(alert_id)
|
42
|
+
path = path.sub ':read', ERB::Util.url_encode(read)
|
40
43
|
logger.debug "##{__method__.to_s} => path: #{path}"
|
41
44
|
|
42
|
-
_, error_messages = @client.send(path, :put
|
45
|
+
_, error_messages = @client.send(path, :put)
|
43
46
|
|
44
47
|
logger.debug "##{__method__.to_s} => Completed"
|
45
48
|
error_messages
|
@@ -58,7 +58,7 @@ module FinApps
|
|
58
58
|
:cashflow_show => 'cashflow/:start_date/:end_date',
|
59
59
|
|
60
60
|
:alert_list => 'alerts/:page/:requested/:sort/:asc/:read',
|
61
|
-
:alert_update => 'alerts',
|
61
|
+
:alert_update => 'alerts/:alert_id/:read',
|
62
62
|
|
63
63
|
:alert_definition_list => 'alerts/definitions',
|
64
64
|
:alert_definition_show => 'alerts/definitions/:alert_name',
|
data/lib/finapps/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: finapps
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erich Quintero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|