shopify-storefront 0.0.2

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.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/shopify-storefront.rb +14 -0
  3. metadata +43 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9ba1c826af4f28a45bfa75c804084bc0a1781e2381ed0ae0372fb3d009b85c95
4
+ data.tar.gz: be06f62016581625a87351982f21fc30e8a35a83b86d0c9e9607c0969a7302e4
5
+ SHA512:
6
+ metadata.gz: 352353c8ae219915bcefaece39e937e5ba46cecf4c67b86a9ede1f7bef1452fb93f633ae2636f400d8d4d27d4c9d4f6007111424243b926a6f98303ebc28ff5c
7
+ data.tar.gz: 611ccf7d4360eb0ce099bcd13c9e554e74442665639e08e8a1f03e6d74f413efade26d01ab15e9e3c70f4723a849ef5dfd6fc098f8ae86991de44950bcbb1442
@@ -0,0 +1,14 @@
1
+ require "base64"
2
+
3
+ module Base64Filter
4
+ def base64_encode (input)
5
+ Base64.encode64(input)
6
+ end
7
+ def storefront_product_id (input)
8
+ str = Base64.encode64("gid://shopify/Product/#{input}")
9
+ puts str
10
+ return str
11
+ end
12
+ end
13
+
14
+ Liquid::Template.register_filter(Base64Filter) # register filter globally
metadata ADDED
@@ -0,0 +1,43 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shopify-storefront
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Ocupop Dev
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A filter for encoding url paths
14
+ email: dev@ocupop.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - lib/shopify-storefront.rb
20
+ homepage: https://github.com/ocupop/shopify-storefront
21
+ licenses:
22
+ - MIT
23
+ metadata: {}
24
+ post_install_message:
25
+ rdoc_options: []
26
+ require_paths:
27
+ - lib
28
+ required_ruby_version: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ required_rubygems_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ requirements: []
39
+ rubygems_version: 3.0.6
40
+ signing_key:
41
+ specification_version: 4
42
+ summary: Base64 encoding strings for Storefront API
43
+ test_files: []