cp_mgmt 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8418b1b92ff9efe6d59b624c56b7da3a0cde37e6a354b85a1f8867d362df9b75
4
- data.tar.gz: 74c86e53286bfab4e0b7ea33e73787477a93e09abe4cfdfa1d4febf0f98142e4
3
+ metadata.gz: 527712cc6da5b1de3b867ab77542f0009ce17657e40c1a20ea91fff53301450c
4
+ data.tar.gz: 16025407eb4a10fedaa505f645635590ac65bd389269282395137d02c2c5b868
5
5
  SHA512:
6
- metadata.gz: 578ac872f78ef62c168e2d7cc552924d8e846ef5bb4673f92ed9b40f440716ba6da18ec52d527b1d5f465e75303a9983d6d1e7589624c58c5ec16b3f00cb6010
7
- data.tar.gz: e49d2b1b3c0f47e9f682a0db0ff4a936bcb4eb7d49fb303dad139523ad7028894646496c3dad5fe2e6ed2583b623e413ade3c17ed95830756012bebac5b0e58a
6
+ metadata.gz: 1942c25adc49b77f32ac5987abaf4a9351d1acf68f7a9ede638641d9c60f4cfa95ddd74e118b048c94cdae5682454987258788f3fcf23d8789e60d574409f059
7
+ data.tar.gz: b15a5cc9542cba13fe337b55bba7a7f6f8c2b35c0bffca962c46609f2b4049f22ee1ffbb06c12dcbcb687e49946659eaa0ad243fde5ce17854bc3b624d61e584
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cp_mgmt (1.0.2)
4
+ cp_mgmt (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Check Point Management - Ruby
2
2
 
3
3
  [![CircleCI](https://circleci.com/gh/willfore/cp_mgmt_ruby.svg?style=svg)](https://circleci.com/gh/willfore/cp_mgmt_ruby)
4
+ [![Gem Version](https://badge.fury.io/rb/cp_mgmt.svg)](https://badge.fury.io/rb/cp_mgmt)
4
5
 
5
6
  This is a very light wrapper to help simplify working with the Check Point Web API in R80.10 and above. Currently not all options from the API are available but I plan on adding them going forward. It has been developed using the 1.3 Version of the Check Point Management API. I would recommend using the [API Documentation](https://sc1.checkpoint.com/documents/latest/APIs/index.html#introduction~v1.3%20) as a reference as some of the functions accept an options map. You will need to reference this documentation to discover which options can be passed.
6
7
 
@@ -1,3 +1,3 @@
1
1
  module CpMgmt
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
data/lib/cp_mgmt.rb CHANGED
@@ -122,4 +122,19 @@ module CpMgmt
122
122
  end
123
123
  self.transform_response(response)
124
124
  end
125
+
126
+ # shows object by uid
127
+ def self.show_object(uid)
128
+ client = self.configuration.client
129
+ self.logged_in?
130
+
131
+ body = {"uid": uid}
132
+ response = client.post do |req|
133
+ req.url '/web_api/show-object'
134
+ req.headers['Content-Type'] = 'application/json'
135
+ req.headers['X-chkp-sid'] = ENV.fetch("sid")
136
+ req.body = body.to_json
137
+ end
138
+ self.transform_response(response)
139
+ end
125
140
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cp_mgmt
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Forester
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-11-21 00:00:00.000000000 Z
11
+ date: 2018-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler