cloudmersive-security-api-client 2.0.1

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.
Files changed (51) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +119 -0
  4. data/Rakefile +8 -0
  5. data/cloudmersive-security-api-client.gemspec +45 -0
  6. data/docs/ContentThreatDetectionApi.md +283 -0
  7. data/docs/IPThreatDetectionResponse.md +9 -0
  8. data/docs/NetworkThreatDetectionApi.md +228 -0
  9. data/docs/StringAutomaticThreatDetection.md +18 -0
  10. data/docs/StringInsecureDeserializationJsonDetection.md +10 -0
  11. data/docs/StringSqlInjectionDetectionResult.md +10 -0
  12. data/docs/StringXssProtectionResult.md +11 -0
  13. data/docs/StringXxeDetectionResult.md +9 -0
  14. data/docs/ThreatDetectionBotCheckResponse.md +8 -0
  15. data/docs/ThreatDetectionTorNodeResponse.md +8 -0
  16. data/docs/UrlSsrfThreatDetectionRequestFull.md +9 -0
  17. data/docs/UrlSsrfThreatDetectionResponseFull.md +9 -0
  18. data/git_push.sh +55 -0
  19. data/lib/cloudmersive-security-api-client.rb +51 -0
  20. data/lib/cloudmersive-security-api-client/api/content_threat_detection_api.rb +293 -0
  21. data/lib/cloudmersive-security-api-client/api/network_threat_detection_api.rb +239 -0
  22. data/lib/cloudmersive-security-api-client/api_client.rb +391 -0
  23. data/lib/cloudmersive-security-api-client/api_error.rb +38 -0
  24. data/lib/cloudmersive-security-api-client/configuration.rb +209 -0
  25. data/lib/cloudmersive-security-api-client/models/ip_threat_detection_response.rb +196 -0
  26. data/lib/cloudmersive-security-api-client/models/string_automatic_threat_detection.rb +285 -0
  27. data/lib/cloudmersive-security-api-client/models/string_insecure_deserialization_json_detection.rb +206 -0
  28. data/lib/cloudmersive-security-api-client/models/string_sql_injection_detection_result.rb +206 -0
  29. data/lib/cloudmersive-security-api-client/models/string_xss_protection_result.rb +216 -0
  30. data/lib/cloudmersive-security-api-client/models/string_xxe_detection_result.rb +196 -0
  31. data/lib/cloudmersive-security-api-client/models/threat_detection_bot_check_response.rb +186 -0
  32. data/lib/cloudmersive-security-api-client/models/threat_detection_tor_node_response.rb +186 -0
  33. data/lib/cloudmersive-security-api-client/models/url_ssrf_threat_detection_request_full.rb +198 -0
  34. data/lib/cloudmersive-security-api-client/models/url_ssrf_threat_detection_response_full.rb +196 -0
  35. data/lib/cloudmersive-security-api-client/version.rb +15 -0
  36. data/spec/api/content_threat_detection_api_spec.rb +95 -0
  37. data/spec/api/network_threat_detection_api_spec.rb +83 -0
  38. data/spec/api_client_spec.rb +243 -0
  39. data/spec/configuration_spec.rb +42 -0
  40. data/spec/models/ip_threat_detection_response_spec.rb +47 -0
  41. data/spec/models/string_automatic_threat_detection_spec.rb +101 -0
  42. data/spec/models/string_insecure_deserialization_json_detection_spec.rb +53 -0
  43. data/spec/models/string_sql_injection_detection_result_spec.rb +53 -0
  44. data/spec/models/string_xss_protection_result_spec.rb +59 -0
  45. data/spec/models/string_xxe_detection_result_spec.rb +47 -0
  46. data/spec/models/threat_detection_bot_check_response_spec.rb +41 -0
  47. data/spec/models/threat_detection_tor_node_response_spec.rb +41 -0
  48. data/spec/models/url_ssrf_threat_detection_request_full_spec.rb +47 -0
  49. data/spec/models/url_ssrf_threat_detection_response_full_spec.rb +47 -0
  50. data/spec/spec_helper.rb +111 -0
  51. metadata +273 -0
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSecurityApiClient::IPThreatDetectionResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **is_threat** | **BOOLEAN** | True if the input IP address is a threat, false otherwise | [optional]
7
+ **threat_type** | **String** | Specifies the type of IP threat; possible values include Blocklist, Botnet, WebBot | [optional]
8
+
9
+
@@ -0,0 +1,228 @@
1
+ # CloudmersiveSecurityApiClient::NetworkThreatDetectionApi
2
+
3
+ All URIs are relative to *https://api.cloudmersive.com*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**network_threat_detection_detect_ssrf_url**](NetworkThreatDetectionApi.md#network_threat_detection_detect_ssrf_url) | **POST** /security/threat-detection/network/url/ssrf/detect | Check a URL for Server-side Request Forgery (SSRF) threats
8
+ [**network_threat_detection_is_bot**](NetworkThreatDetectionApi.md#network_threat_detection_is_bot) | **POST** /security/threat-detection/network/ip/is-bot | Check if IP address is a Bot client threat
9
+ [**network_threat_detection_is_threat**](NetworkThreatDetectionApi.md#network_threat_detection_is_threat) | **POST** /security/threat-detection/network/ip/is-threat | Check if IP address is a known threat
10
+ [**network_threat_detection_is_tor_node**](NetworkThreatDetectionApi.md#network_threat_detection_is_tor_node) | **POST** /security/threat-detection/network/ip/is-tor-node | Check if IP address is a Tor node server
11
+
12
+
13
+ # **network_threat_detection_detect_ssrf_url**
14
+ > UrlSsrfThreatDetectionResponseFull network_threat_detection_detect_ssrf_url(request)
15
+
16
+ Check a URL for Server-side Request Forgery (SSRF) threats
17
+
18
+ Checks if an input URL is at risk of being an SSRF (Server-side request forgery) threat or attack.
19
+
20
+ ### Example
21
+ ```ruby
22
+ # load the gem
23
+ require 'cloudmersive-security-api-client'
24
+ # setup authorization
25
+ CloudmersiveSecurityApiClient.configure do |config|
26
+ # Configure API key authorization: Apikey
27
+ config.api_key['Apikey'] = 'YOUR API KEY'
28
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
29
+ #config.api_key_prefix['Apikey'] = 'Bearer'
30
+ end
31
+
32
+ api_instance = CloudmersiveSecurityApiClient::NetworkThreatDetectionApi.new
33
+
34
+ request = CloudmersiveSecurityApiClient::UrlSsrfThreatDetectionRequestFull.new # UrlSsrfThreatDetectionRequestFull | Input URL request
35
+
36
+
37
+ begin
38
+ #Check a URL for Server-side Request Forgery (SSRF) threats
39
+ result = api_instance.network_threat_detection_detect_ssrf_url(request)
40
+ p result
41
+ rescue CloudmersiveSecurityApiClient::ApiError => e
42
+ puts "Exception when calling NetworkThreatDetectionApi->network_threat_detection_detect_ssrf_url: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ Name | Type | Description | Notes
49
+ ------------- | ------------- | ------------- | -------------
50
+ **request** | [**UrlSsrfThreatDetectionRequestFull**](UrlSsrfThreatDetectionRequestFull.md)| Input URL request |
51
+
52
+ ### Return type
53
+
54
+ [**UrlSsrfThreatDetectionResponseFull**](UrlSsrfThreatDetectionResponseFull.md)
55
+
56
+ ### Authorization
57
+
58
+ [Apikey](../README.md#Apikey)
59
+
60
+ ### HTTP request headers
61
+
62
+ - **Content-Type**: application/json, text/json
63
+ - **Accept**: application/json, text/json, application/xml, text/xml
64
+
65
+
66
+
67
+ # **network_threat_detection_is_bot**
68
+ > ThreatDetectionBotCheckResponse network_threat_detection_is_bot(value)
69
+
70
+ Check if IP address is a Bot client threat
71
+
72
+ Check if the input IP address is a Bot, robot, or otherwise a non-user entity. Leverages real-time signals to check against known high-probability bots..
73
+
74
+ ### Example
75
+ ```ruby
76
+ # load the gem
77
+ require 'cloudmersive-security-api-client'
78
+ # setup authorization
79
+ CloudmersiveSecurityApiClient.configure do |config|
80
+ # Configure API key authorization: Apikey
81
+ config.api_key['Apikey'] = 'YOUR API KEY'
82
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
83
+ #config.api_key_prefix['Apikey'] = 'Bearer'
84
+ end
85
+
86
+ api_instance = CloudmersiveSecurityApiClient::NetworkThreatDetectionApi.new
87
+
88
+ value = 'value_example' # String | IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
89
+
90
+
91
+ begin
92
+ #Check if IP address is a Bot client threat
93
+ result = api_instance.network_threat_detection_is_bot(value)
94
+ p result
95
+ rescue CloudmersiveSecurityApiClient::ApiError => e
96
+ puts "Exception when calling NetworkThreatDetectionApi->network_threat_detection_is_bot: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ Name | Type | Description | Notes
103
+ ------------- | ------------- | ------------- | -------------
104
+ **value** | **String**| IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes. |
105
+
106
+ ### Return type
107
+
108
+ [**ThreatDetectionBotCheckResponse**](ThreatDetectionBotCheckResponse.md)
109
+
110
+ ### Authorization
111
+
112
+ [Apikey](../README.md#Apikey)
113
+
114
+ ### HTTP request headers
115
+
116
+ - **Content-Type**: application/json, text/json
117
+ - **Accept**: application/json, text/json, application/xml, text/xml
118
+
119
+
120
+
121
+ # **network_threat_detection_is_threat**
122
+ > IPThreatDetectionResponse network_threat_detection_is_threat(value)
123
+
124
+ Check if IP address is a known threat
125
+
126
+ Check if the input IP address is a known threat IP address. Checks against known bad IPs, botnets, compromised servers, and other lists of threats.
127
+
128
+ ### Example
129
+ ```ruby
130
+ # load the gem
131
+ require 'cloudmersive-security-api-client'
132
+ # setup authorization
133
+ CloudmersiveSecurityApiClient.configure do |config|
134
+ # Configure API key authorization: Apikey
135
+ config.api_key['Apikey'] = 'YOUR API KEY'
136
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
137
+ #config.api_key_prefix['Apikey'] = 'Bearer'
138
+ end
139
+
140
+ api_instance = CloudmersiveSecurityApiClient::NetworkThreatDetectionApi.new
141
+
142
+ value = 'value_example' # String | IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
143
+
144
+
145
+ begin
146
+ #Check if IP address is a known threat
147
+ result = api_instance.network_threat_detection_is_threat(value)
148
+ p result
149
+ rescue CloudmersiveSecurityApiClient::ApiError => e
150
+ puts "Exception when calling NetworkThreatDetectionApi->network_threat_detection_is_threat: #{e}"
151
+ end
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ Name | Type | Description | Notes
157
+ ------------- | ------------- | ------------- | -------------
158
+ **value** | **String**| IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes. |
159
+
160
+ ### Return type
161
+
162
+ [**IPThreatDetectionResponse**](IPThreatDetectionResponse.md)
163
+
164
+ ### Authorization
165
+
166
+ [Apikey](../README.md#Apikey)
167
+
168
+ ### HTTP request headers
169
+
170
+ - **Content-Type**: application/json, text/json
171
+ - **Accept**: application/json, text/json, application/xml, text/xml
172
+
173
+
174
+
175
+ # **network_threat_detection_is_tor_node**
176
+ > ThreatDetectionTorNodeResponse network_threat_detection_is_tor_node(value)
177
+
178
+ Check if IP address is a Tor node server
179
+
180
+ Check if the input IP address is a Tor exit node server. Tor servers are a type of privacy-preserving technology that can hide the original IP address who makes a request.
181
+
182
+ ### Example
183
+ ```ruby
184
+ # load the gem
185
+ require 'cloudmersive-security-api-client'
186
+ # setup authorization
187
+ CloudmersiveSecurityApiClient.configure do |config|
188
+ # Configure API key authorization: Apikey
189
+ config.api_key['Apikey'] = 'YOUR API KEY'
190
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
191
+ #config.api_key_prefix['Apikey'] = 'Bearer'
192
+ end
193
+
194
+ api_instance = CloudmersiveSecurityApiClient::NetworkThreatDetectionApi.new
195
+
196
+ value = 'value_example' # String | IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes.
197
+
198
+
199
+ begin
200
+ #Check if IP address is a Tor node server
201
+ result = api_instance.network_threat_detection_is_tor_node(value)
202
+ p result
203
+ rescue CloudmersiveSecurityApiClient::ApiError => e
204
+ puts "Exception when calling NetworkThreatDetectionApi->network_threat_detection_is_tor_node: #{e}"
205
+ end
206
+ ```
207
+
208
+ ### Parameters
209
+
210
+ Name | Type | Description | Notes
211
+ ------------- | ------------- | ------------- | -------------
212
+ **value** | **String**| IP address to check, e.g. \"55.55.55.55\". The input is a string so be sure to enclose it in double-quotes. |
213
+
214
+ ### Return type
215
+
216
+ [**ThreatDetectionTorNodeResponse**](ThreatDetectionTorNodeResponse.md)
217
+
218
+ ### Authorization
219
+
220
+ [Apikey](../README.md#Apikey)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: application/json, text/json
225
+ - **Accept**: application/json, text/json, application/xml, text/xml
226
+
227
+
228
+
@@ -0,0 +1,18 @@
1
+ # CloudmersiveSecurityApiClient::StringAutomaticThreatDetection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **clean_result** | **BOOLEAN** | | [optional]
8
+ **contained_json_insecure_deserialization_attack** | **BOOLEAN** | True if the input contained Insecure Deserialization JSON, false otherwise | [optional]
9
+ **contained_xss_threat** | **BOOLEAN** | True if the input contained XSS attack, false otherwise | [optional]
10
+ **contained_xxe_threat** | **BOOLEAN** | True if the input contained XXE attack, false otherwise | [optional]
11
+ **contained_sql_injection_threat** | **BOOLEAN** | True if the input contained SQL Injection attack, false otherwise | [optional]
12
+ **contained_ssrf_threat** | **BOOLEAN** | True if the input contained an Server-Side Request Forgery (SSRF) URL attack, false otherwise | [optional]
13
+ **is_xml** | **BOOLEAN** | True if the input string is XML, false otherwise | [optional]
14
+ **is_json** | **BOOLEAN** | True if the input string is JSON, false otherwise | [optional]
15
+ **is_url** | **BOOLEAN** | True if the input string is a URL, false otherwise | [optional]
16
+ **original_input** | **String** | Original input string | [optional]
17
+
18
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveSecurityApiClient::StringInsecureDeserializationJsonDetection
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **contained_json_insecure_deserialization_attack** | **BOOLEAN** | True if the input contained Insecure Deserialization JSON, false otherwise | [optional]
8
+ **original_input** | **String** | Original input string | [optional]
9
+
10
+
@@ -0,0 +1,10 @@
1
+ # CloudmersiveSecurityApiClient::StringSqlInjectionDetectionResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **contained_sql_injection_attack** | **BOOLEAN** | True if the input contained SQL Injection attacks, false otherwise | [optional]
8
+ **original_input** | **String** | Original input string | [optional]
9
+
10
+
@@ -0,0 +1,11 @@
1
+ # CloudmersiveSecurityApiClient::StringXssProtectionResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **contained_xss** | **BOOLEAN** | True if the input contained XSS scripting, false otherwise | [optional]
8
+ **original_input** | **String** | Original input string | [optional]
9
+ **normalized_result** | **String** | Normalized string result, with XSS removed | [optional]
10
+
11
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSecurityApiClient::StringXxeDetectionResult
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
7
+ **contained_xxe** | **BOOLEAN** | True if the input contained XXE threats, false otherwise | [optional]
8
+
9
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveSecurityApiClient::ThreatDetectionBotCheckResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **is_bot** | **BOOLEAN** | True if the input IP address is a Bot or Robot, false otherwise | [optional]
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # CloudmersiveSecurityApiClient::ThreatDetectionTorNodeResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **is_tor_node** | **BOOLEAN** | True if the input IP address is a Tor exit node, false otherwise | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSecurityApiClient::UrlSsrfThreatDetectionRequestFull
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **url** | **String** | URL to validate | [optional]
7
+ **blocked_domains** | **Array<String>** | Top level domains that you do not want to allow access to, e.g. mydomain.com - will block all subdomains as well | [optional]
8
+
9
+
@@ -0,0 +1,9 @@
1
+ # CloudmersiveSecurityApiClient::UrlSsrfThreatDetectionResponseFull
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **clean_url** | **BOOLEAN** | True if the URL is clean, false if it is at risk of containing an SSRF threat or attack | [optional]
7
+ **threat_level** | **String** | Threat level of the URL; possible values are High, Medium, Low and None | [optional]
8
+
9
+
data/git_push.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/sh
2
+ #
3
+ # Generated by: https://github.com/swagger-api/swagger-codegen.git
4
+ #
5
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
+ #
7
+ # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
8
+
9
+ git_user_id=$1
10
+ git_repo_id=$2
11
+ release_note=$3
12
+
13
+ if [ "$git_user_id" = "" ]; then
14
+ git_user_id="GIT_USER_ID"
15
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
+ fi
17
+
18
+ if [ "$git_repo_id" = "" ]; then
19
+ git_repo_id="GIT_REPO_ID"
20
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
+ fi
22
+
23
+ if [ "$release_note" = "" ]; then
24
+ release_note="Minor update"
25
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
+ fi
27
+
28
+ # Initialize the local directory as a Git repository
29
+ git init
30
+
31
+ # Adds the files in the local repository and stages them for commit.
32
+ git add .
33
+
34
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
+ git commit -m "$release_note"
36
+
37
+ # Sets the new remote
38
+ git_remote=`git remote`
39
+ if [ "$git_remote" = "" ]; then # git remote not defined
40
+
41
+ if [ "$GIT_TOKEN" = "" ]; then
42
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
+ git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
+ else
45
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
+ fi
47
+
48
+ fi
49
+
50
+ git pull origin master
51
+
52
+ # Pushes (Forces) the changes in the local repository up to the remote repository
53
+ echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
+ git push origin master 2>&1 | grep -v 'To https'
55
+
@@ -0,0 +1,51 @@
1
+ =begin
2
+ #securityapi
3
+
4
+ #The security APIs help you detect and block security threats.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.14
10
+
11
+ =end
12
+
13
+ # Common files
14
+ require 'cloudmersive-security-api-client/api_client'
15
+ require 'cloudmersive-security-api-client/api_error'
16
+ require 'cloudmersive-security-api-client/version'
17
+ require 'cloudmersive-security-api-client/configuration'
18
+
19
+ # Models
20
+ require 'cloudmersive-security-api-client/models/ip_threat_detection_response'
21
+ require 'cloudmersive-security-api-client/models/string_automatic_threat_detection'
22
+ require 'cloudmersive-security-api-client/models/string_insecure_deserialization_json_detection'
23
+ require 'cloudmersive-security-api-client/models/string_sql_injection_detection_result'
24
+ require 'cloudmersive-security-api-client/models/string_xss_protection_result'
25
+ require 'cloudmersive-security-api-client/models/string_xxe_detection_result'
26
+ require 'cloudmersive-security-api-client/models/threat_detection_bot_check_response'
27
+ require 'cloudmersive-security-api-client/models/threat_detection_tor_node_response'
28
+ require 'cloudmersive-security-api-client/models/url_ssrf_threat_detection_request_full'
29
+ require 'cloudmersive-security-api-client/models/url_ssrf_threat_detection_response_full'
30
+
31
+ # APIs
32
+ require 'cloudmersive-security-api-client/api/content_threat_detection_api'
33
+ require 'cloudmersive-security-api-client/api/network_threat_detection_api'
34
+
35
+ module CloudmersiveSecurityApiClient
36
+ class << self
37
+ # Customize default settings for the SDK using block.
38
+ # CloudmersiveSecurityApiClient.configure do |config|
39
+ # config.username = "xxx"
40
+ # config.password = "xxx"
41
+ # end
42
+ # If no block given, return the default Configuration object.
43
+ def configure
44
+ if block_given?
45
+ yield(Configuration.default)
46
+ else
47
+ Configuration.default
48
+ end
49
+ end
50
+ end
51
+ end