fluffy-ruby 0.0.8 → 0.0.9

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
  SHA1:
3
- metadata.gz: d43e0c39cb10819c8467f36f93fded09fe2294df
4
- data.tar.gz: 2cb06878fdc8d6dc30507460cac8ebaff0ecaaae
3
+ metadata.gz: 14fa56bf8bc0463aed4e8a658e546077735036fb
4
+ data.tar.gz: 328a263cf31034b3ef0c359fb05f7d7834f5e648
5
5
  SHA512:
6
- metadata.gz: 4f9903168ac214984a52c25500963a4b295be2ca15373f6e0a3f9ca7280c70a0645a6a0d79c3cc3e8fca1ea20cb88d45c778c3144134fefa59d1b856bd124ad4
7
- data.tar.gz: 0f611ff7b54845ef59a582cfadb0f1296957277d4d8ba33f4c3134d4eeb8569f698fd3b7e2c0ad730e28045e0ff6d90952984a85a8a5d6842f788b7a5a3e74ef
6
+ metadata.gz: a1bb45b63c07d5ff1f2fa0ef18fc048b847c5e06ffb3954703f127db960e4073d93289797d23fae270b22b3fbd4e721737e2ee5ea054c0e837ff8ec6a4fb5902
7
+ data.tar.gz: fe03d7cbf095ca7e446b35bdf64630f72ae5842886f030a35898079fab801490437290f21a56d7aa47807584168a4fe85c772a28fac79a75faffc63ece8bbb41
data/lib/fluffy/client.rb CHANGED
@@ -62,5 +62,13 @@ module Fluffy
62
62
  def services
63
63
  @@api.get(endpoint: "services")
64
64
  end
65
+
66
+ # Retrieve the active rollback checks
67
+ #
68
+ # @return [Hash] List of rollback checks
69
+ #
70
+ def services
71
+ @@api.get(endpoint: "rollback_checks")
72
+ end
65
73
  end
66
74
  end
@@ -0,0 +1,55 @@
1
+ module Fluffy
2
+ class Session
3
+ class Rollback_checks
4
+ include Fluffy::API
5
+
6
+ # @return [String] The session endpoint
7
+ attr_reader :endpoint
8
+
9
+ # Create a services instance for a given session
10
+ #
11
+ # @param endpoint [String] API session endpoint
12
+ #
13
+ def initialize(endpoint:)
14
+ @endpoint = endpoint + ['services']
15
+ end
16
+
17
+ # Retrieve the session rollback checks
18
+ #
19
+ # @return [Hash] The session rollback checks
20
+ #
21
+ def get
22
+ @@api.get(endpoint: self.endpoint)
23
+ end
24
+
25
+ # Add a new entry in the session rollback checks
26
+ #
27
+ # @param name [String] Entry name
28
+ # @param **params [Hash] Any number of parameters to push into the Hash
29
+ # @return [Hash, nil] API response
30
+ #
31
+ def add(name:, **params)
32
+ @@api.post(endpoint: self.endpoint + [name], params: params)
33
+ end
34
+
35
+ # Update an existing entry in the session rollback checks
36
+ #
37
+ # @param name [String] Entry name
38
+ # @param **params [Hash] Any number of parameters to push into the Hash
39
+ # @return [Hash, nil] API response
40
+ #
41
+ def update(name:, **params)
42
+ @@api.patch(endpoint: self.endpoint + [name], params: params)
43
+ end
44
+
45
+ # Delete an entry from the session rollback checks
46
+ #
47
+ # @param name [String] Entry name
48
+ # @return [Hash, nil] API response
49
+ #
50
+ def delete(name:)
51
+ @@api.delete(endpoint: self.endpoint + [name])
52
+ end
53
+ end
54
+ end
55
+ end
@@ -1,5 +1,5 @@
1
1
  module Fluffy
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluffy-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matteo Cerutti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2017-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -53,6 +53,7 @@ files:
53
53
  - lib/fluffy/session/addressbook.rb
54
54
  - lib/fluffy/session/chains.rb
55
55
  - lib/fluffy/session/interfaces.rb
56
+ - lib/fluffy/session/rollback_checks.rb
56
57
  - lib/fluffy/session/rules.rb
57
58
  - lib/fluffy/session/services.rb
58
59
  - lib/fluffy/sessions.rb