active_fulfillment 3.2.10 → 3.2.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d2f2bc1e7527f482f533716bc17c0d590807f9a91d29c5eb60ca6b96f943aab
4
- data.tar.gz: b0e85546fe8d3942a241771de702ae9cad16f5b543470a2eceb94dbdb668c624
3
+ metadata.gz: 5a9b9b2acd1f20e8d2ada62d9bc3d0544dc51f72fcbb9bc473f9958efd6c0d7b
4
+ data.tar.gz: b9e205c36d36a4e7fabc9890d9e54572531e143df9fc89f1121e958b4267884f
5
5
  SHA512:
6
- metadata.gz: 8cd7609c6cfd4df16874a25c2319267d6aac8d58ed9755ddeadeb6467750c3c8794d95197f051e81137a3ce358333670cf51b7e3c7250cba62fd4705af96675e
7
- data.tar.gz: da98accaf911f8a6d6ee152feafc400a9425c567c62a4aff908ea9ce4c1b67fe500d392442685a1d88d2747446c6a7f5924588a0b648ede78c319e1233257c8d
6
+ metadata.gz: 0c231a91b35cdda7ba0395c3c5190b1401902b6b2ca6ec7266de08a25f231e507591057f4b1a3b551f84b67eeabd4b21139e6b023cdbfb5f179825bfb73a8bf8
7
+ data.tar.gz: f0bfa7d61333afb33f453587a609749035e6288519541e5beb76d0b4d5a86b209a4f10677410c7b528dca4ff816af01be285d07fa0d648f98dc933c535aa813b
@@ -1,5 +1,8 @@
1
1
  # ActiveFulfillment changelog
2
2
 
3
+ ### Version 3.2.11 (September 11, 2020)
4
+ - Fix callback url to handle trailing segment and trailing slash
5
+
3
6
  ### Version 3.2.10 (September 1, 2020)
4
7
  - Relax ruby version requirement to allow installation on Ruby 3.0
5
8
 
@@ -68,7 +68,7 @@ module ActiveFulfillment
68
68
  private
69
69
 
70
70
  def request_uri(action, data)
71
- url = URI.join(@callback_url, "#{action}.#{@format}?#{data.to_query}")
71
+ url = File.join(@callback_url, "#{action}.#{@format}?#{data.to_query}")
72
72
  end
73
73
 
74
74
  def send_app_request(action, headers, data)
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module ActiveFulfillment
3
- VERSION = "3.2.10"
3
+ VERSION = "3.2.11"
4
4
  end
@@ -35,6 +35,19 @@ class ShopifyAPITest < Minitest::Test
35
35
  end
36
36
  end
37
37
 
38
+ def test_request_uri_is_correct_when_callback_url_has_additional_element
39
+ Timecop.freeze do
40
+ service = build_service(callback_url: 'https://dotcom-prod.bluemercuryio.com/v1/dotcom')
41
+ timestamp = Time.now.utc.to_i
42
+ uri = service.send(:request_uri, 'fetch_stock', {sku: '123', timestamp: timestamp, shop: 'www.snowwowdevil.ca'})
43
+ assert_equal "https://dotcom-prod.bluemercuryio.com/v1/dotcom/fetch_stock.json?shop=www.snowwowdevil.ca&sku=123&timestamp=#{timestamp}", uri.to_s
44
+
45
+ service = build_service(callback_url: 'http://supershopifyapptwin.com/shopify/')
46
+ uri = service.send(:request_uri, 'fetch_stock', {sku: '123', timestamp: timestamp, shop: 'www.snowwowdevil.ca'})
47
+ assert_equal "http://supershopifyapptwin.com/shopify/fetch_stock.json?shop=www.snowwowdevil.ca&sku=123&timestamp=#{timestamp}", uri.to_s
48
+ end
49
+ end
50
+
38
51
  def test_response_from_failed_stock_request
39
52
  mock_app_request('fetch_stock', anything, nil)
40
53
  response = @service.fetch_stock_levels()
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_fulfillment
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.10
4
+ version: 3.2.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Fauser
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-09-01 00:00:00.000000000 Z
12
+ date: 2020-09-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport