impuri 0.12.0 → 0.12.2

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: f5cc899b2f4bb6e635e782943a9d0d59a612865b6bbfd44926849080a0fd1f27
4
+ data.tar.gz: 5fb2d56fd7fd4c77b176353395c031712c86c4c490dc407329f9d06bff8ce9c6
5
5
  SHA512:
6
- metadata.gz: 1188cc96a712f06445506d575cdb70c5d318a5cd8fe46b378aa96b7fa1a2a35d8d5287781d0be7f24f94b8f02f5d8e5414834daecc10287b276b9e22b0b06f9e
7
- data.tar.gz: fef2af493ff7a99a0a4dad6d8abaea054d79c30de505867275f1121a279e2ce676a2d3387b979d13fc20b913d8acdbd112ca2d83303554eb065fd35698065bc8
6
+ metadata.gz: 2a2a76bb15ea534ea0d4ff62e23ed902bf4eef572c81e95ef06ee0dc239eef0544afc35bab23ee6080665e6a9fbb4beb39bce0d7c063cfc1701cea0d7cbffc5e
7
+ data.tar.gz: 7f7231c76af182b6bf4173956d6bc1547d99d5ac80afeabbb2d88cb065587e0c9c4f7a54422d41d734ec269b7528fd5ac5ca3fdff00f4c39d543396d3babe618
data/CHANGELOG CHANGED
@@ -1,5 +1,22 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 20260819
4
+
5
+ 0.12.2: Adopt the CHANGELOG-matching version test.
6
+
7
+ 1. + test/ImpURI/VERSION_test.rb: that ImpURI::VERSION is a String, that it is three numbers separated by dots, and that it matches the newest entry in the CHANGELOG. The last is the one with teeth — a release which moves the constant and forgets the CHANGELOG, or the reverse, fails here rather than shipping — and it was verified by pointing it at a stale constant, which it caught. Modelled on moby's, which is where this pair was settled.
8
+ 2. ~ test/ImpURI.rb: + require 'ImpURI/VERSION_test', the loader naming each test file by hand.
9
+ 3. ~ ImpURI::VERSION: /0.12.1/0.12.2/
10
+
11
+ 0.12.1: Tidy the gemspec, fill in its metadata, and guard both with a test.
12
+
13
+ 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.
14
+ 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.
15
+ 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.
16
+ 4. ~ test/ImpURI.rb: + require 'gemspec_test', the loader naming each test file by hand.
17
+ 5. ~ ImpURI::VERSION: /0.12.0/0.12.1/
18
+
19
+
3
20
  ## 20260808
4
21
 
5
22
  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.2'
6
6
  end
@@ -0,0 +1,25 @@
1
+ # test/ImpURI/VERSION_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 do
11
+ describe "VERSION" do
12
+ it "is a string" do
13
+ _(ImpURI::VERSION).must_be_instance_of String
14
+ end
15
+
16
+ it "is three numbers separated by dots" do
17
+ _(ImpURI::VERSION).must_match(/\A\d+\.\d+\.\d+\z/)
18
+ end
19
+
20
+ it "matches the newest entry in the CHANGELOG" do
21
+ changelog = File.read(File.expand_path('../../CHANGELOG', __dir__))
22
+ _(changelog[/^(\d+\.\d+\.\d+):/, 1]).must_equal ImpURI::VERSION
23
+ end
24
+ end
25
+ end
data/test/ImpURI.rb CHANGED
@@ -7,3 +7,5 @@ $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'
11
+ require 'ImpURI/VERSION_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.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -57,12 +57,18 @@ files:
57
57
  - lib/_meta/blankQ.rb
58
58
  - lib/impuri.rb
59
59
  - test/ImpURI.rb
60
+ - test/ImpURI/VERSION_test.rb
60
61
  - test/ImpURI/class_methods.rb
61
62
  - test/ImpURI/instance_methods.rb
63
+ - test/gemspec_test.rb
62
64
  homepage: https://github.com/thoran/ImpURI
63
65
  licenses:
64
66
  - MIT
65
- metadata: {}
67
+ metadata:
68
+ bug_tracker_uri: https://github.com/thoran/ImpURI/issues
69
+ changelog_uri: https://github.com/thoran/ImpURI/blob/master/CHANGELOG
70
+ source_code_uri: https://github.com/thoran/ImpURI
71
+ documentation_uri: https://github.com/thoran/ImpURI/blob/master/README.md
66
72
  rdoc_options: []
67
73
  require_paths:
68
74
  - lib
@@ -77,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
83
  - !ruby/object:Gem::Version
78
84
  version: '0'
79
85
  requirements: []
80
- rubygems_version: 4.0.17
86
+ rubygems_version: 4.0.18
81
87
  specification_version: 4
82
88
  summary: This is a hand-written non-validating parser for URI's and ssh/scp almost
83
89
  URI resource descriptors.