impuri 0.12.0 → 0.12.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: c72a1dd69d974933264297f60ee3a7c049384798d1ea7a03f93dee06edbc1d2a
4
- data.tar.gz: 1f2fb098d5be4b9fa995234f82efe16a68faa0b9d085f96626d6bafef4fa357b
3
+ metadata.gz: 7d2f3a83faa4992ce901d71360356ef7d7be186b6eed4c31c2c8a506c902d587
4
+ data.tar.gz: 90e51afb1721b37d287d8ff28e57aed1101b173b8ba9be3d683a8189d052966b
5
5
  SHA512:
6
- metadata.gz: 1188cc96a712f06445506d575cdb70c5d318a5cd8fe46b378aa96b7fa1a2a35d8d5287781d0be7f24f94b8f02f5d8e5414834daecc10287b276b9e22b0b06f9e
7
- data.tar.gz: fef2af493ff7a99a0a4dad6d8abaea054d79c30de505867275f1121a279e2ce676a2d3387b979d13fc20b913d8acdbd112ca2d83303554eb065fd35698065bc8
6
+ metadata.gz: 06fcf13867417ffdd2fb9d43176065dba97397053f41ae503094c096b44f18b324b2b18c666a30708efeaca1501aeeed3a1e270be010f42a82a85f9d055d686b
7
+ data.tar.gz: 564e3c7c97652c1aaeac254467a78252ba25edd63ccd06635f3a49d436e1f0c32f7483ab796cf9b65601d93bcb84362f2ff754c0f3f20bebfb4221125981d6bb
data/CHANGELOG CHANGED
@@ -1,5 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 20260819
4
+
5
+ 0.12.1: Tidy the gemspec, fill in its metadata, and guard both with a test.
6
+
7
+ 1. ~ impuri.gemspec: + a header comment naming the file, as every other file here carries, and + trailing commas to the last element of spec.files and spec.development_dependencies, so that adding to either touches one line rather than two. ~ spec.files reordered, the globs first and the loose files alphabetically after them, as moby and measurand have it. The globs are what the gem is and the rest is paperwork, so adding paperwork now never disturbs them. This repo had followed namo and http, which pin the gemspec first and put the globs last.
8
+ 2. ~ impuri.gemspec: + spec.metadata, being bug_tracker_uri, changelog_uri, source_code_uri and documentation_uri, as moby carries. These are the links rubygems shows beside the gem, and with none declared the page offers the homepage alone. The blob URLs name master, this repository's default branch, where moby's name main.
9
+ 3. + test/gemspec_test.rb: that the specification validates, that it pins no date, that its version is ImpURI::VERSION rather than a literal, that the four metadata keys are declared and that no blob link names a branch other than master, that it declares no runtime dependencies, and which development dependencies it declares. A link to a branch which does not exist is worse than no link, reading as a broken page rather than an absent one, and nothing else here would catch a rename. Modelled on moby's, which is where this pair of tests was settled.
10
+ 4. ~ test/ImpURI.rb: + require 'gemspec_test', the loader naming each test file by hand.
11
+ 5. ~ ImpURI::VERSION: /0.12.0/0.12.1/
12
+
13
+
3
14
  ## 20260808
4
15
 
5
16
  0.12.0: + ImpURI#to_ssh, for going the other way.
data/impuri.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ # impuri.gemspec
2
+
1
3
  require_relative './lib/ImpURI/VERSION'
2
4
 
3
5
  class Gem::Specification
@@ -18,20 +20,27 @@ Gem::Specification.new do |spec|
18
20
  spec.homepage = 'https://github.com/thoran/ImpURI'
19
21
  spec.license = 'MIT'
20
22
 
23
+ spec.metadata = {
24
+ 'bug_tracker_uri' => 'https://github.com/thoran/ImpURI/issues',
25
+ 'changelog_uri' => 'https://github.com/thoran/ImpURI/blob/master/CHANGELOG',
26
+ 'source_code_uri' => 'https://github.com/thoran/ImpURI',
27
+ 'documentation_uri' => 'https://github.com/thoran/ImpURI/blob/master/README.md',
28
+ }
29
+
21
30
  spec.required_ruby_version = '>= 2.7'
