sentofu 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 438abd6ab431bafd2d9f9cd6ff66202cc311de0d16081b9bcbf62f040ab2dde7
4
- data.tar.gz: b357331c8ffca74c00130a8965b95be86afbbd8e9300fd3db485b9a2ba5e5200
3
+ metadata.gz: 91270abde3451876c1642617b4ac839347472f43cfbd5f191141330557d67b74
4
+ data.tar.gz: 35336f324cb73e7669e05db182addea25b25c7b92c34dfb5f8e1a988985d9c0c
5
5
  SHA512:
6
- metadata.gz: 7d9b1b89c83523e5f8ffdf956f6f7339fa6e42ced07be392609503300ebbe50ac9e68e380edd5125210f07f85488420296efd28c62160ad7d50f0543c20b5779
7
- data.tar.gz: 39b988baecc334abec4fa15cd52b78a04feb92b1f34f9e5b1f11ecaeaeb0b42a3a0155cfcf3715fb3baca8865eba82637739fc9a5cd33468daeb6cc41d448abc
6
+ metadata.gz: 8efe554288eae6e1815b61a4fff44149e1b02c1ffe6e6b118346de1dea1e70859b4ccc77a84d5cf96d4065026978c7d01e6c168d7b19e1ebaad7d85b604a2588
7
+ data.tar.gz: 920158c6e502f3302ccaa07e6be89279525d1f9673cbbada55a72bc70b56cf7485c69117e8e26166f6961351c31a4d3d9c4481d4341003fb3d0500f3e103e181
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
  # CHANGELOG.md
3
3
 
4
4
 
5
+ ## sentofu 0.3.0 released 2019-06-05
6
+
7
+ * Add Sentofu.on_response and Api#on_response
8
+
9
+
5
10
  ## sentofu 0.2.1 released 2019-05-30
6
11
 
7
12
  * Fix version/modified when loading from local yaml
data/lib/sentofu/api.rb CHANGED
@@ -60,7 +60,17 @@ module Sentofu
60
60
 
61
61
  return query.merge(path: pa) if query[:debug]
62
62
 
63
- Sentofu::Http.get_and_parse(pa, api.token)
63
+ get(pa)
64
+ end
65
+
66
+ def get(path)
67
+
68
+ res = Sentofu::Http.get_and_parse(path, api.token)
69
+
70
+ api.on_response(res) if api.respond_to?(:on_response)
71
+ Sentofu.on_response(res) if Sentofu.respond_to?(:on_response)
72
+
73
+ res
64
74
  end
65
75
 
66
76
  def path
@@ -181,7 +191,7 @@ module Sentofu
181
191
 
182
192
  return params.merge(path: pa) if params[:debug]
183
193
 
184
- Sentofu::Http.get_and_parse(pa, token)
194
+ get(pa)
185
195
  end
186
196
 
187
197
  def modified
data/lib/sentofu.rb CHANGED
@@ -14,7 +14,7 @@ require 'sentofu/explo'
14
14
 
15
15
  module Sentofu
16
16
 
17
- VERSION = '0.2.1'
17
+ VERSION = '0.3.0'
18
18
 
19
19
  USER_AGENT =
20
20
  "Sentofu #{Sentofu::VERSION} - " +
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sentofu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mettraux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-30 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec