qube_sync 0.1.1 → 0.1.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: b30a43b194aa2be7793bca91ff0af376f35cd0a7a663bcac2cd1297aeddb4cdf
4
- data.tar.gz: 6866965f28ddb4a2712b14b37db0230b6d21c5c75885f0bc9910cb5f620ffd4a
3
+ metadata.gz: f34c269c2f1e3291ae88d68036b9d02eda39da5cc6d5601afba689a2630f8321
4
+ data.tar.gz: 2c0c06fffbd1291b0e397365e9e0ac44fe899b47c75f8394f28ffca0ca97db23
5
5
  SHA512:
6
- metadata.gz: 046c0dd373ee5c9addf3005be16f5279a33f193be25c47d5c45e922d854d7239c10ce12d2529fbc1b60e65fa8ee13d78b4c845450a4273f06fba8960ba406792
7
- data.tar.gz: 524e5fb52176085ff61bbd02b79a6765ed53621f6e5b981fb9b26f9c640ff1e4789b7b3ff6511cfaf8fcfd5e6bde6969301ec56fab6bca28c312ba2fa2e04c18
6
+ metadata.gz: acfd00b12f982fcf9f49fd794a94fd8be728e3c72a0e45495823c91527f44e1dfe996df3e70afe7d0221dff632222fb3ea17d14492f2dceaa4d2e548f2060675
7
+ data.tar.gz: 722d0eb8f1f40347bab42953104c8f58cc090b3c464ff25b07ea239d766c0871376c3bb3a45417251d982cec997f688e44e67b9ee002c15b0c91c054e46b9664
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # QUBESync
2
2
 
3
- The QUBESync API is very simple, so this gem is not necessary if you need to use older versions of Ruby or if you prefer to write your own API client. However, if you are using Ruby 2.6 or later and you want to save time, this gem can help you.
3
+ A simple wrapper around the QUBE Sync API.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module QubeSync
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
data/lib/qube_sync.rb CHANGED
@@ -85,14 +85,13 @@ module QubeSync
85
85
  get("connections/#{connection_id}").fetch("data")
86
86
  end
87
87
 
88
- def queue_request(connection_id, request_xml, webhook_url)
88
+ def queue_request(connection_id, request)
89
89
  url = "connections/#{connection_id}/queued_requests"
90
-
90
+
91
+ raise "must have either request_xml or request_json" unless request[:request_xml] || request[:request_json]
92
+ warn "no webhook_url provided" unless request[:webhook_url]
91
93
  payload = {
92
- queued_request: {
93
- request_xml: request_xml,
94
- webhook_url: webhook_url,
95
- }
94
+ queued_request: request
96
95
  }
97
96
 
98
97
  post(url, payload).fetch("data")
@@ -116,8 +115,7 @@ module QubeSync
116
115
  end
117
116
 
118
117
  def generate_password(connection_id)
119
- password = SecureRandom.hex(16)
120
- response = post("connections/#{connection_id}/password", { password: password })
118
+ response = post("connections/#{connection_id}/password")
121
119
  response.dig("data", "password") or raise "Password not found: #{response.pretty_inspect}"
122
120
  end
123
121
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qube_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett Lancaster
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-04 00:00:00.000000000 Z
11
+ date: 2025-02-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday