kajabi_theme 0.4.1 → 0.4.2

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: df33aea034afc8e0d8dfe7c0927907e24a4de90dc49b853ea18bc6625a86eae5
4
- data.tar.gz: bb95d8f715fa72d0f0682db1cc6fba453cfad9556f9789252c87d98042df96c4
3
+ metadata.gz: 65c092349726de16d31fb998473d5de9741c01a091d9c6bc45ae490d717cc071
4
+ data.tar.gz: 24f77e23f07c1e5992ea1364c5539f702968f400482dee3b3e29489712546509
5
5
  SHA512:
6
- metadata.gz: 8c0e2df06f3a5e7a6a29a7ba5bc4dacb2f6afc3e14b820041715608185d22f4d9a549de49b782e34a3b7a75c300fe9283fd7ef4b7c5b85ad6aa662f528724118
7
- data.tar.gz: '086f415988ad632b67b626f687b144904f5f110d56c3a9096641664357fcdede213b8c70f67812f98a5f3d6d396f8fe4a56944db31e80832260c13969f32242d'
6
+ metadata.gz: 2af450f8b954e6472ff376be2f00da4748cc1155a23dfbaf6b868ffe6aa509dcfe84dcb6ff1fd74a9deb4c48235b6200445525a5cb9390337d74890adf5a3ed8
7
+ data.tar.gz: 451461e62d8a04dee4e7ab3f00108279b68aefbf182705d4ee2890fa08b621d6ceb34e9b40e3615c9db8c59a92f6481abed4f388d23011741a0c90a306db6671
@@ -12,7 +12,7 @@ module KajabiTheme
12
12
  include Thor::Actions
13
13
 
14
14
  FOLDERS=%w[config templates layouts sections snippets assets].freeze
15
- ACCOUNT_SETTINGS_URL="https://app.newkajabi.com/admin/settings/account"
15
+ ACCOUNT_SETTINGS_URL="https://app.kajabi.com/admin/settings/account"
16
16
 
17
17
  attr_reader :name
18
18
  attr_reader :updated_at
@@ -20,14 +20,18 @@ module KajabiTheme
20
20
  attr_reader :presigned_post
21
21
 
22
22
  desc "sync", "Sync all files to Kajabi"
23
+ option :concurrency, type: :numeric, default: 20, desc: "Maximum simultaneous uploads", aliases: :c
23
24
  def sync(force=true)
25
+ self.concurrency = options[:concurrency]
24
26
  refresh!
25
27
  (force ? files : changed_files).each {|f| send_file(f)}
26
28
  hydra.run
27
29
  end
28
30
 
29
31
  desc "watch", "Sync and watch for changes"
32
+ option :concurrency, type: :numeric, default: 20, desc: "Maximum simultaneous uploads", aliases: :c
30
33
  def watch
34
+ self.concurrency = options[:concurrency]
31
35
  refresh!
32
36
  sync(false)
33
37
 
@@ -65,7 +69,16 @@ module KajabiTheme
65
69
  end
66
70
 
67
71
  def host
68
- @host ||= config[:host] || "https://app.newkajabi.com/"
72
+ @host ||= config[:host] || "https://app.kajabi.com/"
73
+ end
74
+
75
+ def concurrency
76
+ @concurrency || 20
77
+ end
78
+
79
+ def concurrency=(val)
80
+ val = val.to_i
81
+ @concurrency = val if val.positive?
69
82
  end
70
83
 
71
84
  def id
@@ -81,7 +94,7 @@ module KajabiTheme
81
94
  end
82
95
 
83
96
  def hydra
84
- @hydra ||= Typhoeus::Hydra.new(max_concurrency: 20)
97
+ @hydra ||= Typhoeus::Hydra.new(max_concurrency: concurrency)
85
98
  end
86
99
 
87
100
  def http_credentials
@@ -117,7 +130,8 @@ module KajabiTheme
117
130
  say "Request timed out", :red
118
131
  elsif response.code == 0
119
132
  # Could not get an http response, something's wrong.
120
- say "Request timed out", :red
133
+ say "Something went wrong: #{response.return_message}", :red
134
+ say "URL: #{response.request.url}", :red
121
135
  else
122
136
  # Received a non-successful http response.
123
137
  say "HTTP request failed: #{response.code.to_s} #{response.body.to_s}", :red
@@ -1,3 +1,3 @@
1
1
  module KajabiTheme
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kajabi_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Saenz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-19 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -135,8 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.7.10
138
+ rubygems_version: 3.1.2
140
139
  signing_key:
141
140
  specification_version: 4
142
141
  summary: Command line tool for developing themes