month.rb 0.11.2 → 0.11.4

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: 004e8bf2949af6d70273e0538352a4715108b0f88b841afe0ce8182d451a9436
4
- data.tar.gz: ff01821e09e2025c7a53214f635d2376a1a8f0e7c25c70dba1e51bb8aa7d1859
3
+ metadata.gz: c004af1b4f720469a5273c6d496a1fa5476e0b67565e58afdbccc49209ae12f8
4
+ data.tar.gz: c5bb6d9b626f1782708d30e39d94dc9d1aefb3432a5ef0016816e90784f5cfc8
5
5
  SHA512:
6
- metadata.gz: 90091e457c6b088e7ba220924be89fe1baaad546febb5ab00277f90af3bb40256b278d46876a24e507b429a6b96be24ab626df26d6d514b491f432ed45e1a146
7
- data.tar.gz: 69d96ccdb5994caad9aeddc5d22da460c6abbf38d17e5e8a4492d78142fcf8066e5adb6cf65d3acc352f554ffe03e5973b44cc423ee89f36ad31e0b158962a0f
6
+ metadata.gz: 749d57f2edc1f54274c0b349fbd57baa5942537bacf365850d810f1684cb51dad62ffd594ca2a3e20b7cdc5dd40e65757ecc51ab8a7afd30ae24d56922baa267
7
+ data.tar.gz: 143821255b2b195c56297085986c862b35f129642af9b4f5777b0fa16f02883bc58cc73ce6ac63a00f055e448ae36f0923ff95c4d1bb3ccd5694b9276c96eac1
data/CHANGELOG CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  ## 20260819
4
4
 
