pagiii 0.0.7 → 0.0.9
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 +4 -4
- data/bin/pagiii +2 -2
- data/lib/pagiii/theme_sync.rb +9 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ecdc0c8db653928957edfe3880cfc2eab288bedf267c17930867181e0b6b50ab
|
|
4
|
+
data.tar.gz: 4765852152a467195a6e28a3ece4950571c155c4243f4908691cb8c41831d004
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 495f578b54941444565c478263eefee5425d3769227b26841d0934d7b5ce555aeaeaa6e0bebdab1371387fa517f811db3ebb060be2cada6ff13a3e2fb65651d9
|
|
7
|
+
data.tar.gz: 72d505981c3ce53447cc0d3fcc41a7ccca2e2586649da0559d69da36071911c0056b07a779da398813244ba193c9c75f5f9c9f21597d761a97119198d724dabf
|
data/bin/pagiii
CHANGED
|
@@ -11,7 +11,7 @@ require 'socket'
|
|
|
11
11
|
|
|
12
12
|
def root_api
|
|
13
13
|
return ENV['PAGIII_HOST'] if ENV['PAGIII_HOST']
|
|
14
|
-
"https://pagiii.
|
|
14
|
+
"https://pagiii.com"
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
client_id = 'IuIwOC38m7acKuJRo-nkG22ZzeVpWLDPMPnoaoRzQp8'
|
|
@@ -19,7 +19,7 @@ secret_id = 'WlENailhg7KEbZqXXwX4Y470HYGL8-U2af_bOZGVWeQ'
|
|
|
19
19
|
redirect_uri = 'http://localhost:7654'
|
|
20
20
|
scope = 'read_theme write_theme delete_theme'
|
|
21
21
|
|
|
22
|
-
program :version, '0.0.
|
|
22
|
+
program :version, '0.0.9'
|
|
23
23
|
program :description, 'Pagiii CLI'
|
|
24
24
|
|
|
25
25
|
|
data/lib/pagiii/theme_sync.rb
CHANGED
|
@@ -34,7 +34,7 @@ class Pagiii::ThemeSync
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def sync_file(theme_name, file)
|
|
37
|
-
puts "sync #{file}"
|
|
37
|
+
#puts "sync #{file}"
|
|
38
38
|
conn = Faraday.new(
|
|
39
39
|
url: @root_api,
|
|
40
40
|
params: {param: '1'},
|
|
@@ -148,9 +148,15 @@ class Pagiii::ThemeSync
|
|
|
148
148
|
if ALLOWED_DIRS.include?(dir) && File.directory?(dir)
|
|
149
149
|
puts "--#{dir}"
|
|
150
150
|
Dir.entries(dir).reject{|x| [".", ".."].include?(x)}.each do |file|
|
|
151
|
-
|
|
151
|
+
print "----#{file}"
|
|
152
152
|
file_path = "./#{dir}/#{file}"
|
|
153
|
-
sync_file(theme, file_path)
|
|
153
|
+
resp = sync_file(theme, file_path)
|
|
154
|
+
if resp.status == 200
|
|
155
|
+
puts " [OK]"
|
|
156
|
+
else
|
|
157
|
+
json = JSON.parse(resp.body)
|
|
158
|
+
puts " [FAILED] #{json['message']}"
|
|
159
|
+
end
|
|
154
160
|
end
|
|
155
161
|
end
|
|
156
162
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pagiii
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sugiarto
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-06-
|
|
11
|
+
date: 2023-06-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: CLI to support themes on pagiii CMS
|
|
14
14
|
email:
|