neocities 0.0.19 → 0.0.20

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: c5baf997b1c58eaf0d7b2c7487623ab49966d72f0a637b0bbf32111a0608ad12
4
- data.tar.gz: 16b8cf7786e0cf714f41f00e49bb97038ffaf1de1c72ba656e0223b9a3c9aa15
3
+ metadata.gz: 5031613f2ead49cb8b0d897ba928dca50121afbc65b0f624afd89038c6f97c3e
4
+ data.tar.gz: 3f6a7813f75c2d0d667700258a5f2a9a60b74176b69cee5c1d26d95892970a91
5
5
  SHA512:
6
- metadata.gz: b1459d3bff5633233a3968a4fab5033df7b8048435786e5c2642aa5fe4123061ed69f957e186cff1c0f9ba45b0249e188c21a96a56b80df87bacd1cd3532727c
7
- data.tar.gz: 64eeed0bbf5fe5381d2eb8d9641cd00832a4be0369e32ad3da4a4ab9544976c4f8574c40274a6a3f64b1146259939fd21e71533628143c0562241735e0bce112
6
+ metadata.gz: b1ae46e13488bbdd244da5e1f3eb005002f6a2e9a687c9682fc2055ccaf054c76de1f9386ed578b7462745acf1c53d7fac81957b41b474b2f0422ab5823d3f09
7
+ data.tar.gz: a72a64b9bc2ea15a3c7c6ad01f8f405802c5476e96b8975081d3e7dbef531543838eb029fcba108c7cc7a96e89725fac8855500c0c8ffd8922235f05a86fb9b9
data/Gemfile CHANGED
@@ -1,6 +1,3 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
3
2
 
4
- # cursor whirlies (for loading)
5
- gem 'whirly'
6
- gem 'paint'
3
+ gemspec
data/lib/neocities/cli.rb CHANGED
@@ -200,8 +200,9 @@ module Neocities
200
200
  end
201
201
  end
202
202
 
203
- if @dry_run
204
- puts @pastel.green.bold("Doing a dry run, not actually pushing anything")
203
+ if @subargs[0].nil?
204
+ display_response result: 'error', message: "no local path provided"
205
+ display_push_help_and_exit
205
206
  end
206
207
 
207
208
  root_path = Pathname @subargs[0]
@@ -216,6 +217,10 @@ module Neocities
216
217
  display_push_help_and_exit
217
218
  end
218
219
 
220
+ if @dry_run
221
+ puts @pastel.green.bold("Doing a dry run, not actually pushing anything")
222
+ end
223
+
219
224
  if @prune
220
225
  pruned_dirs = []
221
226
  resp = @client.list
@@ -65,6 +65,7 @@ module Neocities
65
65
  end
66
66
 
67
67
  # fetch each file
68
+ uri_parser = URI::Parser.new
68
69
  resp[:files].each do |file|
69
70
  if !file[:is_directory]
70
71
  print @pastel.bold("Loading #{file[:path]} ... ") if !quiet
@@ -80,7 +81,7 @@ module Neocities
80
81
  next
81
82
  end
82
83
 
83
- pathtotry = domain + file[:path]
84
+ pathtotry = uri_parser.escape(domain + file[:path])
84
85
  fileconts = @http.get pathtotry
85
86
 
86
87
  # follow redirects
@@ -1,3 +1,3 @@
1
1
  module Neocities
2
- VERSION = '0.0.19'
2
+ VERSION = '0.0.20'
3
3
  end
data/neocities.gemspec CHANGED
@@ -21,5 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.add_dependency 'tty-prompt', '~> 0.12', '= 0.12.0'
22
22
  spec.add_dependency 'pastel', '~> 0.7', '= 0.7.2'
23
23
  spec.add_dependency 'httpclient-fixcerts', '~> 2.8', '>= 2.8.5'
24
- spec.add_dependency 'rake', '~> 12.3', '>= 12.3.1'
24
+ spec.add_dependency 'rake', '~> 12.3', '>= 12.3.1'
25
+ spec.add_dependency 'whirly', '~> 0.3', '>= 0.3.0'
25
26
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: neocities
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Drake
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-08 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-table
@@ -110,6 +110,26 @@ dependencies:
110
110
  - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: 12.3.1
113
+ - !ruby/object:Gem::Dependency
114
+ name: whirly
115
+ requirement: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - "~>"
118
+ - !ruby/object:Gem::Version
119
+ version: '0.3'
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ version: 0.3.0
123
+ type: :runtime
124
+ prerelease: false
125
+ version_requirements: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - "~>"
128
+ - !ruby/object:Gem::Version
129
+ version: '0.3'
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: 0.3.0
113
133
  description:
114
134
  email:
115
135
  - contact@neocities.org