kanrisuru 0.16.16 → 0.16.17

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: c72c91f337408d0a7dee545cabeb07ba9fac668baf8d3c3dbb65d0e04a27e347
4
- data.tar.gz: 28d8387d8081783dfd32031c202ffc5ec66e4a7fea3306e8cb35d117f2193c10
3
+ metadata.gz: e31b687d1a4fbd77c62a502ffe4e3ec6e7c314c9e8335fc1964e8fcaca75f554
4
+ data.tar.gz: e36de3bb37966123d08c25aa6023be77f932705e49d005590f63a45d6a8c2d1b
5
5
  SHA512:
6
- metadata.gz: 8a0d66db59619c3cb9e69567ef0ed08e564c53ca3171dccc7acd31410288dfa06ebfc5a5daa2ff09aa14cbbacf433175352928b8a6e837f2ba43217de5fb70ac
7
- data.tar.gz: 8bfc4a39d3bb5ab4c9f180dd4e5682057a7c1fe5c5bd93e25a6d88280a6e12c79831e0c5d9cb05b2b3211b91e3c6161d585fcc20c2d851da100037393dd17752
6
+ metadata.gz: fb5549794cf62990bd0026c315b5c9828884b814f28ea82a7e04f944d12d2d52a77131d72b64e1d2c3d9d9c525f3bd468d020d69f0539304818f78b8b070b5ef
7
+ data.tar.gz: dd58f2d707f62615d4a7cc997dea5f27ca0a1678e6d60478f5548c4953685b469f61f8928c879b4965a56c51de4ec8ddb722980bd14cb9f1793355b001f60678
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## Kanrisuru 0.16.17 (January 10, 2022) ##
2
+ * Add additional options to `wget` command.
3
+ * Rename some options to better reflect options from wget program.
4
+
1
5
  ## Kanrisuru 0.16.16 (January 08, 2022) ##
2
6
  * Fix issue with `download` command when downloading directories from remote server.
3
7
 
@@ -105,7 +105,12 @@ module Kanrisuru
105
105
  end
106
106
 
107
107
  command.append_arg('--post-file', opts[:post_file])
108
+ command.append_arg('--method', opts[:method])
109
+
108
110
  command.append_flag('--content-disposition', opts[:content_disposition])
111
+ command.append_flag('--content-on-error', opts[:content_on_error])
112
+ command.append_flag('--trust-server-names', opts[:trust_server_names])
113
+ command.append_flag('--retry-on-host-error', opts[:retry_on_host_error])
109
114
 
110
115
  ## SSL / TLS
111
116
  if Kanrisuru::Util.present?(opts[:secure_protocol])
@@ -123,18 +128,24 @@ module Kanrisuru
123
128
  command.append_arg('--ca-directory', opts[:ca_directory])
124
129
  command.append_arg('--random-file', opts[:random_file])
125
130
  command.append_arg('--egd-file', opts[:egd_file])
131
+ command.append_flag('--https-only', opts[:https_only])
126
132
 
127
- ## FTP
133
+ ## FTP / FTPS
128
134
  command.append_arg('--ftp-user', opts[:ftp_user])
129
135
  command.append_arg('--ftp-password', opts[:ftp_password])
130
136
  command.append_flag('--no-remove-listing', opts[:no_remove_listing])
131
137
  command.append_flag('--no-glob', opts[:no_glob])
132
138
  command.append_flag('--no-passive-ftp', opts[:no_passive_ftp])
133
139
  command.append_flag('--retr-symlinks', opts[:retr_symlinks])
140
+ command.append_flag('--preserve-permissions', opts[:preserve_permissions])
141
+ command.append_flag('--ftps-implicit', opts[:ftps_implicit])
142
+ command.append_flag('--no-ftps-resume-ssl', opts[:no_ftps_resume_ssl])
143
+ command.append_flag('--ftps-clear-data-connection', opts[:ftps_clear_data_connection])
144
+ command.append_flag('--ftps-fallback-to-ftp', opts[:ftps_fallback_to_ftp])
134
145
 
135
146
  ## Recursive Retrieval
136
147
  command.append_flag('--recursive', opts[:recursive])
137
- command.append_arg('--level', opts[:depth])
148
+ command.append_arg('--level', opts[:level])
138
149
  command.append_flag('--delete-after', opts[:delete_after])
139
150
  command.append_flag('--convert-links', opts[:convert_links])
140
151
  command.append_flag('--backup-converted', opts[:backup_converted])
@@ -143,10 +154,13 @@ module Kanrisuru
143
154
  command.append_flag('--strict-comments', opts[:strict_comments])
144
155
 
145
156
  ## Recursive Accept/Reject
146
- command.append_arg('--accept', Kanrisuru::Util.array_join_string(opts[:accept_list]))
147
- command.append_arg('--reject', Kanrisuru::Util.array_join_string(opts[:reject_list]))
148
- command.append_arg('--domains', Kanrisuru::Util.array_join_string(opts[:domain_list]))
149
- command.append_arg('--exclude-domains', Kanrisuru::Util.array_join_string(opts[:exclude_domain_list]))
157
+ command.append_arg('--accept', Kanrisuru::Util.array_join_string(opts[:accept]))
158
+ command.append_arg('--reject', Kanrisuru::Util.array_join_string(opts[:reject]))
159
+ command.append_arg('--accept-regex', opts[:accept_regex])
160
+ command.append_arg('--reject-regex', opts[:reject_regex])
161
+ command.append_arg('--regex_type', opts[:regex_type])
162
+ command.append_arg('--domains', Kanrisuru::Util.array_join_string(opts[:domains]))
163
+ command.append_arg('--exclude-domains', Kanrisuru::Util.array_join_string(opts[:exclude_domains]))
150
164
  command.append_arg('--follow-tags', Kanrisuru::Util.array_join_string(opts[:follow_tags]))
