git-deploy-ng 0.9.0 → 0.9.1

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: 0b64c184c2caea92356620a38fe3f61b1127a57db6f07c685e0fdd7e631013aa
4
- data.tar.gz: 352f0a909af1721966f5205be7fab6cb884e7dad8f5673f4242232bcd351ca26
3
+ metadata.gz: 402cfedbf9f5889b359670b5180081e295b50efdcd73234495b75a5abebba693
4
+ data.tar.gz: 6185b3a11de2fa93a425ca2254eb69bd0f5f80c16a676854f253154c41dcebee
5
5
  SHA512:
6
- metadata.gz: 3b358f7015854510c0fd1d17fc65f7faa2b9564fc5fccc7a3dd7ce160cf28193b4c510e40a9f0e68650f83fe95e7e7542e859d4859b4bac6b028165708b92d85
7
- data.tar.gz: fed8047e5dc0ca7df1594139515bf1a06d39ae1663fe740b0882eb01c0c3c1676c55754884051a69fe25e1fff211ab147a93619274700092fdbd2fc4180ed329
6
+ metadata.gz: 441df298babba19043bc08203894d8af9cd3ee0f7625caa52ce047f19c38b7b76aadac4da3f0cbd9ff3ec875a3d24eeec2e8a7a7fb9b9758a7f42da60a0bf51b
7
+ data.tar.gz: 6158247ae1013c5726dedeef23f63432615bad18090cb4eaf526344319b7912f6cff88917955b22dc319108b2b735fccd01b61a663828e7475d3bc2d7012825a
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.1] - 2026-07-23
11
+
12
+ ### Fixed
13
+ - Pass remote when setup invokes hooks
14
+
15
+
10
16
  ## [0.9.0] - 2026-07-04
11
17
 
12
18
  ### Added
data/lib/git_deploy.rb CHANGED
@@ -54,7 +54,8 @@ class GitDeploy < Thor
54
54
  cmd << "git config receive.denyCurrentBranch ignore"
55
55
  end
56
56
 
57
- invoke :hooks, [], force: options[:force]
57
+ # Thor replaces inherited options when an explicit hash is passed — include :remote.
58
+ invoke :hooks, [], remote: options[:remote], force: options[:force]
58
59
  end
59
60
 
60
61
  desc "hooks", "Installs git hooks to the remote repository"
@@ -104,7 +104,7 @@ describe GitDeploy::Changelog do
104
104
 
105
105
  describe '.gemspec_version' do
106
106
  it 'reads the version from git-deploy-ng.gemspec' do
107
- expect(described_class.gemspec_version).to eq('0.9.0')
107
+ expect(described_class.gemspec_version).to eq('0.9.1')
108
108
  end
109
109
  end
110
110
  end
data/spec/setup_spec.rb CHANGED
@@ -81,4 +81,33 @@ describe GitDeploy do
81
81
  expect(init_cmd).not_to include('sed')
82
82
  end
83
83
  end
84
+
85
+ # Regression: Thor replaces inherited options when invoke gets an explicit hash,
86
+ # and invoke builds a new instance — so do not stub invoke (that hid remote=nil).
87
+ describe '#setup → #hooks invoke' do
88
+ let(:uploads) { {} }
89
+ let(:git_config) do
90
+ Hash.new.tap do |h|
91
+ h['remote -v'] = "production\tgit@example.com:/apps/demo (fetch)"
92
+ h['symbolic-ref -q HEAD'] = 'refs/heads/master'
93
+ end
94
+ end
95
+
96
+ before do
97
+ allow_any_instance_of(described_class).to receive(:git_config).and_return(git_config)
98
+ allow_any_instance_of(described_class).to receive(:run_test).and_return(false)
99
+ allow_any_instance_of(described_class).to receive(:run)
100
+ allow_any_instance_of(described_class).to receive(:scp_upload) do |_instance, files|
101
+ uploads.merge!(files)
102
+ end
103
+ end
104
+
105
+ it 'passes remote through invoke so hooks does not abort' do
106
+ expect {
107
+ described_class.start(%w[setup -r production -n])
108
+ }.not_to output(/Specify a remote with -r/).to_stderr
109
+
110
+ expect(uploads.values).to include('/apps/demo/.git/hooks/post-receive')
111
+ end
112
+ end
84
113
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-deploy-ng
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Edwards
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  - !ruby/object:Gem::Version
134
134
  version: '0'
135
135
  requirements: []
136
- rubygems_version: 4.0.10
136
+ rubygems_version: 4.0.16
137
137
  specification_version: 4
138
138
  summary: Simple git push-based application deployment
139
139
  test_files: []