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 +4 -4
- data/lib/fluffy/client.rb +8 -0
- data/lib/fluffy/session/rollback_checks.rb +55 -0
- data/lib/fluffy/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14fa56bf8bc0463aed4e8a658e546077735036fb
|
4
|
+
data.tar.gz: 328a263cf31034b3ef0c359fb05f7d7834f5e648
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1bb45b63c07d5ff1f2fa0ef18fc048b847c5e06ffb3954703f127db960e4073d93289797d23fae270b22b3fbd4e721737e2ee5ea054c0e837ff8ec6a4fb5902
|
7
|
+
data.tar.gz: fe03d7cbf095ca7e446b35bdf64630f72ae5842886f030a35898079fab801490437290f21a56d7aa47807584168a4fe85c772a28fac79a75faffc63ece8bbb41
|
data/lib/fluffy/client.rb
CHANGED
@@ -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
|
data/lib/fluffy/version.rb
CHANGED
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.
|
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-
|
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
|