151
165
  command.append_arg('--ignore-tags', Kanrisuru::Util.array_join_string(opts[:ignore_tags]))
152
166
  command.append_arg('--include-directories', Kanrisuru::Util.array_join_string(opts[:include_directories]))
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kanrisuru
4
- VERSION = '0.16.16'
4
+ VERSION = '0.16.17'
5
5
  end
@@ -97,8 +97,11 @@ RSpec.describe Kanrisuru::Core::Stat do
97
97
  },
98
98
  content_disposition: true,
99
99
  secure_protocol: 'SSLv3',
100
+ content_on_error: true,
101
+ trust_server_names: true,
102
+ retry_on_host_error: true,
100
103
  no_check_certificate: true),
101
- "wget --post-data url=https%3A%2F%2Fexample.com%3Fparam%3D123 --content-disposition --secure-protocol SSLv3 --no-check-certificate #{url}")
104
+ "wget --post-data url=https%3A%2F%2Fexample.com%3Fparam%3D123 --content-disposition --content-on-error --trust-server-names --retry-on-host-error --secure-protocol SSLv3 --no-check-certificate #{url}")
102
105
 
103
106
  expect do
104
107
  host.wget(url, secure_protocol: 'SSL')
@@ -115,27 +118,37 @@ RSpec.describe Kanrisuru::Core::Stat do
115
118
 
116
119
  expect_command(host.wget(url,
117
120
  certificate: '~/cert.pem',
121
+ https_only: true,
118
122
  certificate_type: 'PEM',
119
123
  private_key: '~/key.pem',
120
124
  private_key_type: 'PEM',
121
125
  ca_certificate: '~/ca.pem',
122
126
  random_file: '~/random'),
123
- "wget --certificate ~/cert.pem --certificate-type PEM --private-key ~/key.pem --private-key-type PEM --ca-certificate ~/ca.pem --random-file ~/random #{url}")
127
+ "wget --certificate ~/cert.pem --certificate-type PEM --private-key ~/key.pem --private-key-type PEM --ca-certificate ~/ca.pem --random-file ~/random --https-only #{url}")
124
128
 
125
129
  ## FTP
126
- expect_command(host.wget(url,
130
+ expect_command(host.wget("ftp.example.com",
127
131
  ftp_user: 'admin',
128
132
  ftp_password: '12345678',
129
133
  no_remove_listing: true,
130
134
  no_glob: true,
131
135
  no_passive_ftp: true,
132
- retr_symlinks: true),
133
- "wget --ftp-user admin --ftp-password 12345678 --no-remove-listing --no-glob --no-passive-ftp --retr-symlinks #{url}")
136
+ retr_symlinks: true,
137
+ preserve_permissions: true),
138
+ "wget --ftp-user admin --ftp-password 12345678 --no-remove-listing --no-glob --no-passive-ftp --retr-symlinks --preserve-permissions ftp.example.com")
139
+
140
+ expect_command(host.wget("ftps.example.com",
141
+ ftp_user: 'admin',
142
+ ftp_password: '12345678',
143
+ ftps_implicit: true,
144
+ no_ftps_resume_ssl: true,
145
+ ftps_fallback_to_ftp: true,
146
+ ftps_clear_data_connection: true), "wget --ftp-user admin --ftp-password 12345678 --ftps-implicit --no-ftps-resume-ssl --ftps-clear-data-connection --ftps-fallback-to-ftp ftps.example.com")
134
147
 
135
148
  ## Recursive Retrieval
136
149
  expect_command(host.wget(url,
137
150
  recursive: true,
138
- depth: 10,
151
+ level: 10,
139
152
  delete_after: true,
140
153
  convert_links: true,
141
154
  backup_converted: true,
@@ -146,10 +159,13 @@ RSpec.describe Kanrisuru::Core::Stat do
146
159
 
147
160
  ## Recursive Accept/Reject
148
161
  expect_command(host.wget(url,
149
- accept_list: ['.txt', '.html'],
150
- reject_list: ['.csv'],
151
- domain_list: ['example.com'],
152
- exclude_domain_list: ['hackernews.com'],
162
+ accept: ['.txt', '.html'],
163
+ reject: ['.csv'],
164
+ accept_regex: 'https://*',
165
+ regect_regex: 'ftp*',
166
+ regex_type: 'posix',
167
+ domains: ['example.com'],
168
+ exclude_domains: ['hackernews.com'],
153
169
  follow_tags: %w[a div span],
154
170
  ignore_tags: %w[area link],
155
171
  include_directories: ['/gems'],
@@ -159,6 +175,6 @@ RSpec.describe Kanrisuru::Core::Stat do
159
175
  span_hosts: true,
160
176
  relative: true,
161
177
  no_parent: true),
162
- "wget --accept .txt,.html --reject .csv --domains example.com --exclude-domains hackernews.com --follow-tags a,div,span --ignore-tags area,link --include-directories /gems --exclude-directories /releases --follow-ftp --ignore-case --span-hosts --relative --no-parent #{url}")
178
+ "wget --accept .txt,.html --reject .csv --accept-regex https://* --regex_type posix --domains example.com --exclude-domains hackernews.com --follow-tags a,div,span --ignore-tags area,link --include-directories /gems --exclude-directories /releases --follow-ftp --ignore-case --span-hosts --relative --no-parent #{url}")
163
179
  end
164
180
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kanrisuru
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.16
4
+ version: 0.16.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Mammina
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-08 00:00:00.000000000 Z
11
+ date: 2022-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parallel_tests