omcms-ruby-client 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/omcms/client.rb +4 -2
- data/lib/omcms/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 486c879393ce195be83ee8ada89010f426cafd4370cb507f61c8f9811648526b
|
4
|
+
data.tar.gz: 464298d9dcd752ca1a456518c2a0ba88c1b23f962a7c170c27cca584ea415791
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82dc8d0d1db64df172f23275d82a4e30c51df260e233b53b02853ecad580e3a7df2b64f76a09cb554b34911f5d5a32d3af5fdbff8f2638703d6618233fd1f4f8
|
7
|
+
data.tar.gz: dd72cf8dc05bf78827a61dfbd91c9f96828a870e1d5fedb092a8cec2925b9528ceb46e00cc1422c79573b90c679f6dff9a5de0eb6e31c3cf36ec350028beb93a
|
data/README.md
CHANGED
@@ -32,7 +32,9 @@ Create a client using your OMCMS connector's public key and private key
|
|
32
32
|
$omcms = OMCMS::Client.new(
|
33
33
|
host: ENV["OMCMS_API_HOST"], # https://www.example.com
|
34
34
|
public_key: ENV["OMCMS_PUBLIC_KEY"],
|
35
|
-
private_key: ENV["OMCMS_PRIVATE_KEY"]
|
35
|
+
private_key: ENV["OMCMS_PRIVATE_KEY"],
|
36
|
+
open_timeout: ENV["OMCMS_OPEN_TIMEOUT"], # optional default to 10 seconds
|
37
|
+
timeout: ENV["OMCMS_TIMEOUT"] # optional default to 20 seconds
|
36
38
|
)
|
37
39
|
```
|
38
40
|
|
data/lib/omcms/client.rb
CHANGED
@@ -15,8 +15,8 @@ module OMCMS
|
|
15
15
|
def configure_client
|
16
16
|
@client ||= Faraday.new do |f|
|
17
17
|
f.request :basic_auth, @username, @password
|
18
|
-
f.options[:open_timeout] =
|
19
|
-
f.options[:timeout] =
|
18
|
+
f.options[:open_timeout] = @open_timeout
|
19
|
+
f.options[:timeout] = @timeout
|
20
20
|
f.request :omcms_set_header
|
21
21
|
f.response :omcms_parse_response
|
22
22
|
f.response :json, :content_type => /\bjson$/
|
@@ -39,6 +39,8 @@ module OMCMS
|
|
39
39
|
@username = opts[:public_key]
|
40
40
|
@password = opts[:private_key]
|
41
41
|
@host = opts[:host]
|
42
|
+
@open_timeout = opts[:open_timeout] || 10
|
43
|
+
@timeout = opts[:timeout] || 20
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
data/lib/omcms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omcms-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pradeep Rawat
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -102,7 +102,7 @@ licenses: []
|
|
102
102
|
metadata:
|
103
103
|
homepage_uri: https://github.com/equitymultiple/omcms-ruby-client
|
104
104
|
source_code_uri: https://github.com/equitymultiple/omcms-ruby-client
|
105
|
-
post_install_message:
|
105
|
+
post_install_message:
|
106
106
|
rdoc_options: []
|
107
107
|
require_paths:
|
108
108
|
- lib
|
@@ -117,8 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
requirements: []
|
120
|
-
rubygems_version: 3.
|
121
|
-
signing_key:
|
120
|
+
rubygems_version: 3.2.3
|
121
|
+
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: A Ruby SDK for OMCMS APIs
|
124
124
|
test_files: []
|