22
31
  spec.require_paths = ['lib']
23
32
 
24
33
  spec.files = [
25
- 'impuri.gemspec',
34
+ Dir['lib/**/*.rb'],
35
+ Dir['test/**/*.rb'],
26
36
  'CHANGELOG',
27
37
  'Gemfile',
38
+ 'impuri.gemspec',
28
39
  'README.md',
29
40
  'TODO.txt',
30
- Dir['lib/**/*.rb'],
31
- Dir['test/**/*.rb']
32
41
  ].flatten
33
42
 
34
43
  spec.development_dependencies = [
35
- ['minitest', '~> 6.0']
44
+ ['minitest', '~> 6.0'],
36
45
  ]
37
46
  end
@@ -2,5 +2,5 @@
2
2
  # ImpURI::VERSION
3
3
 
4
4
  class ImpURI
5
- VERSION = '0.12.0'
5
+ VERSION = '0.12.1'
6
6
  end
data/test/ImpURI.rb CHANGED
@@ -7,3 +7,4 @@ $LOAD_PATH.unshift(test_dir) unless $LOAD_PATH.include?(test_dir)
7
7
 
8
8
  require 'ImpURI/class_methods'
9
9
  require 'ImpURI/instance_methods'
10
+ require 'gemspec_test'
@@ -0,0 +1,42 @@
1
+ # test/gemspec_test.rb
2
+
3
+ gem 'minitest'
4
+
5
+ $LOAD_PATH.unshift(File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')))
6
+
7
+ require 'impuri'
8
+ require 'minitest/autorun'
9
+
10
+ describe 'impuri.gemspec' do
11
+ let(:spec){Gem::Specification.load(File.expand_path('../impuri.gemspec', __dir__))}
12
+
13
+ it "is a valid specification" do
14
+ _(spec.validate).must_equal(true)
15
+ end
16
+
17
+ it "does not pin a date" do
18
+ _(spec.date).must_equal(Gem::Specification.new.date)
19
+ end
20
+
21
+ it "takes its version from ImpURI::VERSION" do
22
+ _(spec.version.to_s).must_equal(ImpURI::VERSION)
23
+ end
24
+
25
+ it "declares the metadata links rubygems shows beside the gem" do
26
+ _(spec.metadata.keys.sort) \
27
+ .must_equal(%w{bug_tracker_uri changelog_uri documentation_uri source_code_uri})
28
+ end
29
+
30
+ it "points its metadata at the branch which exists" do
31
+ _(spec.metadata.values.grep(%r{/blob/})).wont_be_empty
32
+ _(spec.metadata.values.grep(%r{/blob/(?!master/)})).must_equal([])
33
+ end
34
+
35
+ it "declares no runtime dependencies, the library standing alone" do
36
+ _(spec.runtime_dependencies).must_equal([])
37
+ end
38
+
39
+ it "declares its development dependencies" do
40
+ _(spec.development_dependencies.map(&:name).sort).must_equal(%w{minitest})
41
+ end
42
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: impuri
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -59,10 +59,15 @@ files:
59
59
  - test/ImpURI.rb
60
60
  - test/ImpURI/class_methods.rb
61
61
  - test/ImpURI/instance_methods.rb
62
+ - test/gemspec_test.rb
62
63
  homepage: https://github.com/thoran/ImpURI
63
64
  licenses:
64
65
  - MIT
65
- metadata: {}
66
+ metadata:
67
+ bug_tracker_uri: https://github.com/thoran/ImpURI/issues
68
+ changelog_uri: https://github.com/thoran/ImpURI/blob/master/CHANGELOG
69
+ source_code_uri: https://github.com/thoran/ImpURI
70
+ documentation_uri: https://github.com/thoran/ImpURI/blob/master/README.md
66
71
  rdoc_options: []
67
72
  require_paths:
68
73
  - lib
@@ -77,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
82
  - !ruby/object:Gem::Version
78
83
  version: '0'
79
84
  requirements: []
80
- rubygems_version: 4.0.17
85
+ rubygems_version: 4.0.18
81
86
  specification_version: 4
82
87
  summary: This is a hand-written non-validating parser for URI's and ssh/scp almost
83
88
  URI resource descriptors.