e_plat 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -3
- data/lib/e_plat/version.rb +1 -1
- data/lib/e_plat.rb +11 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63cb25eee6d28946048f347ddc3838b70b1166b7c2967cdd366415ed01934293
|
4
|
+
data.tar.gz: 0dd57db7198622888e6ecc5d06e122c396a3b73c60c62b9d1d2da269783a571f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04c061335ab6957ff48b665eb6260447e43989f900e0b4de9e9984ee6bcb3157d574aae8806d26cfa211414a871a50fc062c67d33ce1ea1df2a123c0d71e00cc
|
7
|
+
data.tar.gz: 0abe12aeb34a95283adfcc91a78260a9f69e7137011fec179e0912c171e29f31fb8caadbb563e15d2bb9f151ac2351574f3884800b7fd4610681e4e85bcf27a6
|
data/README.md
CHANGED
@@ -82,7 +82,7 @@ EPlat is designed to let you mostly use it's universal interface, but then easil
|
|
82
82
|
)
|
83
83
|
tag.name = "mini script" if Current.e_plat_session.bigcommerce?
|
84
84
|
tag.save
|
85
|
-
|
85
|
+
|
86
86
|
# ...when session is a Shopify store
|
87
87
|
# POST https://preproduct-test.myshopify.com/admin/api/2024-01/script_tags.json
|
88
88
|
# body: '{"script_tag":{"display_scope":"online_store","event":"onload","src":"https://preproduct.io/mini-script.js"}}'
|
@@ -829,8 +829,9 @@ product.mapped? "body_html" #check if a platforms resource is mapped to a specif
|
|
829
829
|
|
830
830
|
# In the context of a Bigcommerce product that has aliases:
|
831
831
|
product.changed_attributes # {}
|
832
|
-
product.
|
833
|
-
product.changed_attributes # {"name"=>"
|
832
|
+
product.title = "oi"
|
833
|
+
product.changed_attributes # {"name"=>"oi", "title"=>"oi"}
|
834
|
+
#title is the e_plat key which won't be included in requests to the server. The native key 'name' has automatically been updated and will be sent in requests.
|
834
835
|
|
835
836
|
```
|
836
837
|
|
data/lib/e_plat/version.rb
CHANGED
data/lib/e_plat.rb
CHANGED
@@ -20,9 +20,18 @@ loader.setup # ready!
|
|
20
20
|
|
21
21
|
module EPlat
|
22
22
|
extend Dry::Configurable
|
23
|
+
SUPPORTED_SHOPIFY_API_VERSIONS = ['2024_01']
|
24
|
+
SUPPORTED_BIGCOMMERCE_API_VERSIONS = ['3']
|
25
|
+
|
26
|
+
setting(:shopify_api_version, default: "2024_01", constructor: ->(value) do
|
27
|
+
SUPPORTED_SHOPIFY_API_VERSIONS.include?(value.underscore) ? value.underscore : raise(ArgumentError, "Shopify API version #{value} is not supported")
|
28
|
+
end)
|
29
|
+
|
30
|
+
setting(:bigcommerce_api_version, default: "v3", constructor: ->(value) do
|
31
|
+
v = value.downcase.gsub("v", "")
|
32
|
+
SUPPORTED_BIGCOMMERCE_API_VERSIONS.include?(v) ? v : raise(ArgumentError, "Bigcommerce API version #{value} is not supported")
|
33
|
+
end)
|
23
34
|
|
24
|
-
setting(:shopify_api_version, default: "2024_01", constructor: ->(value) { value.underscore })
|
25
|
-
setting(:bigcommerce_api_version, default: "v3", constructor: ->(value) { value.downcase.gsub("v", "") })
|
26
35
|
setting(:woocommerce_api_version, default: "v3", constructor: ->(value) { value.downcase.gsub("v", "") })
|
27
36
|
|
28
37
|
class Error < StandardError; 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.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- oliwoodsuk
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 6.0.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activeresource-response
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: dry-configurable
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|