woocommerce-ruby3-api 1.5.0 → 1.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebee0d5eded71aaceb36236edeff4d0d06baaa8a5689449126b62fa6e492a4d0
4
- data.tar.gz: 871f97a97a96811df311a792a290f2524122996c240687c3e995dbdba663f7a8
3
+ metadata.gz: e42f8da0504dcc9b35ee61e8b5165b2bac2c8f0c66bb08fcd3955145a2c94ef5
4
+ data.tar.gz: 708a6741110d8721fac043e2a0446110e29bc6116d9e97d3a9515aa279ca5611
5
5
  SHA512:
6
- metadata.gz: 8d05ee031281d786350affd50f0624b8bb72669494e444dffe55760473dec366ce5a777c72b56bf8f206c16c3548abadc242e651446453a099c7a55e29d75027
7
- data.tar.gz: e8c5aed129cb2fc2195cf054181f9e460095471d24de111a2671f033c2680d8f7727279a3a72611d3f8e6c6060058378140a425cd2399ffcb150a88faf94a84c
6
+ metadata.gz: 05a0c2450deb9186d1080e3dd2b1a82d556fb74cbeb3154ed638ed82a42dc3fb2069f27688944c61c3aab422e2079547e096f28ff306d28c855d5d23c8311cd5
7
+ data.tar.gz: 9a5aa4105ee99d2639537efe9064d7cc8dcd1c701b6913fa3e69820bdd34b97c845dd2eae4ccbcc49c7c3b6597f3f651ce2ff68573878270b874b08cd114cf4a
data/README.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  A Ruby wrapper for the WooCommerce REST API. Easily interact with the WooCommerce REST API using this library, optimized for Ruby 3.0+.
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/woocommerce-ruby3-api.svg)](https://badge.fury.io/rb/woocommerce-ruby3-api)
6
- [![Tests](https://github.com/chemica/woocommerce-ruby3-api/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/chemica/woocommerce-ruby3-api/actions/workflows/test.yml)
5
+ [![Gem Version](https://badge.fury.io/rb/woocommerce-ruby3-api.svg?bust=1)](https://badge.fury.io/rb/woocommerce-ruby3-api)
6
+ [![Tests](https://github.com/chemica/woocommerce-ruby3-api/actions/workflows/test.yml/badge.svg?branch=main&bust=1)](https://github.com/chemica/woocommerce-ruby3-api/actions/workflows/test.yml)
7
7
 
8
8
  ## About
9
9
 
@@ -3,4 +3,4 @@
3
3
  # This file serves as an entry point for the renamed gem
4
4
  # It simply requires the original code to maintain compatibility
5
5
 
6
- require_relative 'woocommerce_api'
6
+ require_relative "woocommerce_api"
@@ -11,46 +11,74 @@ module WooCommerce
11
11
  class OAuth
12
12
  class InvalidSignatureMethodError < StandardError; end
13
13
 
14
- def initialize url, method, version, consumer_key, consumer_secret, signature_method = "HMAC-SHA256"
14
+ NONCE_LIFETIME = 15 * 60 # Woocommerce keeps nonces for 15 minutes
15
+
16
+ def initialize(url, method, version, credentials)
15
17
  @url = url
16
18
  @method = method.upcase
17
19
  @version = version
18
- @consumer_key = consumer_key
19
- @consumer_secret = consumer_secret
20
- @signature_method = signature_method
20
+ @consumer_key = credentials[:consumer_key]
21
+ @consumer_secret = credentials[:consumer_secret]
22
+ @signature_method = credentials[:signature_method]
21
23
  end
22
24
 
23
25
  # Public: Get OAuth url
24
26
  #
25
27
  # Returns the OAuth url.
26
- def get_oauth_url
28
+ def oauth_url
27
29
  params = {}
28
30
  url = @url
29
31
 
30
- if url.include?("?")
31
- parsed_url = URI::parse(url)
32
- CGI::parse(parsed_url.query).each do |key, value|
33
- params[key] = value[0]
34
- end
35
- params = Hash[params.sort]
32
+ url = parse_params(url, params)
33
+ create_oauth_params(params, url)
34
+
35
+ query_string = create_query_string(params)
36
+
37
+ "#{url}?#{query_string}"
38
+ end
39
+
40
+ protected
36
41
 
37
- url = parsed_url.to_s.gsub(/\?.*/, "")
42
+ def parse_params(url, params)
43
+ return url unless url.include?("?")
44
+
45
+ parsed_url = URI.parse(url)
46
+ CGI.parse(parsed_url.query).each do |key, value|
47
+ params[key] = value[0]
38
48
  end
49
+ params = params.sort.to_h
50
+
51
+ parsed_url.to_s.gsub(/\?.*/, "")
52
+ end
39
53
 
40
- nonce_lifetime = 15 * 60 # Woocommerce keeps nonces for 15 minutes
54
+ # Internal: Create the query string
55
+ #
56
+ # params - A Hash with the OAuth params.
57
+ #
58
+ # Returns the query string String.
59
+ def create_query_string(params)
60
+ Addressable::URI.encode(params.map { |key, value| "#{key}=#{value}" }.join("&"))
61
+ end
41
62
 
63
+ # Internal: Create the OAuth params
64
+ #
65
+ # params - A Hash with the OAuth params.
66
+ #
67
+ # Updates and returns the OAuth params Hash.
68
+ def create_oauth_params(params, url)
42
69
  params["oauth_consumer_key"] = @consumer_key
43
- params["oauth_nonce"] = Digest::SHA1.hexdigest((Time.new.to_f % nonce_lifetime + (Process.pid * nonce_lifetime)).to_s)
70
+ params["oauth_nonce"] = generate_nonce
44
71
  params["oauth_signature_method"] = @signature_method
45
72
  params["oauth_timestamp"] = Time.new.to_i
46
- params["oauth_signature"] = CGI::escape(generate_oauth_signature(params, url))
47
-
48
- query_string = Addressable::URI.encode(params.map{|key, value| "#{key}=#{value}"}.join("&"))
49
-
50
- "#{url}?#{query_string}"
73
+ params["oauth_signature"] = CGI.escape(generate_oauth_signature(params, url))
51
74
  end
52
75
 
53
- protected
76
+ # Internal: Generate a nonce
77
+ #
78
+ # Returns the nonce String.
79
+ def generate_nonce
80
+ Digest::SHA1.hexdigest(((Time.new.to_f % NONCE_LIFETIME) + (Process.pid * NONCE_LIFETIME)).to_s)
81
+ end
54
82
 
55
83
  # Internal: Generate the OAuth Signature
56
84
  #
@@ -58,25 +86,27 @@ module WooCommerce
58
86
  # url - A String with a URL
59
87
  #
60
88
  # Returns the oauth signature String.
61
- def generate_oauth_signature params, url
62
- base_request_uri = CGI::escape(url.to_s)
89
+ def generate_oauth_signature(params, url)
90
+ base_request_uri = CGI.escape(url.to_s)
63
91
  query_params = []
64
92
 
65
93
  params.sort.map do |key, value|
66
- query_params.push(encode_param(key.to_s) + "%3D" + encode_param(value.to_s))
94
+ query_params.push("#{encode_param(key.to_s)}%3D#{encode_param(value.to_s)}")
67
95
  end
68
96
 
69
97
  query_string = query_params
70
- .join("%26")
98
+ .join("%26")
71
99
  string_to_sign = "#{@method}&#{base_request_uri}&#{query_string}"
72
100
 
73
- if !["v1", "v2"].include? @version
74
- consumer_secret = "#{@consumer_secret}&"
101
+ Base64.strict_encode64(OpenSSL::HMAC.digest(digest, consumer_secret, string_to_sign))
102
+ end
103
+
104
+ def consumer_secret
105
+ if ["v1", "v2"].include? @version
106
+ @consumer_secret
75
107
  else
76
- consumer_secret = @consumer_secret
108
+ "#{@consumer_secret}&"
77
109
  end
78
-
79
- return Base64.strict_encode64(OpenSSL::HMAC.digest(digest, consumer_secret, string_to_sign))
80
110
  end
81
111
 
82
112
  # Internal: Digest object based on signature method
@@ -87,7 +117,7 @@ module WooCommerce
87
117
  when "HMAC-SHA256" then OpenSSL::Digest.new("sha256")
88
118
  when "HMAC-SHA1" then OpenSSL::Digest.new("sha1")
89
119
  else
90
- fail InvalidSignatureMethodError
120
+ raise InvalidSignatureMethodError
91
121
  end
92
122
  end
93
123
 
@@ -96,8 +126,8 @@ module WooCommerce
96
126
  # text - A String to be encoded
97
127
  #
98
128
  # Returns the encoded String.
99
- def encode_param text
100
- CGI::escape(text).gsub("+", "%20").gsub("%", "%25")
129
+ def encode_param(text)
130
+ CGI.escape(text).gsub("+", "%20").gsub("%", "%25")
101
131
  end
102
132
  end
103
133
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WooCommerce
4
- VERSION = "1.5.0"
4
+ VERSION = "1.5.1"
5
5
  end
@@ -3,101 +3,74 @@
3
3
  require "httparty"
4
4
  require "json"
5
5
  require "cgi"
6
- require "cgi"
7
6
  require "addressable/uri"
8
7
 
9
8
  require "woocommerce_api/oauth"
10
9
  require "woocommerce_api/version"
11
10
 
12
11
  module WooCommerce
13
- class API
14
-
15
- def initialize url, consumer_key, consumer_secret, args = {}
12
+ class ApiBase
13
+ DEFAULT_ARGS = {
14
+ wp_api: false,
15
+ version: "v3",
16
+ verify_ssl: true,
17
+ signature_method: "HMAC-SHA256",
18
+ httparty_args: {}
19
+ }.freeze
20
+
21
+ def initialize(url, consumer_key, consumer_secret, args = {})
16
22
  # Required args
17
23
  @url = url
18
24
  @consumer_key = consumer_key
19
25
  @consumer_secret = consumer_secret
20
26
 
21
- # Optional args
22
- defaults = {
23
- wp_api: false,
24
- version: "v3",
25
- verify_ssl: true,
26
- signature_method: "HMAC-SHA256",
27
- httparty_args: {}
28
- }
29
- args = defaults.merge(args)
30
-
31
- @wp_api = args[:wp_api]
32
- @version = args[:version]
33
- @verify_ssl = args[:verify_ssl] == true
34
- @signature_method = args[:signature_method]
35
- @debug_mode = args[:debug_mode]
36
- @query_string_auth = args[:query_string_auth]
37
- @httparty_args = args[:httparty_args]
27
+ args = DEFAULT_ARGS.merge(args)
28
+ create_args_variables(args)
38
29
 
39
30
  # Internal args
40
31
  @is_ssl = @url.start_with? "https"
41
32
  end
42
33
 
43
- # Public: GET requests.
44
- #
45
- # endpoint - A String naming the request endpoint.
46
- # query - A Hash with query params.
47
- #
48
- # Returns the request Hash.
49
- def get endpoint, query = nil
50
- do_request :get, add_query_params(endpoint, query)
51
- end
34
+ private
52
35
 
53
- # Public: POST requests.
36
+ # Internal: Sets authentication options for SSL requests
54
37
  #
55
- # endpoint - A String naming the request endpoint.
56
- # data - The Hash data for the request.
38
+ # options - The options hash to modify with authentication settings
57
39
  #
58
- # Returns the request Hash.
59
- def post endpoint, data
60
- do_request :post, endpoint, data
61
- end
40
+ # Returns the modified options hash
41
+ def authentication_options(options)
42
+ options[:verify] = @verify_ssl
62
43
 
63
- # Public: PUT requests.
64
- #
65
- # endpoint - A String naming the request endpoint.
66
- # data - The Hash data for the request.
67
- #
68
- # Returns the request Hash.
69
- def put endpoint, data
70
- do_request :put, endpoint, data
71
- end
72
-
73
- # Public: DELETE requests.
74
- #
75
- # endpoint - A String naming the request endpoint.
76
- # query - A Hash with query params.
77
- #
78
- # Returns the request Hash.
79
- def delete endpoint, query = nil
80
- do_request :delete, add_query_params(endpoint, query)
44
+ if @query_string_auth
45
+ options[:query] = { consumer_key: @consumer_key, consumer_secret: @consumer_secret }
46
+ else
47
+ options[:basic_auth] = { username: @consumer_key, password: @consumer_secret }
48
+ end
49
+ options
81
50
  end
82
51
 
83
- # Public: OPTIONS requests.
52
+ # Internal: Creates instance variables from a hash of arguments
84
53
  #
85
- # endpoint - A String naming the request endpoint.
54
+ # args - A hash of arguments to create instance variables from
86
55
  #
87
- # Returns the request Hash.
88
- def options endpoint
89
- do_request :options, add_query_params(endpoint, nil)
56
+ # Returns nothing
57
+ def create_args_variables(args)
58
+ @wp_api = args[:wp_api]
59
+ @version = args[:version]
60
+ @verify_ssl = args[:verify_ssl] == true
61
+ @signature_method = args[:signature_method]
62
+ @debug_mode = args[:debug_mode]
63
+ @query_string_auth = args[:query_string_auth]
64
+ @httparty_args = args[:httparty_args]
90
65
  end
91
66
 
92
- protected
93
-
94
67
  # Internal: Appends data as query params onto an endpoint
95
68
  #
96
69
  # endpoint - A String naming the request endpoint.
97
70
  # data - A hash of data to flatten and append
98
71
  #
99
72
  # Returns an endpoint string with the data appended
100
- def add_query_params endpoint, data
73
+ def add_query_params(endpoint, data)
101
74
  return endpoint if data.nil? || data.empty?
102
75
 
103
76
  endpoint += "?" unless endpoint.include? "?"
@@ -111,8 +84,8 @@ module WooCommerce
111
84
  # method - The method used in the url (for oauth querys)
112
85
  #
113
86
  # Returns the endpoint String.
114
- def get_url endpoint, method
115
- api = @wp_api ? 'wp-json' : 'wc-api'
87
+ def get_url(endpoint, method)
88
+ api = @wp_api ? "wp-json" : "wc-api"
116
89
  url = @url
117
90
  url = "#{url}/" unless url.end_with? "/"
118
91
  url = "#{url}#{api}/#{@version}/#{endpoint}"
@@ -120,6 +93,56 @@ module WooCommerce
120
93
  @is_ssl ? url : oauth_url(url, method)
121
94
  end
122
95
 
96
+ # Internal: Generates an oauth url given current settings
97
+ #
98
+ # url - A String naming the current request url
99
+ # method - The HTTP verb of the request
100
+ #
101
+ # Returns a url to be used for the query.
102
+ def oauth_url(url, method)
103
+ oauth = WooCommerce::OAuth.new(
104
+ url,
105
+ method,
106
+ @version,
107
+ {
108
+ consumer_key: @consumer_key, consumer_secret: @consumer_secret,
109
+ signature_method: @signature_method
110
+ }
111
+ )
112
+ oauth.oauth_url
113
+ end
114
+
115
+ # Internal: Flattens a hash into an array of query relations
116
+ #
117
+ # hash - A hash to flatten
118
+ #
119
+ # Returns an array full of key value paired strings
120
+ def flatten_hash(hash)
121
+ hash.flat_map do |key, value|
122
+ case value
123
+ when Hash
124
+ remap_to_inner_hash(key, value)
125
+ when Array
126
+ value.map { |inner_value| "#{key}[]=#{inner_value}" }
127
+ else
128
+ "#{key}=#{value}"
129
+ end
130
+ end
131
+ end
132
+
133
+ # Internal: Remaps a hash to an array of key value paired strings
134
+ # used internally for flatten_hash
135
+ #
136
+ # key - A String naming the key
137
+ # value - A Hash to remap
138
+ #
139
+ # Returns an array full of key value paired strings
140
+ def remap_to_inner_hash(key, value)
141
+ value.map do |inner_key, inner_value|
142
+ "#{key}[#{inner_key}]=#{inner_value}"
143
+ end
144
+ end
145
+
123
146
  # Internal: Requests default options.
124
147
  #
125
148
  # method - A String naming the request method
@@ -127,7 +150,7 @@ module WooCommerce
127
150
  # data - The Hash data for the request.
128
151
  #
129
152
  # Returns the response in JSON String.
130
- def do_request method, endpoint, data = {}
153
+ def do_request(method, endpoint, data = {})
131
154
  url = get_url(endpoint, method)
132
155
  options = {
133
156
  format: :json
@@ -136,72 +159,86 @@ module WooCommerce
136
159
  # Allow custom HTTParty args.
137
160
  options = options.merge(@httparty_args)
138
161
 
139
- # Set headers.
162
+ add_headers(options, data)
163
+ authentication_options(options) if @is_ssl
164
+
165
+ options[:debug_output] = $stdout if @debug_mode
166
+ options[:body] = data.to_json unless data.empty?
167
+
168
+ HTTParty.send(method, url, options)
169
+ end
170
+
171
+ # Internal: Adds headers to the request options
172
+ # used internally for do_request
173
+ #
174
+ # options - The options hash to modify with headers
175
+ # data - The data for the request
176
+ #
177
+ # Returns the modified options hash
178
+ def add_headers(options, data)
140
179
  options[:headers] = {
141
180
  "User-Agent" => "WooCommerce API Client-Ruby/#{WooCommerce::VERSION}",
142
181
  "Accept" => "application/json"
143
182
  }
144
- options[:headers]["Content-Type"] = "application/json;charset=utf-8" if !data.empty?
183
+ options[:headers]["Content-Type"] = "application/json;charset=utf-8" unless data.empty?
184
+ end
185
+ end
145
186
 
146
- # Set basic authentication.
147
- if @is_ssl
148
- options[:verify] = @verify_ssl
187
+ # Initialize the API class
188
+ #
189
+ # @param url [String] The base URL of the WooCommerce store
190
+ # @param consumer_key [String] The consumer key for the API
191
+ # @param consumer_secret [String] The consumer secret for the API
192
+ # @param args [Hash] Additional configuration options
149
193
 
150
- if @query_string_auth
151
- options.merge!(query: {
152
- consumer_key: @consumer_key,
153
- consumer_secret: @consumer_secret
154
- })
155
- else
156
- options.merge!(basic_auth: {
157
- username: @consumer_key,
158
- password: @consumer_secret
159
- })
160
- end
161
- end
194
+ class API < ApiBase
195
+ # Public: GET requests.
196
+ #
197
+ # endpoint - A String naming the request endpoint.
198
+ # query - A Hash with query params.
199
+ #
200
+ # Returns the request Hash.
201
+ def get(endpoint, query = nil)
202
+ do_request :get, add_query_params(endpoint, query)
203
+ end
162
204
 
163
- options.merge!(debug_output: $stdout) if @debug_mode
164
- options.merge!(body: data.to_json) if !data.empty?
205
+ # Public: POST requests.
206
+ #
207
+ # endpoint - A String naming the request endpoint.
208
+ # data - The Hash data for the request.
209
+ #
210
+ # Returns the request Hash.
211
+ def post(endpoint, data)
212
+ do_request :post, endpoint, data
213
+ end
165
214
 
166
- HTTParty.send(method, url, options)
215
+ # Public: PUT requests.
216
+ #
217
+ # endpoint - A String naming the request endpoint.
218
+ # data - The Hash data for the request.
219
+ #
220
+ # Returns the request Hash.
221
+ def put(endpoint, data)
222
+ do_request :put, endpoint, data
167
223
  end
168
224
 
169
- # Internal: Generates an oauth url given current settings
225
+ # Public: DELETE requests.
170
226
  #
171
- # url - A String naming the current request url
172
- # method - The HTTP verb of the request
227
+ # endpoint - A String naming the request endpoint.
228
+ # query - A Hash with query params.
173
229
  #
174
- # Returns a url to be used for the query.
175
- def oauth_url url, method
176
- oauth = WooCommerce::OAuth.new(
177
- url,
178
- method,
179
- @version,
180
- @consumer_key,
181
- @consumer_secret,
182
- @signature_method
183
- )
184
- oauth.get_oauth_url
230
+ # Returns the request Hash.
231
+ def delete(endpoint, query = nil)
232
+ do_request :delete, add_query_params(endpoint, query)
185
233
  end
186
234
 
187
- # Internal: Flattens a hash into an array of query relations
235
+ # Public: OPTIONS requests.
188
236
  #
189
- # hash - A hash to flatten
237
+ # endpoint - A String naming the request endpoint.
190
238
  #
191
- # Returns an array full of key value paired strings
192
- def flatten_hash hash
193
- hash.flat_map do |key, value|
194
- case value
195
- when Hash
196
- value.map do |inner_key, inner_value|
197
- "#{key}[#{inner_key}]=#{inner_value}"
198
- end
199
- when Array
200
- value.map { |inner_value| "#{key}[]=#{inner_value}" }
201
- else
202
- "#{key}=#{value}"
203
- end
204
- end
239
+ # Returns the request Hash.
240
+ def options(endpoint)
241
+ do_request :options, add_query_params(endpoint, nil)
205
242
  end
206
243
  end
207
244
  end
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # -*- encoding: utf-8 -*-
4
- lib = File.expand_path("../lib", __FILE__)
3
+ lib = File.expand_path("lib", __dir__)
5
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
6
5
  # Version is loaded directly to avoid circular requires
7
6
  require_relative "lib/woocommerce_api/version"
@@ -9,7 +8,6 @@ require_relative "lib/woocommerce_api/version"
9
8
  Gem::Specification.new do |s|
10
9
  s.name = "woocommerce-ruby3-api"
11
10
  s.version = WooCommerce::VERSION
12
- s.date = "2025-10-04"
13
11
 
14
12
  s.summary = "A Ruby 3+ wrapper for the WooCommerce API"
15
13
  s.description = "This gem provides a wrapper to access the WooCommerce REST API, optimized for Ruby 3+"
@@ -17,7 +15,7 @@ Gem::Specification.new do |s|
17
15
 
18
16
  s.authors = ["Claudio Sanches", "Benjamin Randles-Dunkley"]
19
17
  s.email = "ben@chemica.co.uk"
20
-
18
+
21
19
  # Files included in the gem
22
20
  s.files = Dir[
23
21
  "lib/**/*.rb",
@@ -26,20 +24,18 @@ Gem::Specification.new do |s|
26
24
  "*.gemspec"
27
25
  ]
28
26
  s.require_paths = ["lib"]
29
-
30
- s.homepage = "https://github.com/chemica/woocommerce-ruby3-api"
27
+
28
+ s.homepage = "https://github.com/chemica/woocommerce-ruby3-api"
31
29
  s.required_ruby_version = ">= 3.1.0"
32
30
 
33
31
  s.rdoc_options = ["--charset=UTF-8"]
34
- s.extra_rdoc_files = %w[README.md LICENSE]
32
+ s.extra_rdoc_files = ["README.md", "LICENSE"]
35
33
 
34
+ s.add_runtime_dependency "addressable", "~> 2.8.1"
35
+ s.add_runtime_dependency "base64", "~> 0.2.0"
36
36
  s.add_runtime_dependency "httparty", "~> 0.23.1"
37
37
  s.add_runtime_dependency "json", "~> 2.10.2", ">= 2.6.0"
38
- s.add_runtime_dependency "base64", "~> 0.2.0"
39
- s.add_runtime_dependency "addressable", "~> 2.8.1"
40
-
41
- s.add_development_dependency "rake", "~> 13.2.1"
42
- s.add_development_dependency "minitest", "~> 5.25.5"
43
- s.add_development_dependency "webmock", "~> 3.25.1"
44
- s.add_development_dependency "bundler-audit", "~> 0.9.1"
38
+
39
+ # Security measures
40
+ s.metadata["rubygems_mfa_required"] = "true"
45
41
  end
metadata CHANGED
@@ -1,49 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woocommerce-ruby3-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Sanches
8
8
  - Benjamin Randles-Dunkley
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-04 00:00:00.000000000 Z
11
+ date: 1980-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: httparty
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.23.1
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.23.1
27
- - !ruby/object:Gem::Dependency
28
- name: json
14
+ name: addressable
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
17
  - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: 2.10.2
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: 2.6.0
19
+ version: 2.8.1
37
20
  type: :runtime
38
21
  prerelease: false
39
22
  version_requirements: !ruby/object:Gem::Requirement
40
23
  requirements:
41
24
  - - "~>"
42
25
  - !ruby/object:Gem::Version
43
- version: 2.10.2
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: 2.6.0
26
+ version: 2.8.1
47
27
  - !ruby/object:Gem::Dependency
48
28
  name: base64
49
29
  requirement: !ruby/object:Gem::Requirement
@@ -59,75 +39,39 @@ dependencies:
59
39
  - !ruby/object:Gem::Version
60
40
  version: 0.2.0
61
41
  - !ruby/object:Gem::Dependency
62
- name: addressable
42
+ name: httparty
63
43
  requirement: !ruby/object:Gem::Requirement
64
44
  requirements:
65
45
  - - "~>"
66
46
  - !ruby/object:Gem::Version
67
- version: 2.8.1
47
+ version: 0.23.1
68
48
  type: :runtime
69
49
  prerelease: false
70
50
  version_requirements: !ruby/object:Gem::Requirement
71
51
  requirements:
72
52
  - - "~>"
73
53
  - !ruby/object:Gem::Version
74
- version: 2.8.1
75
- - !ruby/object:Gem::Dependency
76
- name: rake
77
- requirement: !ruby/object:Gem::Requirement
78
- requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: 13.2.1
82
- type: :development
83
- prerelease: false
84
- version_requirements: !ruby/object:Gem::Requirement
85
- requirements:
86
- - - "~>"
87
- - !ruby/object:Gem::Version
88
- version: 13.2.1
54
+ version: 0.23.1
89
55
  - !ruby/object:Gem::Dependency
90
- name: minitest
56
+ name: json
91
57
  requirement: !ruby/object:Gem::Requirement
92
58
  requirements:
93
59
  - - "~>"
94
60
  - !ruby/object:Gem::Version
95
- version: 5.25.5
96
- type: :development
97
- prerelease: false
98
- version_requirements: !ruby/object:Gem::Requirement
99
- requirements:
100
- - - "~>"
101
- - !ruby/object:Gem::Version
102
- version: 5.25.5
103
- - !ruby/object:Gem::Dependency
104
- name: webmock
105
- requirement: !ruby/object:Gem::Requirement
106
- requirements:
107
- - - "~>"
61
+ version: 2.10.2
62
+ - - ">="
108
63
  - !ruby/object:Gem::Version
109
- version: 3.25.1
110
- type: :development
64
+ version: 2.6.0
65
+ type: :runtime
111
66
  prerelease: false
112
67
  version_requirements: !ruby/object:Gem::Requirement
113
68
  requirements:
114
69
  - - "~>"
115
70
  - !ruby/object:Gem::Version
116
- version: 3.25.1
117
- - !ruby/object:Gem::Dependency
118
- name: bundler-audit
119
- requirement: !ruby/object:Gem::Requirement
120
- requirements:
121
- - - "~>"
122
- - !ruby/object:Gem::Version
123
- version: 0.9.1
124
- type: :development
125
- prerelease: false
126
- version_requirements: !ruby/object:Gem::Requirement
127
- requirements:
128
- - - "~>"
71
+ version: 2.10.2
72
+ - - ">="
129
73
  - !ruby/object:Gem::Version
130
- version: 0.9.1
74
+ version: 2.6.0
131
75
  description: This gem provides a wrapper to access the WooCommerce REST API, optimized
132
76
  for Ruby 3+
133
77
  email: ben@chemica.co.uk
@@ -147,7 +91,8 @@ files:
147
91
  homepage: https://github.com/chemica/woocommerce-ruby3-api
148
92
  licenses:
149
93
  - MIT
150
- metadata: {}
94
+ metadata:
95
+ rubygems_mfa_required: 'true'
151
96
  rdoc_options:
152
97
  - "--charset=UTF-8"
153
98
  require_paths: