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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/git_deploy.rb +2 -1
- data/spec/changelog_spec.rb +1 -1
- data/spec/setup_spec.rb +29 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 402cfedbf9f5889b359670b5180081e295b50efdcd73234495b75a5abebba693
|
|
4
|
+
data.tar.gz: 6185b3a11de2fa93a425ca2254eb69bd0f5f80c16a676854f253154c41dcebee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 441df298babba19043bc08203894d8af9cd3ee0f7625caa52ce047f19c38b7b76aadac4da3f0cbd9ff3ec875a3d24eeec2e8a7a7fb9b9758a7f42da60a0bf51b
|
|
7
|
+
data.tar.gz: 6158247ae1013c5726dedeef23f63432615bad18090cb4eaf526344319b7912f6cff88917955b22dc319108b2b735fccd01b61a663828e7475d3bc2d7012825a
|
data/CHANGELOG.md
CHANGED
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
|
-
|
|
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"
|
data/spec/changelog_spec.rb
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
136
|
+
rubygems_version: 4.0.16
|
|
137
137
|
specification_version: 4
|
|
138
138
|
summary: Simple git push-based application deployment
|
|
139
139
|
test_files: []
|