hoe 3.21.0 → 3.23.0

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: bdbf38f3724fc0c8008428afdfde2009cf340d6a60912a8eb2e8ad8d7ee9120b
4
- data.tar.gz: 107816ce9cad15ce4dc4ff5fd94c68821ae9511c50de746bead5abe56c834d5d
3
+ metadata.gz: 2f90d13b22bd588098e637d7483771414ad1d1ba91a7666b1ae133d766e0a952
4
+ data.tar.gz: a55cdbcb633138edb9de2b072dd1f905c47cf59c12cf6f70e6932a135df84057
5
5
  SHA512:
6
- metadata.gz: d8e020648a0a3e6d76cbb2a2f18be076369607eb19fe364d5b4c895eceab91d205ea2bdb39e4165a22bab944f662d009e5dec6ab3ab47731193e461b478fb41a
7
- data.tar.gz: d63cd16ac13754c3fbb7070ca03bc6d647ea86dc642466793ad5d87a8e2387edf5903017aa265b8edb127f7e235756bcc871be003d791d7c3e22462c05933ff2
6
+ metadata.gz: 7f4898f76969fafe15e7072e4c0160c05601883d6f36021fa685b6593f92fa2950a525d69f2f740875b00ed21d8e2386a125cefc0317f81469c9f82597d8b880
7
+ data.tar.gz: 0b70ef2ebf6b85a9370c942c763eadb27082ac926e05ee239c72625b875b2dd7d86b23b8a96abd6ba4380cb5f94de063ab1cdd9586dd9e774dcffa1405a060e7
checksums.yaml.gz.sig CHANGED
@@ -1,3 +1,2 @@
1
- YJR���P��c|������!~}s���J�"3w
2
- �����Q��θ�����ix>���~� 5���H*�^ ���pS�ʘink�2B�D]R�1Q��3��>�^� �{�mq�zrQ��#tZGd�@
3
- �|�o؀�P�1,��A_���&��^��Dρ�S�K���.
1
+ ��z¢��{s|���u��|v��qyw��YJ *�� ��[�Ա1���п7�>��+�{&l�p�Q���B𚞙K��yo�Ʉq
2
+ �H02T~�>#Kd%��-����E�@�<�
data.tar.gz.sig CHANGED
Binary file
data/History.rdoc CHANGED
@@ -1,3 +1,42 @@
1
+ === 3.23.0 / 2021-05-29
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Bump racc (plugin) dependency.
6
+ * Removed ruby18! and ruby19! methods. ugh
7
+
8
+ === 3.22.3 / 2021-01-10
9
+
10
+ * 1 bug fix:
11
+
12
+ * Bumped ruby version to include < 4 (trunk).
13
+
14
+ === 3.22.2 / 2020-08-31
15
+
16
+ * 1 bug fix:
17
+
18
+ * Bumped ruby version to include 3.0 (trunk).
19
+
20
+ === 3.22.1 / 2020-02-12
21
+
22
+ * 1 bug fix:
23
+
24
+ * Avoid calling parse_urls if URL metadata are already set. (flavorjones)
25
+
26
+ === 2.22.0 / 2020-02-09
27
+
28
+ * 4 minor enhancements:
29
+
30
+ * Added metadate mapping for 'docs'.
31
+ * Added rdoc extension to the history and readme file finder globs.
32
+ * Extended readme parsing to more intelligently deal with markup sections.
33
+ * Refactored intuit_values to take the file content as an arg.
34
+
35
+ * 2 bug fixes:
36
+
37
+ * Fixed ordering of test_prelude vs framework in Minitest::TestTask. (flavorjones)
38
+ * Fixed wiring of test_prelude into Minitest::TestTask.create. (flavorjones)
39
+
1
40
  === 3.21.0 / 2020-01-11
2
41
 
3
42
  * 2 minor enhancements:
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ Hoe.spec "hoe" do
18
18
 
19
19
  pluggable!
20
20
  require_rubygems_version ">= 1.4"
21
- require_ruby_version "~> 2.1"
21
+ require_ruby_version [">= 2.1", "< 4"]
22
22
 
23
23
  dependency "rake", [">= 0.8", "< 15.0"] # FIX: to force it to exist pre-isolate
24
24
  end
data/lib/hoe.rb CHANGED
@@ -1,7 +1,3 @@
1
- # -*- mode: ruby; coding: us-ascii; -*-
2
-
3
- require "rubygems"
4
-
5
1
  begin
6
2
  gem "rake"
7
3
  rescue Gem::LoadError
@@ -91,7 +87,7 @@ class Hoe
91
87
  include Rake::DSL if defined?(Rake::DSL)
92
88
 
93
89
  # duh
94
- VERSION = "3.21.0"
90
+ VERSION = "3.23.0"
95
91
 
96
92
  @@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
97
93
  :publish, :gemcutter, :signing, :test]
@@ -119,6 +115,7 @@ class Hoe
119
115
  "bugs" => "bug_tracker_uri",
120
116
  "clog" => "changelog_uri",
121
117
  "doco" => "documentation_uri",
118
+ "docs" => "documentation_uri",
122
119
  "home" => "homepage_uri",
123
120
  "code" => "source_code_uri",
124
121
  "wiki" => "wiki_uri",
@@ -478,7 +475,7 @@ class Hoe
478
475
 
479
476
  case name
480
477
  when "hoe" then
481
- dependency "rake", [">= 0.8", "< 13.0"]
478
+ # do nothing? these deps are already in the hoe spec in the Rakefile
482
479
  else
483
480
  version = VERSION.split(/\./).first(2).join(".")
484
481
  dependency "hoe", "~> #{version}", :development
@@ -650,8 +647,8 @@ class Hoe
650
647
  self.history_file = manifest.grep(/^History\./).first
651
648
  end
652
649
 
653
- self.history_file ||= Dir.glob("History.{txt,md}").first || "History.txt"
654
- self.readme_file ||= Dir.glob("README.{txt,md}").first || "README.txt"
650
+ self.history_file ||= Dir.glob("History.{rdoc,txt,md}").first || "History.txt"
651
+ self.readme_file ||= Dir.glob("README.{rdoc,txt,md}").first || "README.txt"
655
652
 
656
653
  abort "Hoe.new {...} removed. Switch to Hoe.spec." if block_given?
657
654
  end
@@ -659,19 +656,24 @@ class Hoe
659
656
  ##
660
657
  # Intuit values from the readme and history files.
661
658
 
662
- def intuit_values
663
- header_re = /^((?:=+|#+) .*)$/
664
- readme = File.read_utf(readme_file).split(header_re)[1..-1] rescue ""
659
+ def intuit_values input
660
+ readme = input
661
+ .lines
662
+ .chunk { |l| l[/^(?:=+|#+)/] || "" }
663
+ .map(&:last)
664
+ .each_slice(2)
665
+ .map { |k, v|
666
+ kp = k.join
667
+ kp = kp.strip.chomp(":").split.last.downcase if k.size == 1
668
+ [kp, v.join.strip]
669
+ }
670
+ .to_h
665
671
 
666
672
  unless readme.empty? then
667
- sections = Hash[*readme.map { |s|
668
- s =~ /^[=#]/ ? s.strip.downcase.chomp(":").split.last : s.strip
669
- }]
670
- desc = sections.values_at(*description_sections).join("\n\n")
673
+ desc = readme.values_at(*description_sections).join("\n\n")
671
674
  summ = desc.split(/\.\s+/).first(summary_sentences).join(". ")
672
- urls = parse_urls(readme[1])
673
675
 
674
- self.urls ||= urls
676
+ self.urls ||= parse_urls(readme.values.first)
675
677
  self.description ||= desc
676
678
  self.summary ||= summ
677
679
  else
@@ -808,7 +810,7 @@ class Hoe
808
810
 
809
811
  def post_initialize
810
812
  activate_plugin_deps
811
- intuit_values
813
+ intuit_values File.read_utf readme_file if readme_file
812
814
  validate_fields
813
815
  define_spec
814
816
  load_plugin_tasks
@@ -838,20 +840,6 @@ class Hoe
838
840
  spec_extras[:required_ruby_version] = versions
839
841
  end
840
842
 
841
- ##
842
- # Declare that this gem requires ruby to be in the 1.8+ family.
843
-
844
- def ruby18!
845
- require_ruby_version "~> 1.8"
846
- end
847
-
848
- ##
849
- # Declare that this gem requires ruby to be in the 1.9 family.
850
-
851
- def ruby19!
852
- require_ruby_version "~> 1.9"
853
- end
854
-
855
843
  ##
856
844
  # Declare that this gem requires ruby to be in the 2.0+ family.
857
845
 
@@ -880,6 +868,9 @@ class Hoe
880
868
  require_ruby_version "~> 2.3"
881
869
  end
882
870
 
871
+ # I don't care for these methods (eg 3.0 is out) ... so I'm not
872
+ # continuing them.
873
+
883
874
  ##
884
875
  # Provide a linear degrading value from n to m over start to finis
885
876
  # dates. If not provided, start and finis will default to 1/1 and
data/lib/hoe/publish.rb CHANGED
@@ -145,7 +145,7 @@ module Hoe::Publish
145
145
 
146
146
  desc "Generate email announcement file."
147
147
  task :debug_email do
148
- puts generate_email
148
+ puts generate_email ENV["FULL"]
149
149
  end
150
150
 
151
151
  desc 'Post announcement to blog. Uses the "blogs" array in your hoerc.'
data/lib/hoe/racc.rb CHANGED
@@ -50,7 +50,7 @@ module Hoe::Racc
50
50
  # Activate the racc dependencies
51
51
 
52
52
  def activate_racc_deps
53
- dependency "racc", "~> 1.4.6", :development
53
+ dependency "racc", "~> 1.5", :development
54
54
  end
55
55
 
56
56
  ##
data/lib/hoe/test.rb CHANGED
@@ -80,8 +80,9 @@ module Hoe::Test
80
80
  when :minitest then
81
81
  require "minitest/test_task" # currently in hoe, but will move
82
82
 
83
+ test_prelude = self.test_prelude
83
84
  Minitest::TestTask.create :test do |t|
84
- t.test_prelude = self.test_prelude
85
+ t.test_prelude = test_prelude
85
86
  t.libs += Hoe.include_dirs.uniq
86
87
  end
87
88
  when :testunit then
@@ -259,8 +259,8 @@ module Minitest # :nodoc:
259
259
  tests.map! { |f| %(require "#{f}") }
260
260
 
261
261
  runner = []
262
- runner << framework
263
262
  runner << test_prelude if test_prelude
263
+ runner << framework
264
264
  runner.concat tests
265
265
  runner = runner.join "; "
266
266
 
data/test/test_hoe.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  require "minitest/autorun"
2
3
  require "hoe"
3
4
  require "tempfile"
@@ -217,6 +218,85 @@ class TestHoe < Minitest::Test
217
218
  assert_equal exp, hoe.parse_urls(hash)
218
219
  end
219
220
 
221
+ def test_parse_mrww
222
+ h = nil
223
+ mrww_readme = <<~EOM
224
+ = make
225
+ = rake
226
+ = work
227
+ = well
228
+
229
+ home :: https://github.com/seattlerb/makerakeworkwell
230
+ rdoc :: http://docs.seattlerb.org/makerakeworkwell
231
+
232
+ == DESCRIPTION:
233
+
234
+ make/rake/work/well provides two simple modifications to rake that
235
+ make working with file tasks cleaner, easier, and faster.
236
+ EOM
237
+
238
+
239
+
240
+ assert_silent do
241
+ h = Hoe.spec "blah" do
242
+ developer "author", "email"
243
+ license "MIT"
244
+ self.version = "1.0"
245
+ self.readme_file = nil
246
+ self.history_file = nil
247
+ self.changes = true
248
+
249
+ self.intuit_values mrww_readme
250
+ end
251
+ end
252
+
253
+ desc = mrww_readme.lines[10..11].join.chomp
254
+ urls = {
255
+ "home" => "https://github.com/seattlerb/makerakeworkwell",
256
+ "rdoc" => "http://docs.seattlerb.org/makerakeworkwell"
257
+ }
258
+
259
+ assert_equal desc, h.description
260
+ assert_equal desc, h.summary
261
+ assert_equal urls, h.urls
262
+ end
263
+
264
+ def test_intuit_values_should_be_silent_if_urls_are_already_set
265
+ h = nil
266
+ nokogiri_readme = <<~EOM
267
+ ## Links
268
+
269
+ * https://nokogiri.org
270
+ * [Installation Help](https://nokogiri.org/tutorials/installing_nokogiri.html)
271
+ * [Tutorials](https://nokogiri.org/tutorials/toc.html)
272
+ * [Cheat Sheet](https://github.com/sparklemotion/nokogiri/wiki/Cheat-sheet)
273
+ * [GitHub](https://github.com/sparklemotion/nokogiri)
274
+ * [Mailing List](https://groups.google.com/group/nokogiri-talk)
275
+ * [Chat/Gitter](https://gitter.im/sparklemotion/nokogiri)
276
+
277
+ EOM
278
+
279
+ exp = {
280
+ "home" => "https://nokogiri.org",
281
+ "bugs" => "https://github.com/sparklemotion/nokogiri/issues",
282
+ "doco" => "https://nokogiri.org/rdoc/index.html",
283
+ "clog" => "https://nokogiri.org/CHANGELOG.html",
284
+ "code" => "https://github.com/sparklemotion/nokogiri",
285
+ }
286
+
287
+ assert_silent do
288
+ h = Hoe.spec "blah" do
289
+ developer "author", "email"
290
+ license "MIT"
291
+
292
+ self.urls = exp
293
+ self.intuit_values nokogiri_readme
294
+ end
295
+ end
296
+
297
+ assert_equal exp, h.urls
298
+ end
299
+
220
300
  def test_metadata
221
301
  hash = [
222
302
  "home :: https://github.com/seattlerb/hoe",
@@ -14,6 +14,10 @@ class TestHoePublish < Minitest::Test
14
14
 
15
15
  make_my_diffs_pretty!
16
16
 
17
+ def linux? platform = RUBY_PLATFORM # TODO: push up to minitest?
18
+ /linux/ =~ platform
19
+ end
20
+
17
21
  def test_make_rdoc_cmd
18
22
  expected = %W[
19
23
  #{Gem.ruby}
@@ -25,6 +29,7 @@ class TestHoePublish < Minitest::Test
25
29
  History.rdoc Manifest.txt README.rdoc
26
30
  ]
27
31
 
32
+ skip if linux?
28
33
  assert_equal expected, @hoe.make_rdoc_cmd
29
34
  end
30
35
  end
@@ -26,36 +26,77 @@ class TestHoeTest < Minitest::Test
26
26
  end
27
27
  end
28
28
 
29
- def test_make_test_cmd_with_different_testlibs
30
- skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
29
+ EXPECTED = %W[-w -Ilib:bin:test:.
30
+ -e 'require "rubygems"; %srequire "test/test_hoe_test.rb"'
31
+ --].join(" ") + " "
32
+
33
+ MT_EXPECTED = %W[-Ilib:test:. -w
34
+ -e '%srequire "test/test_hoe_test.rb"'
35
+ --].join(" ") + " "
31
36
 
32
- expected = ['-w -Ilib:bin:test:. -e \'require "rubygems"; %s',
33
- 'require "test/test_hoe_test.rb"',
34
- "' -- ",
35
- ].join
37
+ def test_make_test_cmd_defaults_to_minitest
38
+ skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
36
39
 
37
40
  # default
38
41
  assert_deprecated do
39
42
  autorun = %(require "minitest/autorun"; )
40
- assert_equal expected % autorun, @tester.make_test_cmd
43
+ assert_equal EXPECTED % autorun, @tester.make_test_cmd
41
44
  end
45
+ end
46
+
47
+ def test_make_test_cmd_for_testunit
48
+ skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
42
49
 
43
50
  assert_deprecated do
44
51
  @tester.testlib = :testunit
45
52
  testunit = %(require "test/unit"; )
46
- assert_equal expected % testunit, @tester.make_test_cmd
53
+ assert_equal EXPECTED % testunit, @tester.make_test_cmd
47
54
  end
55
+ end
48
56
 
49
- assert_deprecated do
50
- @tester.testlib = :minitest
51
- autorun = %(require "minitest/autorun"; )
52
- assert_equal expected % autorun, @tester.make_test_cmd
57
+ def test_make_test_cmd_for_minitest
58
+ skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
59
+
60
+ require "minitest/test_task" # currently in hoe, but will move
61
+
62
+ framework = %(require "minitest/autorun"; )
63
+
64
+ @tester = Minitest::TestTask.create :test do |t|
65
+ t.libs += Hoe.include_dirs.uniq
66
+ t.test_globs = ["test/test_hoe_test.rb"]
67
+ end
68
+
69
+ assert_equal MT_EXPECTED % [framework].join("; "), @tester.make_test_cmd
70
+ end
71
+
72
+ def test_make_test_cmd_for_minitest_prelude
73
+ skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
74
+
75
+ require "minitest/test_task" # currently in hoe, but will move
76
+
77
+ prelude = %(require "other/file")
78
+ framework = %(require "minitest/autorun"; )
79
+
80
+ @tester = Minitest::TestTask.create :test do |t|
81
+ t.test_prelude = prelude
82
+ t.libs += Hoe.include_dirs.uniq
83
+ t.test_globs = ["test/test_hoe_test.rb"]
53
84
  end
54
85
 
86
+ assert_equal MT_EXPECTED % [prelude, framework].join("; "), @tester.make_test_cmd
87
+ end
88
+
89
+ def test_make_test_cmd_for_no_framework
90
+ skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
91
+
55
92
  assert_deprecated do
56
93
  @tester.testlib = :none
57
- assert_equal expected % "", @tester.make_test_cmd
94
+ assert_equal EXPECTED % "", @tester.make_test_cmd
58
95
  end
96
+ end
97
+
98
+ def test_make_test_cmd_for_faketestlib
99
+ skip "Using TESTOPTS... skipping" if ENV["TESTOPTS"]
59
100
 
60
101
  @tester.testlib = :faketestlib
61
102
  e = assert_raises(RuntimeError) do
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.21.0
4
+ version: 3.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDPjCCAiagAwIBAgIBBDANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
13
+ MIIDPjCCAiagAwIBAgIBBTANBgkqhkiG9w0BAQsFADBFMRMwEQYDVQQDDApyeWFu
14
14
  ZC1ydWJ5MRkwFwYKCZ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1z8TUKLpsBUP4kUpIRowkVN1p/jKapV8T3Rbwq+VuYFe+GMKsf8wGZSecG
27
+ oMQ8DzzauZfbvhe2kDg7G9BBPU0wLQlY25rDcCy9bLnD7R0UK3ONqpwvsI5I7x5X
28
+ ZIMXR0a9/DG+55mawwdGzCQobDKiSNLK89KK7OcNTALKU0DfgdTkktdgKchzKHqZ
29
+ d/AHw/kcnU6iuMUoJEcGiJd4gVCTn1l3cDcIvxakGslCA88Jubw0Sqatan0TnC9g
30
+ KToW560QIey7SPfHWduzFJnV
31
31
  -----END CERTIFICATE-----
32
- date: 2020-01-11 00:00:00.000000000 Z
32
+ date: 2021-05-30 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
@@ -142,7 +142,7 @@ metadata:
142
142
  bug_tracker_uri: https://github.com/seattlerb/hoe/issues
143
143
  documentation_uri: http://docs.seattlerb.org/hoe/Hoe.pdf
144
144
  changelog_uri: https://github.com/seattlerb/hoe/blob/master/History.rdoc
145
- post_install_message:
145
+ post_install_message:
146
146
  rdoc_options:
147
147
  - "--main"
148
148
  - README.rdoc
@@ -150,17 +150,20 @@ require_paths:
150
150
  - lib
151
151
  required_ruby_version: !ruby/object:Gem::Requirement
152
152
  requirements:
153
- - - "~>"
153
+ - - ">="
154
154
  - !ruby/object:Gem::Version
155
155
  version: '2.1'
156
+ - - "<"
157
+ - !ruby/object:Gem::Version
158
+ version: '4'
156
159
  required_rubygems_version: !ruby/object:Gem::Requirement
157
160
  requirements:
158
161
  - - ">="
159
162
  - !ruby/object:Gem::Version
160
163
  version: '1.4'
161
164
  requirements: []
162
- rubygems_version: 3.0.3
163
- signing_key:
165
+ rubygems_version: 3.2.16
166
+ signing_key:
164
167
  specification_version: 4
165
168
  summary: Hoe is a rake/rubygems helper for project Rakefiles
166
169
  test_files: []
metadata.gz.sig CHANGED
Binary file