pagiii 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/pagiii +5 -10
  3. data/lib/pagiii/theme_sync.rb +2 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2fe9ec1ddc232ed551e6cb30a884545ec59970b3100002978490eaf799b3a3a
4
- data.tar.gz: dcbc6259ae1eb30b35c76d5696cf4ae75956162359e446afc17b3ab4338ed516
3
+ metadata.gz: f411cb7c273f1b38e4bc59325c7b8d9042da6b7ce9a45abefcf91e1e475b9276
4
+ data.tar.gz: 5e1562b9c696200a58cdaa99defa596635d909b1281e28ccf082b0ceae2c7968
5
5
  SHA512:
6
- metadata.gz: aa04567bc09e65b8a88a2997090bd1c4d6b48a7ea574dc84fda1bd02a4f3ac9ddafa6410c5c227dafc2ba22395f6c7d3a14982a773b42da7efddd37b0c2b4ab4
7
- data.tar.gz: 1a15296efcc294ebdc6aee0ef9ce41694576e9d218c2260aa81c20527110d659e4d9a75e8ba1ff221f8f284916ff3ac91783a0e9c1fae75e02b9612670c39d61
6
+ metadata.gz: 9c0b536ef4c9fbb5ac10ccaeb4a8d0adfb7e395449e08e512b9b2d45b044884098fd3e4eb1f15f1cd92182a4ea7355e5fb3f7c79f2ff6f174880ffa5180ceaea
7
+ data.tar.gz: 3584c4bf74c587d7e260e77e4c17fbab05701cc87568302fd9ddb29dcd45b8753428c6cf287d30857abe283f4a157bb6130b12f6ec8e5e53ed9ad6ed96f48214
data/bin/pagiii CHANGED
@@ -14,12 +14,7 @@ def root_api
14
14
  "https://pagiii.com"
15
15
  end
16
16
 
17
- client_id = 'IuIwOC38m7acKuJRo-nkG22ZzeVpWLDPMPnoaoRzQp8'
18
- secret_id = 'WlENailhg7KEbZqXXwX4Y470HYGL8-U2af_bOZGVWeQ'
19
- redirect_uri = 'http://localhost:7654'
20
- scope = 'read_theme write_theme delete_theme'
21
-
22
- program :version, '0.1.3'
17
+ program :version, '0.1.4'
23
18
  program :description, 'Pagiii CLI'
24
19
 
25
20
 
@@ -51,10 +46,10 @@ end
51
46
 
52
47
  def update_config(email, password)
53
48
  dir = "#{Dir.home}/.pagiii"
54
- FileUtils.mkdir_p(dir) unless Dir.exists?(dir)
49
+ FileUtils.mkdir_p(dir) unless Dir.exist?(dir)
55
50
  file = File.join(dir, 'config.json')
56
51
  hash = {}
57
- if File.exists?(file)
52
+ if File.exist?(file)
58
53
  hash = JSON.parse(IO.read(file))
59
54
  end
60
55
  hash[:email] = email
@@ -67,9 +62,9 @@ end
67
62
 
68
63
  def read_config
69
64
  dir = "#{Dir.home}/.pagiii"
70
- return nil unless Dir.exists?(dir)
65
+ return nil unless Dir.exist?(dir)
71
66
  file = File.join(dir, 'config.json')
72
- return nil unless File.exists?(file)
67
+ return nil unless File.exist?(file)
73
68
  hash = JSON.parse(IO.read(file))
74
69
  hash
75
70
  end
@@ -224,7 +224,7 @@ class Pagiii::ThemeSync
224
224
  say "downloading #{asset['asset_key']}"
225
225
  response = download_asset(site: site, theme_id: parsed_response['theme']['id'], key: asset['asset_key'])
226
226
  path = File.split(asset['asset_key'])
227
- FileUtils.mkdir(path.first) unless Dir.exists?(path.first)
227
+ FileUtils.mkdir(path.first) unless Dir.exist?(path.first)
228
228
  File.open(asset['asset_key'], 'wb') do |f|
229
229
  f.write(response.body)
230
230
  end
@@ -302,4 +302,4 @@ class Pagiii::ThemeSync
302
302
  end
303
303
 
304
304
 
305
- end
305
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagiii
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sugiarto