nanoc-deploying 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a4deeacd91c2a3b228d2a17dfe1e36b206630170fd1af913f7d35d61b2246b9b
4
- data.tar.gz: af94b99608eaa89491a455c1fb924d873f7e9a4617a8fe23dbb842c3a3338be8
3
+ metadata.gz: ae80ba881eea1d91670111074e0c43380a9a085b30c800ce1c182c03c460a185
4
+ data.tar.gz: 5e8d665fd41ff854ac42ea10cba20975831c0b485409d869352a213ccda1abf3
5
5
  SHA512:
6
- metadata.gz: 00330b4826714c0c822894e2bd6d4e2cd796f9793432f86bd9a7c31310d071149149d6c61455cac30282cdee8f4f6057bb1c35187c00918bf734ab7402900569
7
- data.tar.gz: 5ad8ff954c98a8317c5e251cb13face6a84a8063ad7e7fc432a326669b7c7df8d2668ed9c7e3d8842e4e9a4e08a7b23c2148da1860a4ba9ee186cbeace137eb4
6
+ metadata.gz: fe6093e0d444988b0e5d2625e35c5b95a3e628c470dbafac3c0204d26ffac8d9b51e51658f963a1eebcb77c3c1dd40035962330dca1d068dfea2d98e8e994d6e
7
+ data.tar.gz: c9194440ef0c6d26369152c42c11bab044c49c4369a222a395817f822dad8f96e776ea19fd2c8ac3fbc2732aa203966f9edc6e7aab65d55a706307677cfad236
data/NEWS.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # nanoc-deploying news
2
2
 
