pagiii 0.0.7 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d70f2977bee3d72cf6643ed1a34093612c20c754b85b089b256797d91124eaba
4
- data.tar.gz: 98a77db5ba8d05143d015b9e07e52d73d1f3e671f77ee6508cc531dc08a142ee
3
+ metadata.gz: ecdc0c8db653928957edfe3880cfc2eab288bedf267c17930867181e0b6b50ab
4
+ data.tar.gz: 4765852152a467195a6e28a3ece4950571c155c4243f4908691cb8c41831d004
5
5
  SHA512:
6
- metadata.gz: ccd0773591d3d0bd8eabf5cd8dbcadd169255ae0e7b529ef17c19c25673e00f85723445c602eb6279fda5f4f3db6d0d8d0a0657a43c2cbbe40ac0a40a637965a
7
- data.tar.gz: b543b85fa75d1a7ead7043d763cb1ad82f6946eee4ab83a95ec95c51e290b443ddd430b2b3dde52b0577f7dfaf4815f97bedd44a0c18bb7d64572b510fd2f91c
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.duruxignition.com"
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.7'
22
+ program :version, '0.0.9'
23
23
  program :description, 'Pagiii CLI'
24
24
 
25
25
 
@@ -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
- puts "----#{file}"
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.7
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-14 00:00:00.000000000 Z
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: