productshotai-site-kit 0.1.0
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 +7 -0
- data/lib/productshotai_site_kit.rb +47 -0
- metadata +41 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 48132c4e53c6b8106ae14c5b11bf37a5b38f5fd2c04e538904fb8a0590b9061e
|
|
4
|
+
data.tar.gz: 40fbddbffb8b6266155c8510eb52152cc850ab957f1674e21c10929fee5f30f5
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 213bcc396ee4e069946fc8fafb18a06f14a3afbaa94263b08a0101b0cec83597abfd35d5e529fda8b873e06fcc7b44c7bbd249128d836b9ad95cc1ea9ae4aa02
|
|
7
|
+
data.tar.gz: bc57b786911b34a7bcef10d96fb17e680c87477e84bf01384a2b4e02a40798d7add28fcdfeedc6c6728f03c926484a8e8f58b85dfe23fa7b8326c1f5921da32a
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Public URL helpers for ProductShot AI.
|
|
2
|
+
|
|
3
|
+
module ProductshotaiSiteKit
|
|
4
|
+
BASE = "https://productshotai.app"
|
|
5
|
+
BRAND = "ProductShot AI"
|
|
6
|
+
DESCRIPTION = "AI product photography generator for ecommerce sellers."
|
|
7
|
+
|
|
8
|
+
def self.page_url(path = "/")
|
|
9
|
+
value = path.to_s.empty? ? "/" : path.to_s
|
|
10
|
+
value = "/#{value}" unless value.start_with?("/")
|
|
11
|
+
clean = value == "/" ? "/" : "#{value.gsub(%r{/+$}, '')}/"
|
|
12
|
+
"#{BASE}#{clean}"
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.localized_url(locale, path = "/")
|
|
16
|
+
return page_url(path) if locale == "en"
|
|
17
|
+
if ["zh", "zh-CN"].include?(locale)
|
|
18
|
+
value = path.to_s.empty? ? "/" : path.to_s
|
|
19
|
+
value = "/#{value}" unless value.start_with?("/")
|
|
20
|
+
return page_url("/zh#{value == '/' ? '' : value}")
|
|
21
|
+
end
|
|
22
|
+
raise ArgumentError, "unsupported locale: #{locale}"
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.metadata
|
|
26
|
+
{
|
|
27
|
+
name: BRAND, homepage: BASE, description: DESCRIPTION,
|
|
28
|
+
canonical_pages: {
|
|
29
|
+
home: home_url, workbench: workbench_url, pricing: pricing_url, blog: blog_url,
|
|
30
|
+
about: about_url, contact: contact_url, privacy: privacy_url, terms: terms_url,
|
|
31
|
+
refund_policy: refund_policy_url, zh_home: zh_home_url
|
|
32
|
+
},
|
|
33
|
+
tags: ["productshot", "ai-product-photography", "ecommerce-product-photos", "url-helpers"]
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def self.home_url = page_url("/")
|
|
38
|
+
def self.workbench_url = "#{BASE}/#workbench"
|
|
39
|
+
def self.pricing_url = "#{BASE}/#pricing"
|
|
40
|
+
def self.blog_url = page_url("/blog")
|
|
41
|
+
def self.about_url = page_url("/about")
|
|
42
|
+
def self.contact_url = page_url("/contact")
|
|
43
|
+
def self.privacy_url = page_url("/privacy")
|
|
44
|
+
def self.terms_url = page_url("/terms")
|
|
45
|
+
def self.refund_policy_url = page_url("/refund-policy")
|
|
46
|
+
def self.zh_home_url = localized_url("zh", "/")
|
|
47
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: productshotai-site-kit
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- ProductShot AI
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies: []
|
|
12
|
+
description: URL helpers and metadata utilities for ProductShot AI - AI product photography
|
|
13
|
+
generator for ecommerce product photos
|
|
14
|
+
executables: []
|
|
15
|
+
extensions: []
|
|
16
|
+
extra_rdoc_files: []
|
|
17
|
+
files:
|
|
18
|
+
- lib/productshotai_site_kit.rb
|
|
19
|
+
homepage: https://productshotai.app
|
|
20
|
+
licenses:
|
|
21
|
+
- MIT
|
|
22
|
+
metadata:
|
|
23
|
+
source_code_uri: https://github.com/bbwdadfg/productshotai-site-kit
|
|
24
|
+
rdoc_options: []
|
|
25
|
+
require_paths:
|
|
26
|
+
- lib
|
|
27
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
28
|
+
requirements:
|
|
29
|
+
- - ">="
|
|
30
|
+
- !ruby/object:Gem::Version
|
|
31
|
+
version: '0'
|
|
32
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
33
|
+
requirements:
|
|
34
|
+
- - ">="
|
|
35
|
+
- !ruby/object:Gem::Version
|
|
36
|
+
version: '0'
|
|
37
|
+
requirements: []
|
|
38
|
+
rubygems_version: 4.0.11
|
|
39
|
+
specification_version: 4
|
|
40
|
+
summary: URL helpers for ProductShot AI
|
|
41
|
+
test_files: []
|