3
+ ## 1.0.4 (2026-09-28)
4
+
5
+ Fixes:
6
+
7
+ - Fix the incorrect escaping of the rsync deployer’s default `--exclude` options (#1789, #1790)
8
+
3
9
  ## 1.0.3 (2025-10-30)
4
10
 
5
11
  Enhancements:
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # nanoc-deploying
2
2
 
3
- This provides the `deploy` command and associated functionality for [Nanoc](https://nanoc.app).
3
+ This provides the `deploy` command and associated functionality for [Nanoc](https://nanoc.denisdefreyne.com).
4
4
 
5
- For details, see the [Deploying Nanoc sites](https://nanoc.app/doc/deploying/) chapter of the Nanoc documentation.
5
+ For details, see the [Deploying Nanoc sites](https://nanoc.denisdefreyne.com/doc/deploying/) chapter of the Nanoc documentation.
@@ -106,7 +106,9 @@ module Nanoc
106
106
  deployer_class = Nanoc::Deploying::Deployer.named(name.to_sym)
107
107
  if deployer_class.nil?
108
108
  names = Nanoc::Deploying::Deployer.all.map(&:identifier)
109
- raise Nanoc::Core::TrivialError, "The specified deploy target has an unrecognised kind “#{name}” (expected one of #{names.join(', ')})."
109
+ raise Nanoc::Core::TrivialError,
110
+ 'The specified deploy target has an unrecognised kind ' \
111
+ "“#{name}” (expected one of #{names.join(', ')})."
110
112
  end
111
113
  deployer_class
112
114
  end
@@ -2,9 +2,9 @@
2
2
 
3
3
  usage 'deploy [target] [options]'
4
4
  summary 'deploy the compiled site'
5
- description "
6
- Deploys the compiled site. The compiled site contents in the output directory will be uploaded to the destination, which is specified using the `--target` option.
7
- "
5
+ description <<~DESC.chomp
6
+ Deploys the compiled site. The compiled site contents in the output directory will be uploaded to the destination, which is specified using the `--target` option.
7
+ DESC
8
8
 
9
9
  option :t, :target, 'specify the location to deploy to (default: `default`)', argument: :required
10
10
  flag :C, :'no-check', 'do not run the issue checks marked for deployment'
@@ -152,7 +152,7 @@ module Nanoc
152
152
  end
153
153
 
154
154
  def remote_key_for_local_filename(local_filename, src, path)
155
- relative_local_filename = local_filename.sub(/\A#{src}\//, '')
155
+ relative_local_filename = local_filename.sub(%r{\A#{src}/}, '')
156
156
 
157
157
  if path
158
158
  File.join(path, relative_local_filename)
@@ -172,7 +172,7 @@ module Nanoc
172
172
  end
173
173
 
174
174
  def list_local_files(src)
175
- Dir[src + '/**/*'].select { |f| File.file?(f) }
175
+ Dir["#{src}/**/*"].select { |f| File.file?(f) }
176
176
  end
177
177
 
178
178
  def upload_all(src, path, etags, wrapper)
@@ -204,8 +204,8 @@ module Nanoc
204
204
  def read_etags(files)
205
205
  case config[:provider]
206
206
  when 'aws'
207
- files.each_with_object({}) do |file, etags|
208
- etags[file.key] = file.etag
207
+ files.to_h do |file|
208
+ [file.key, file.etag]
209
209
  end
210
210
  else
211
211
  {}
@@ -65,7 +65,7 @@ module Nanoc
65
65
  # Verify existence of remote, if remote is not a URL
66
66
  if remote_is_name?(remote)
67
67
  begin
68
- run_cmd(%W[git config --get remote.#{remote}.url])
68
+ run_cmd(['git', 'config', '--get', "remote.#{remote}.url"])
69
69
  rescue TTY::Command::ExitError
70
70
  raise Errors::RemoteDoesNotExist.new(remote)
71
71
  end
@@ -73,7 +73,7 @@ module Nanoc
73
73
 
74
74
  # If the branch exists then switch to it, otherwise prompt the user to create one.
75
75
  begin
76
- run_cmd_unless_dry(%W[git checkout #{branch}])
76
+ run_cmd_unless_dry(['git', 'checkout', branch.to_s])
77
77
  rescue TTY::Command::ExitError
78
78
  raise Errors::BranchDoesNotExist.new(branch)
79
79
  end
@@ -82,15 +82,15 @@ module Nanoc
82
82
  unless clean_repo?
83
83
  msg = "Automated commit at #{Time.now.utc} by Nanoc #{Nanoc::VERSION}"
84
84
  author = 'Nanoc <>'
85
- run_cmd_unless_dry(%w[git add -A])
86
- run_cmd_unless_dry(%W[git commit -a --author #{author} -m #{msg}])
85
+ run_cmd_unless_dry(['git', 'add', '-A'])
86
+ run_cmd_unless_dry(['git', 'commit', '-a', '--author', author.to_s, '-m', msg.to_s])
87
87
  end
88
88
 
89
89
  # Push
90
90
  if forced
91
- run_cmd_unless_dry(%W[git push -f #{remote} #{branch}])
91
+ run_cmd_unless_dry(['git', 'push', '-f', remote.to_s, branch.to_s])
92
92
  else
93
- run_cmd_unless_dry(%W[git push #{remote} #{branch}])
93
+ run_cmd_unless_dry(['git', 'push', remote.to_s, branch.to_s])
94
94
  end
95
95
  end
96
96
  end
@@ -98,7 +98,7 @@ module Nanoc
98
98
  private
99
99
 
100
100
  def remote_is_name?(remote)
101
- remote !~ /:\/\/|@.+:/
101
+ remote !~ %r{://|@.+:}
102
102
  end
103
103
 
104
104
  def run_cmd(cmd, dry_run: false)
@@ -36,15 +36,15 @@ module Nanoc
36
36
  '--times',
37
37
  '--verbose',
38
38
  '--compress',
39
- '--exclude=".hg"',
40
- '--exclude=".svn"',
41
- '--exclude=".git"',
39
+ '--exclude=.hg',
40
+ '--exclude=.svn',
41
+ '--exclude=.git',
42
42
  ].freeze
43
43
 
44
44
  # @see Nanoc::Deploying::Deployer#run
45
45
  def run
46
46
  # Get params
47
- src = source_path + '/'
47
+ src = "#{source_path}/"
48
48
  dst = config[:dst]
49
49
  options = config[:options] || DEFAULT_OPTIONS
50
50
 
@@ -64,7 +64,26 @@ module Nanoc
64
64
  private
65
65
 
66
66
  def run_shell_cmd(cmd)
67
- TTY::Command.new(uuid: false).run(*cmd)
67
+ status = nil
68
+
69
+ Open3.popen3(*cmd) do |_stdin, stdout, stderr, wait_thr|
70
+ stdout_thread = Thread.new do
71
+ stdout.each_line { $stdout << _1 }
72
+ end
73
+
74
+ stderr_thread = Thread.new do
75
+ stderr.each_line { $stderr << _1 }
76
+ end
77
+
78
+ stdout_thread.join
79
+ stderr_thread.join
80
+
81
+ status = wait_thr.value
82
+ end
83
+
84
+ unless status.success?
85
+ raise "Command failed with exit status #{status.exitstatus}"
86
+ end
68
87
  end
69
88
  end
70
89
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Nanoc
4
4
  module Deploying
5
- VERSION = '1.0.3'
5
+ VERSION = '1.0.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nanoc-deploying
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Defreyne
@@ -29,40 +29,28 @@ dependencies:
29
29
  requirements:
30
30
  - - "~>"
31
31
  - !ruby/object:Gem::Version
32
- version: '4.11'
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: 4.11.15
32
+ version: '4.14'
36
33
  type: :runtime
37
34
  prerelease: false
38
35
  version_requirements: !ruby/object:Gem::Requirement
39
36
  requirements:
40
37
  - - "~>"
41
38
  - !ruby/object:Gem::Version
42
- version: '4.11'
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 4.11.15
39
+ version: '4.14'
46
40
  - !ruby/object:Gem::Dependency
47
41
  name: nanoc-core
48
42
  requirement: !ruby/object:Gem::Requirement
49
43
  requirements:
50
44
  - - "~>"
51
45
  - !ruby/object:Gem::Version
52
- version: '4.11'
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: 4.11.15
46
+ version: '4.14'
56
47
  type: :runtime
57
48
  prerelease: false
58
49
  version_requirements: !ruby/object:Gem::Requirement
59
50
  requirements:
60
51
  - - "~>"
61
52
  - !ruby/object:Gem::Version
62
- version: '4.11'
63
- - - ">="
64
- - !ruby/object:Gem::Version
65
- version: 4.11.15
53
+ version: '4.14'
66
54
  description: Provides deploying functionality for Nanoc
67
55
  email: denis+rubygems@denis.ws
68
56
  executables: []
@@ -82,12 +70,12 @@ files:
82
70
  - lib/nanoc/deploying/deployers/git.rb
83
71
  - lib/nanoc/deploying/deployers/rsync.rb
84
72
  - lib/nanoc/deploying/version.rb
85
- homepage: https://nanoc.app/
73
+ homepage: https://nanoc.denisdefreyne.com/
86
74
  licenses:
87
75
  - MIT
88
76
  metadata:
89
77
  rubygems_mfa_required: 'true'
90
- source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-deploying-v1.0.3/nanoc-deploying
78
+ source_code_uri: https://github.com/nanoc/nanoc/tree/nanoc-deploying-v1.0.4/nanoc-deploying
91
79
  rdoc_options: []
92
80
  require_paths:
93
81
  - lib
@@ -102,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
90
  - !ruby/object:Gem::Version
103
91
  version: '0'
104
92
  requirements: []
105
- rubygems_version: 3.7.2
93
+ rubygems_version: 4.0.16
106
94
  specification_version: 4
107
95
  summary: Deploying support for Nanoc
108
96
  test_files: []