shopify_url 0.0.1 → 0.0.3
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 +5 -5
- data/.github/workflows/main.yml +28 -0
- data/Changes +7 -0
- data/README.md +7 -1
- data/lib/shopify_url.rb +25 -2
- data/shopify_url.gemspec +2 -2
- metadata +13 -16
- data/.travis.yml +0 -19
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: f6004d88c0df6741c0c94d0114609026cca89eed018cb058353e6230a54088be
|
|
4
|
+
data.tar.gz: 86000760e077c5857c6fc2633bbd2685297b9ed8f2b54696a470223d88884cdb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a02bdd19feb49f1a7e8e98dfac5814d04e48662b0763a139bbb7771def3db125245fd83f0ea2e4ec5ffd35bd6f4815dbc9078ef1383e53ed2efbab0ed4cd3c43
|
|
7
|
+
data.tar.gz: e1e9ebc7ea287aa240247bc32d88550f6466b3b44f8be4df0238021fb8809505250369bdd816a45d5a1e7be124c54a638d6c37acd8c6701e77e74602c3009ecf
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Ruby
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
pull_request:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
name: Ruby ${{ matrix.ruby }}
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
ruby: ['4.0', '3.4', '3.3', '3.2', '3.1', '3.0', '2.7']
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v5
|
|
20
|
+
with:
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
- name: Set up Ruby
|
|
23
|
+
uses: ruby/setup-ruby@v1
|
|
24
|
+
with:
|
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
|
26
|
+
bundler-cache: true
|
|
27
|
+
- name: Run the default task
|
|
28
|
+
run: bundle exec rake
|
data/Changes
ADDED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Shopify URL
|
|
2
2
|
|
|
3
|
-
[](https://github.com/ScreenStaring/shopify_url/actions/workflows/main.yml)
|
|
4
4
|
|
|
5
5
|
Build URLs to Shopify web pages.
|
|
6
6
|
|
|
@@ -34,6 +34,12 @@ url.product(345323423).variant(2421342331)
|
|
|
34
34
|
|
|
35
35
|
See the RDocs for a complete list of methods.
|
|
36
36
|
|
|
37
|
+
#### Link to Enable Your App's Theme Embed
|
|
38
|
+
|
|
39
|
+
```rb
|
|
40
|
+
url.theme(:current).editor(:context => "apps", :activateAppId => "APPID/loader")
|
|
41
|
+
```
|
|
42
|
+
|
|
37
43
|
### Store URLs
|
|
38
44
|
```rb
|
|
39
45
|
require "shopify_url"
|
data/lib/shopify_url.rb
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
require "uri"
|
|
3
3
|
|
|
4
4
|
module ShopifyURL
|
|
5
|
-
VERSION = "0.0.
|
|
5
|
+
VERSION = "0.0.3"
|
|
6
6
|
TOP_LEVEL_DOMAIN = ".myshopify.com"
|
|
7
7
|
|
|
8
8
|
class Linker
|
|
@@ -147,7 +147,7 @@ module ShopifyURL
|
|
|
147
147
|
end
|
|
148
148
|
end
|
|
149
149
|
|
|
150
|
-
|
|
150
|
+
class Orders < String
|
|
151
151
|
def initialize(host, qs = nil)
|
|
152
152
|
super host + "/orders"
|
|
153
153
|
self << "?" << qs if qs
|
|
@@ -162,6 +162,20 @@ module ShopifyURL
|
|
|
162
162
|
end
|
|
163
163
|
end
|
|
164
164
|
|
|
165
|
+
class Theme < String
|
|
166
|
+
def initialize(base, id, qs = nil)
|
|
167
|
+
super base + "/themes/" << id.to_s
|
|
168
|
+
self << "?" << qs if qs
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Not the code editor, the theme customization page
|
|
172
|
+
def editor(params = nil)
|
|
173
|
+
url = self + "/editor"
|
|
174
|
+
url << "?" << URI.encode_www_form(params.to_a) if params && params.any?
|
|
175
|
+
url
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
165
179
|
class DraftOrder < String
|
|
166
180
|
def initialize(base, id, qs = nil)
|
|
167
181
|
super base + "/draft_orders/" << id.to_s
|
|
@@ -230,5 +244,14 @@ module ShopifyURL
|
|
|
230
244
|
def products(query = nil)
|
|
231
245
|
Products.new(host, q(query))
|
|
232
246
|
end
|
|
247
|
+
|
|
248
|
+
def themes
|
|
249
|
+
host + "/themes"
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
def theme(id, query = nil)
|
|
253
|
+
id_required!(id)
|
|
254
|
+
Theme.new(host, id, q(query))
|
|
255
|
+
end
|
|
233
256
|
end
|
|
234
257
|
end
|
data/shopify_url.gemspec
CHANGED
|
@@ -23,6 +23,6 @@ Gem::Specification.new do |spec|
|
|
|
23
23
|
spec.require_paths = ["lib"]
|
|
24
24
|
|
|
25
25
|
spec.add_development_dependency "bundler"
|
|
26
|
-
spec.add_development_dependency "rake"
|
|
27
|
-
spec.add_development_dependency "rspec"
|
|
26
|
+
spec.add_development_dependency "rake"
|
|
27
|
+
spec.add_development_dependency "rspec"
|
|
28
28
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: shopify_url
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Skye Shaw
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 2026-10-31 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: bundler
|
|
@@ -28,30 +27,30 @@ dependencies:
|
|
|
28
27
|
name: rake
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
|
-
- - "
|
|
30
|
+
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
32
|
+
version: '0'
|
|
34
33
|
type: :development
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
|
-
- - "
|
|
37
|
+
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
39
|
+
version: '0'
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: rspec
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
44
43
|
requirements:
|
|
45
|
-
- - "
|
|
44
|
+
- - ">="
|
|
46
45
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '
|
|
46
|
+
version: '0'
|
|
48
47
|
type: :development
|
|
49
48
|
prerelease: false
|
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
50
|
requirements:
|
|
52
|
-
- - "
|
|
51
|
+
- - ">="
|
|
53
52
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: '
|
|
53
|
+
version: '0'
|
|
55
54
|
description: Shopify URL allows you to build URLs to Shopify stores and the Admin
|
|
56
55
|
site that can be used as links
|
|
57
56
|
email:
|
|
@@ -60,9 +59,10 @@ executables: []
|
|
|
60
59
|
extensions: []
|
|
61
60
|
extra_rdoc_files: []
|
|
62
61
|
files:
|
|
62
|
+
- ".github/workflows/main.yml"
|
|
63
63
|
- ".gitignore"
|
|
64
64
|
- ".rspec"
|
|
65
|
-
-
|
|
65
|
+
- Changes
|
|
66
66
|
- Gemfile
|
|
67
67
|
- LICENSE.txt
|
|
68
68
|
- README.md
|
|
@@ -73,7 +73,6 @@ homepage: https://github.com/ScreenStaring/shopify_url
|
|
|
73
73
|
licenses:
|
|
74
74
|
- MIT
|
|
75
75
|
metadata: {}
|
|
76
|
-
post_install_message:
|
|
77
76
|
rdoc_options: []
|
|
78
77
|
require_paths:
|
|
79
78
|
- lib
|
|
@@ -88,9 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
88
87
|
- !ruby/object:Gem::Version
|
|
89
88
|
version: '0'
|
|
90
89
|
requirements: []
|
|
91
|
-
|
|
92
|
-
rubygems_version: 2.6.14
|
|
93
|
-
signing_key:
|
|
90
|
+
rubygems_version: 3.6.2
|
|
94
91
|
specification_version: 4
|
|
95
92
|
summary: Build URLs for Shopify websites
|
|
96
93
|
test_files: []
|
data/.travis.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
sudo: false
|
|
3
|
-
language: ruby
|
|
4
|
-
cache: bundler
|
|
5
|
-
rvm:
|
|
6
|
-
- 2.2
|
|
7
|
-
- 2.3
|
|
8
|
-
- 2.4
|
|
9
|
-
- 2.5
|
|
10
|
-
- 2.6
|
|
11
|
-
- 2.7
|
|
12
|
-
|
|
13
|
-
# https://docs.travis-ci.com/user/languages/ruby/#bundler-20
|
|
14
|
-
before_install:
|
|
15
|
-
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true
|
|
16
|
-
- gem install bundler -v '< 2'
|
|
17
|
-
|
|
18
|
-
notifications:
|
|
19
|
-
email: false
|