5
+ 0.11.4: Adopt the CHANGELOG-matching version test.
6
+
7
+ 1. + test/tc_VERSION.rb: that Month::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. This gem had exactly that fault before 0.10.2: the constant read 0.10.1 while the CHANGELOG's newest entry was 0.10.0. Modelled on moby's, which is where this pair was settled.
8
+ 2. ~ Month::VERSION: /0.11.3/0.11.4/
9
+
10
+
11
+ 0.11.3: + Rakefile, so that this gem is run the way every other one here is.
12
+
13
+ 1. + Rakefile: Rake::TestTask over FileList['test/ts_*.rb'], with default: :test, a :spec alias and a :version task, modelled on moby's. Every other gem here is run with rake and this one had none, the suite being run by naming test/ts_Month.rb by hand.
14
+ 2. The test files are left as they are. test/ts_Month.rb globs test/*.rb and loads each, so it already does what a FileList would, and it does so by pattern rather than by naming files — unlike impuri's loader, which had to be edited for every test added. Renaming twenty-nine tc_ files to *_test.rb would buy consistency with the other gems and nothing else, and the compat/ suites use the same ts_/tc_ convention. Piecemeal, later, if at all.
15
+ 3. ~ month.rb.gemspec: + 'Rakefile' to spec.files and + rake to the development dependencies, both following from the above.
16
+ 4. ~ test/tc_gemspec.rb: + Rakefile to the loose files, and + rake to the expected development dependencies, both assertions being exact.
17
+ 5. ~ Month::VERSION: /0.11.2/0.11.3/
18
+
19
+
5
20
  0.11.2: + LICENSE, which the gemspec had claimed since 0.10.0 without one being present.
6
21
 
7
22
  1. + LICENSE: the MIT text, copyright 2006-2026. spec.license = 'MIT' has been declared since the gemspec was written, so rubygems has shown a licence for this gem that the repository did not carry and the built gem did not contain. Anyone taking the gem at its word had nothing to read. impuri was in the same state and fixed it at its 0.12.4.
data/Rakefile ADDED
@@ -0,0 +1,22 @@
1
+ # Rakefile
2
+
3
+ require 'rake/testtask'
4
+
5
+ Rake::TestTask.new(:test) do |t|
6
+ t.libs << 'lib'
7
+ t.libs << 'test'
8
+ t.test_files = FileList['test/ts_*.rb']
9
+ t.verbose = true
10
+ t.warning = false
11
+ end
12
+
13
+ task default: :test
14
+
15
+ desc "Run tests"
16
+ task :spec => :test
17
+
18
+ desc "Show version"
19
+ task :version do
20
+ require_relative './lib/Month/VERSION'
21
+ puts "month.rb #{Month::VERSION}"
22
+ end
data/lib/Month/VERSION.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # Month::VERSION
3
3
 
4
4
  class Month
5
- VERSION = '0.11.2' unless defined?(VERSION)
5
+ VERSION = '0.11.4' unless defined?(VERSION)
6
6
  end
data/month.rb.gemspec CHANGED
@@ -36,9 +36,11 @@ Gem::Specification.new do |spec|
36
36
  'Gemfile',
37
37
  'LICENSE',
38
38
  'month.rb.gemspec',
39
+ 'Rakefile',
39
40
  'README.md',
40
41
  'TODO.txt',
41
42
  ].flatten
42
43
 
43
44
  spec.add_development_dependency('minitest')
45
+ spec.add_development_dependency('rake')
44
46
  end
@@ -0,0 +1,18 @@
1
+ # test/tc_VERSION.rb
2
+
3
+ class TC_VERSION < Minitest::Test
4
+
5
+ def test_is_a_string
6
+ assert_instance_of String, Month::VERSION
7
+ end
8
+
9
+ def test_is_three_numbers_separated_by_dots
10
+ assert_match(/\A\d+\.\d+\.\d+\z/, Month::VERSION)
11
+ end
12
+
13
+ def test_matches_the_newest_entry_in_the_changelog
14
+ changelog = File.read(File.expand_path('../CHANGELOG', __dir__))
15
+ assert_equal Month::VERSION, changelog[/^(\d+\.\d+\.\d+):/, 1]
16
+ end
17
+
18
+ end
data/test/tc_gemspec.rb CHANGED
@@ -28,7 +28,7 @@ class TC_gemspec < Minitest::Test
28
28
  end
29
29
 
30
30
  def test_ships_the_loose_files_and_not_only_lib
31
- assert_equal %w{CHANGELOG Gemfile LICENSE README.md TODO.txt month.rb.gemspec}, spec.files.reject{|f| f =~ %r{^(lib|test)/}}.sort
31
+ assert_equal %w{CHANGELOG Gemfile LICENSE README.md Rakefile TODO.txt month.rb.gemspec}, spec.files.reject{|f| f =~ %r{^(lib|test)/}}.sort
32
32
  end
33
33
 
34
34
  def test_declares_no_runtime_dependencies
@@ -36,7 +36,7 @@ class TC_gemspec < Minitest::Test
36
36
  end
37
37
 
38
38
  def test_declares_its_development_dependencies
39
- assert_equal %w{minitest}, spec.development_dependencies.map(&:name).sort
39
+ assert_equal %w{minitest rake}, spec.development_dependencies.map(&:name).sort
40
40
  end
41
41
 
42
42
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: month.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.2
4
+ version: 0.11.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoran
@@ -23,6 +23,20 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rake
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
26
40
  description: |
27
41
  This library enables the use of numeric or text representations of months,
28
42
  conversions between month and date objects,
@@ -37,6 +51,7 @@ files:
37
51
  - Gemfile
38
52
  - LICENSE
39
53
  - README.md
54
+ - Rakefile
40
55
  - TODO.txt
41
56
  - lib/Array/extract_optionsX.rb
42
57
  - lib/Date/to_month.rb
@@ -266,6 +281,7 @@ files:
266
281
  - test/tc_Month_to_number.rb
267
282
  - test/tc_Month_to_s.rb
268
283
  - test/tc_Month_to_short.rb
284
+ - test/tc_VERSION.rb
269
285
  - test/tc_gemspec.rb
270
286
  - test/ts_Month.rb
271
287
  homepage: https://github.com/thoran/month.rb