net-sftp 4.1.0 → 4.1.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.
data/Rakefile DELETED
@@ -1,176 +0,0 @@
1
- require "rubygems"
2
- require "rake"
3
- require "rake/clean"
4
- require "rdoc/task"
5
- require "bundler/gem_tasks"
6
-
7
- desc "When releasing make sure NET_SSH_BUILDGEM_SIGNED is set"
8
- task :check_NET_SSH_BUILDGEM_SIGNED do
9
- raise "NET_SSH_BUILDGEM_SIGNED should be set to release" unless ENV['NET_SSH_BUILDGEM_SIGNED']
10
- end
11
-
12
- Rake::Task[:release].enhance [:check_NET_SSH_BUILDGEM_SIGNED]
13
- Rake::Task[:release].prerequisites.unshift(:check_NET_SSH_BUILDGEM_SIGNED)
14
-
15
- task :default => ["build"]
16
- CLEAN.include [ 'pkg', 'rdoc' ]
17
- name = "net-sftp"
18
-
19
- require_relative "lib/net/sftp/version"
20
- version = Net::SFTP::Version::CURRENT
21
-
22
- begin
23
- require "changelogd/rake"
24
- rescue LoadError
25
- # A git gem isn't on the load path under plain `rake`, as the release workflow runs it; bundler/setup could clash with the running rake.
26
- require "bundler"
27
- $LOAD_PATH.unshift(*Bundler.definition.specs["changelogd"].flat_map(&:full_require_paths))
28
- require "changelogd/rake"
29
- end
30
- Changelogd::RakeTasks.new(version_file: "lib/net/sftp/version.rb")
31
-
32
- namespace :cert do
33
- desc "Update public cert from private - only run if public is expired"
34
- task :update_public_when_expired do
35
- require 'openssl'
36
- require 'time'
37
- raw = File.read "net-sftp-public_cert.pem"
38
- certificate = OpenSSL::X509::Certificate.new raw
39
- raise Exception, "Not yet expired: #{certificate.not_after}" unless certificate.not_after < Time.now
40
- sh "gem cert --build netssh@solutious.com --days 1825 --private-key /mnt/gem/net-ssh-private_key.pem"
41
- sh "mv gem-public_cert.pem net-sftp-public_cert.pem"
42
- sh "gem cert --add net-sftp-public_cert.pem"
43
- end
44
- end
45
-
46
- require 'rake/testtask'
47
- Rake::TestTask.new do |t|
48
- t.libs = ["lib", "test"]
49
- end
50
-
51
- extra_files = %w[LICENSE.txt THANKS.txt CHANGES.txt ]
52
- RDoc::Task.new do |rdoc|
53
- rdoc.rdoc_dir = "rdoc"
54
- rdoc.title = "#{name} #{version}"
55
- rdoc.generator = 'hanna' # gem install hanna-nouveau
56
- rdoc.main = 'README.rdoc'
57
- rdoc.rdoc_files.include("README*")
58
- rdoc.rdoc_files.include("bin/*.rb")
59
- rdoc.rdoc_files.include("lib/**/*.rb")
60
- extra_files.each { |file|
61
- rdoc.rdoc_files.include(file) if File.exist?(file)
62
- }
63
- end
64
-
65
- def change_version(&block)
66
- Rake::Task["changelog:check"].invoke
67
- version_file = 'lib/net/sftp/version.rb'
68
- require_relative version_file
69
- pre = Net::SFTP::Version::PRE
70
- tiny = Net::SFTP::Version::TINY
71
- minor = Net::SFTP::Version::MINOR
72
- result = block[pre: pre, tiny: tiny, minor: minor]
73
- raise ArgumentError, "Version change logic should always return a pre" unless result.key?(:pre)
74
-
75
- new_pre = result[:pre]
76
- new_tiny = result[:tiny] || tiny
77
- new_minor = result[:minor] || minor
78
- found = { pre: false, tiny: false, minor: false }
79
- File.open("#{version_file}.new", "w") do |f|
80
- File.readlines(version_file).each do |line|
81
- match =
82
- if pre.nil?
83
- /^(\s+PRE\s+=\s+)nil(\s*)$/.match(line)
84
- else
85
- /^(\s+PRE\s+=\s+")#{pre}("\s*)$/.match(line)
86
- end
87
- if match
88
- prefix = match[1]
89
- postfix = match[2]
90
- prefix.delete_suffix!('"')
91
- postfix.delete_prefix!('"')
92
- new_line = "#{prefix}#{new_pre.inspect}#{postfix}"
93
- puts "Changing:\n - #{line} + #{new_line}"
94
- line = new_line
95
- found[:pre] = true
96
- end
97
-
98
- if new_tiny != tiny
99
- match = /^(\s+TINY\s+=\s+)#{tiny}(\s*)$/.match(line)
100
- if match
101
- prefix = match[1]
102
- postfix = match[2]
103
- new_line = "#{prefix}#{new_tiny}#{postfix}"
104
- puts "Changing:\n - #{line} + #{new_line}"
105
- line = new_line
106
- found[:tiny] = true
107
- end
108
- end
109
-
110
- if new_minor != minor
111
- match = /^(\s+MINOR\s+=\s+)#{minor}(\s*)$/.match(line)
112
- if match
113
- prefix = match[1]
114
- postfix = match[2]
115
- new_line = "#{prefix}#{new_minor}#{postfix}"
116
- puts "Changing:\n - #{line} + #{new_line}"
117
- line = new_line
118
- found[:minor] = true
119
- end
120
- end
121
-
122
- f.write(line)
123
- end
124
- raise ArgumentError, "Cound not find line: PRE = \"#{pre}\" in #{version_file}" unless found[:pre]
125
- raise ArgumentError, "Cound not find line: TINY = \"#{tiny}\" in #{version_file}" unless found[:tiny] || new_tiny == tiny
126
- raise ArgumentError, "Cound not find line: MINOR = \"#{minor}\" in #{version_file}" unless found[:minor] || new_minor == minor
127
- end
128
-
129
- FileUtils.mv version_file, "#{version_file}.old"
130
- FileUtils.mv "#{version_file}.new", version_file
131
- Rake::Task["changelog:release"].invoke
132
- end
133
-
134
- namespace :vbump do
135
- desc "Final release"
136
- task :final do
137
- change_version do |pre:, tiny:, **|
138
- _ = tiny
139
- if pre.nil?
140
- { tiny: tiny + 1, pre: nil }
141
- else
142
- raise ArgumentError, "Unexpected pre: #{pre}" if pre.nil?
143
-
144
- { pre: nil }
145
- end
146
- end
147
- end
148
-
149
- desc "Minor release"
150
- task :minor do
151
- change_version do |pre:, minor:, **|
152
- raise ArgumentError, "PRE is #{pre.inspect}; release it with vbump:final first" unless pre.nil?
153
-
154
- { minor: minor + 1, tiny: 0, pre: nil }
155
- end
156
- end
157
-
158
- desc "Increment prerelease"
159
- task :pre, [:type] do |_t, args|
160
- change_version do |pre:, tiny:, **|
161
- puts " PRE => #{pre.inspect}"
162
- match = /^([a-z]+)(\d+)/.match(pre)
163
- raise ArgumentError, "Unexpected pre: #{pre}" if match.nil? && args[:type].nil?
164
-
165
- if match.nil? || (!args[:type].nil? && args[:type] != match[1])
166
- if pre.nil?
167
- { pre: "#{args[:type]}1", tiny: tiny + 1 }
168
- else
169
- { pre: "#{args[:type]}1" }
170
- end
171
- else
172
- { pre: "#{match[1]}#{match[2].to_i + 1}" }
173
- end
174
- end
175
- end
176
- end
@@ -1 +0,0 @@
1
- Changelog fragments: one `<PR number>.<type>.txt` file per user-visible change, assembled into `CHANGES.txt` when the version is bumped. See [CONTRIBUTING.md](../CONTRIBUTING.md#changelog).
@@ -1,21 +0,0 @@
1
- -----BEGIN CERTIFICATE-----
2
- MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQsFADBBMQ8wDQYDVQQDDAZuZXRz
3
- c2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZFgNj
4
- b20wHhcNMjYxMDIyMDk1NDI1WhcNMjcxMDIyMDk1NDI1WjBBMQ8wDQYDVQQDDAZu
5
- ZXRzc2gxGTAXBgoJkiaJk/IsZAEZFglzb2x1dGlvdXMxEzARBgoJkiaJk/IsZAEZ
6
- FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGJ4TbZ9H+qZ08
7
- pQfJhPJTHaDCyQvCsKTFrL5O9z3tllQ7B/zksMMM+qFBpNYu9HCcg4yBATacE/PB
8
- qVVyUrpr6lbH/XwoN5ljXm+bdCfmnjZvTCL2FTE6o+bcnaF0IsJyC0Q2B1fbWdXN
9
- 6Off1ZWoUk6We2BIM1bn6QJLxBpGyYhvOPXsYoqSuzDf2SJDDsWFZ8kV5ON13Ohm
10
- JbBzn0oD8HF8FuYOewwsC0C1q4w7E5GtvHcQ5juweS7+RKsyDcVcVrLuNzoGRttS
11
- KP4yMn+TzaXijyjRg7gECfJr3TGASaA4bQsILFGG5dAWcwO4OMrZedR7SHj/o0Kf
12
- 3gL7P0axAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
13
- BBQF8qLA7Z4zg0SJGtUbv3eoQ8tjIzAfBgNVHREEGDAWgRRuZXRzc2hAc29sdXRp
14
- b3VzLmNvbTAfBgNVHRIEGDAWgRRuZXRzc2hAc29sdXRpb3VzLmNvbTANBgkqhkiG
15
- 9w0BAQsFAAOCAQEAbVrRpiCFmHDMLNU+SCjpg43snWYksQOtejPPTEMdOc9cCmmv
16
- ctJbaPIySLUgzwFbQDZStDPbLJmIujh0fm5dHp/sDJpvPZ3Mm3FfzWQMJqzBx4uk
17
- OMx00yJK8VeFrwUViE3zO5raWvw85dUybp25pgaKGW4AA5mJ/2UHqYLc4lefKFKK
18
- 9xFsyYSciMEKyAsUNSNTJzPKUo2vn7TNF/pS0ZL+h8Qkr0A0F0ncfj7uM1kOWjO0
19
- mMdUtmMoVbjbik3hqkY/18G03c3PoFNpL38VLKuyyROYz1DaCqOaRju3sbOoirD+
20
- piQTZDCWxeKuX0Iuxq02uxkYHfoGB6In0y3OOQ==
21
- -----END CERTIFICATE-----
data/net-sftp.gemspec DELETED
@@ -1,49 +0,0 @@
1
- require_relative 'lib/net/sftp/version'
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "net-sftp"
5
- spec.version = Net::SFTP::Version::STRING
6
- spec.authors = ["Jamis Buck", "Delano Mandelbaum", "Mikl\u{f3}s Fazekas"]
7
- spec.email = ["net-ssh@solutious.com"]
8
-
9
- if ENV['NET_SSH_BUILDGEM_SIGNED']
10
- spec.cert_chain = ["net-sftp-public_cert.pem"]
11
- spec.signing_key = "/mnt/gem/net-ssh-private_key.pem"
12
- end
13
-
14
- spec.summary = %q{A pure Ruby implementation of the SFTP client protocol.}
15
- spec.description = %q{A pure Ruby implementation of the SFTP client protocol}
16
- spec.homepage = "https://github.com/net-ssh/net-sftp"
17
- spec.license = "MIT"
18
- spec.required_rubygems_version = Gem::Requirement.new(">= 0") if spec.respond_to? :required_rubygems_version=
19
- spec.required_ruby_version = ">= 2.6"
20
-
21
- spec.extra_rdoc_files = [
22
- "LICENSE.txt",
23
- "README.rdoc"
24
- ]
25
-
26
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
27
- spec.bindir = "exe"
28
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
- spec.require_paths = ["lib"]
30
-
31
- if spec.respond_to? :specification_version then
32
- spec.specification_version = 3
33
-
34
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
35
- spec.add_runtime_dependency(%q<net-ssh>, [">= 5.0.0", "< 9.0.0"])
36
- spec.add_development_dependency(%q<minitest>, [">= 5"])
37
- spec.add_development_dependency(%q<mocha>, [">= 0"])
38
- else
39
- spec.add_dependency(%q<net-ssh>, [">= 5.0.0", "< 9.0.0"])
40
- spec.add_dependency(%q<minitest>, [">= 5"])
41
- spec.add_dependency(%q<mocha>, [">= 0"])
42
- end
43
- else
44
- spec.add_dependency(%q<net-ssh>, [">= 5.0.0", "< 9.0.0"])
45
- spec.add_dependency(%q<minitest>, [">= 5"])
46
- spec.add_dependency(%q<test-unit>, [">= 0"])
47
- spec.add_dependency(%q<mocha>, [">= 0"])
48
- end
49
- end