e_plat 0.9.8 → 1.0.0.pre.rc.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: 1615e2ddbf7dde56402eca06bff0271b18b9228f38cb1f9ea8128260028675d7
4
- data.tar.gz: 615d92b7a9f7d1a707675e016ea50677f3bc2a995ff24a2d8c12d66700b9b53d
3
+ metadata.gz: d531510e597dfd91db43836cb0ca14b43e25a8a0ccc5a600fff5ba78ffd4d8dd
4
+ data.tar.gz: b9ea3309d8155184540da4a0eeb0d8a265084ed03d3665e3249b5c220d5c443f
5
5
  SHA512:
6
- metadata.gz: 5e5a6503b69bcc690367d3e06e5ea766d2af5344d3c990171e99615f0563c6b0b5abce9a33816c4b43a508a42f57026b4ca5c41df4d5219d7d76a7ada6aadf8b
7
- data.tar.gz: 32dfbaaf3b4e06ca683ae9505ce38103d4d4facf3cc83e3deb91028a8a64ad7d334eca2f4338e0b29bbec4ae0cabf18283a0248cbfc0f2409f9db3f91a1ec60b
6
+ metadata.gz: 474b277d811d3e4785270a55abc99aa02be610089f90b0c2cd32b6097262815aa0ed675aac797bcb33829bbea1154fbbe060b745d6c4d9e062a15e9cd73e3ab4
7
+ data.tar.gz: 909e0c7d97acdf2afc68244f9fbeb7ec7d652a2b1114810c21b19052d64d250d0a256472c3b6ec88f7faa57babad1651c32a99fab47d8d6e155bc2ce538bc3ec
data/README.md CHANGED
@@ -254,8 +254,8 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
254
254
  | sku | string | * | sku | nil |
255
255
  | position | integer | * | nil | nil |
256
256
  | inventory_policy | string | * | nil | nil |
257
- | compare_at_price | string | * | nil | nil |
258
- | inventory_management | boolean | inventoryItem[tracked] | nil | nil |
257
+ | compare_at_price | string | * | retail_price | nil |
258
+ | inventory_management | boolean | inventoryItem[tracked] | nil | nil |
259
259
  | created_at | datetime | * | nil | nil |
260
260
  | updated_at | datetime | * | nil | nil |
261
261
  | taxable | boolean | * | nil | nil |
@@ -799,8 +799,6 @@ Unfortunately it's in a Time Integer format. Haven't yet got dynamic conversion
799
799
  <strong>ShopifyAPI::AccessScope</strong> doesn't have other platform API equivilents.
800
800
  (although should be kept track of locally)
801
801
  </li>
802
- <li>
803
- <strong>GraphQL</strong>. EPlat just handles REST (for now, although we plan to change the internals for Shopify product to use Graphql under the hood)
804
802
  <ul>
805
803
  </details>
806
804
 
@@ -92,6 +92,9 @@ module EPlat
92
92
  },
93
93
  {
94
94
  alias_attribute: {native_key: "inventory_level", e_plat_key: "inventory_quantity"}
95
+ },
96
+ {
97
+ alias_attribute: {native_key: "retail_price", e_plat_key: "compare_at_price"}
95
98
  }
96
99
  ])
97
100
  end
@@ -53,17 +53,25 @@ class EPlat::Shopify::GraphQL::V202407::Input
53
53
  enum_friendly(item, key: key)
54
54
  end
55
55
  end
56
-
57
- def enum_friendly(value, key: nil)
58
- case
56
+
57
+ def enum_friendly(value, key: nil)
58
+ case
59
59
  when key == "tags"
60
- "\"#{value}\""
61
- when value.is_a?(String)
62
- value.match?(/\A[A-Z_]+\z/) ? value : "\"#{value}\""
63
- else
64
- value
65
- end
66
- end
60
+ "\"#{single_quotes_only(value)}\""
61
+ when value.is_a?(String)
62
+ if value.match?(/\A[A-Z_]+\z/)
63
+ value
64
+ else
65
+ "\"#{single_quotes_only(value)}\""
66
+ end
67
+ else
68
+ value
69
+ end
70
+ end
71
+
72
+ def single_quotes_only(value)
73
+ value&.gsub("\"", "'")
74
+ end
67
75
 
68
76
  def format_graphql_args(args, key: nil)
69
77
  args.map do |key, value|
@@ -1,3 +1,3 @@
1
1
  module EPlat
2
- VERSION = "0.9.8"
3
- end
2
+ VERSION = "1.0.0-rc.1"
3
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e_plat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.8
4
+ version: 1.0.0.pre.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - oliwoodsuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-18 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -432,9 +432,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
432
432
  version: 3.0.0
433
433
  required_rubygems_version: !ruby/object:Gem::Requirement
434
434
  requirements:
435
- - - ">="
435
+ - - ">"
436
436
  - !ruby/object:Gem::Version
437
- version: '0'
437
+ version: 1.3.1
438
438
  requirements: []
439
439
  rubygems_version: 3.4.1
440
440
  signing_key: