hoe 3.18.1 → 3.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce03a7b750a6d088f8682a6cbae61a3fb0304c6f8264aabbf18911654dd3180c
4
- data.tar.gz: 5de095133b1ffdb47046a03a84e1bb73dfd9fa68d18d165396f18345eefa957d
3
+ metadata.gz: 60448a5d7c3bd1a47db43c58f5fc6df41be8d019f4cbd42ec0422f35adc9e65c
4
+ data.tar.gz: c314ee93a2fb7ece4f45653b998992bb9290efdb9f48f801bf302598d27d339f
5
5
  SHA512:
6
- metadata.gz: 4e9d640f0483089d2afbf68675cc24c832af75886e1acd6c8ba2984b6cdc104a984e04689af962d3f92aebcbd9f25eafff556384c7ef0ea2e3fa4883d1cbc501
7
- data.tar.gz: a10fe09bc6ff92504229ff602a58aa379715ab62a6b0e52cafd3e72eefb398613fb1d05a64621d2305187680be0ad010423c32fdaaa301f0f6680777e681e024
6
+ metadata.gz: 427f6587c04472d4f736c07c1a5350774ea7eacde7a391af49b7f279f06dd8927d40954655668a7bb15b6273f51c2fbd13fb8d8d90b8c20871ef9f5a42247fed
7
+ data.tar.gz: 0a07b4c88ef15ec87eb7fe2c7be3c388aca7bf73f1e0292e6d69da7263a047b1bc30f6e468b1c3fd51225f4f7d41c578e92b8a8f1d86527351b92b332130fb33
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,16 @@
1
+ === 3.19.0 / 2019-10-29
2
+
3
+ * 4 minor enhancements:
4
+
5
+ * Added deprecation to parse_urls for ancient url array form.
6
+ * Added support for gemspec metadata. (viraptor)
7
+ * Hoe#parse_urls now returns a hash no matter what
8
+ * Removed looong deprecated Hoe#url/url= methods.
9
+
10
+ * 1 bug fix:
11
+
12
+ * Fixed sow for ruby 2.6 deprecations in ERB. (felipec)
13
+
1
14
  === 3.18.1 / 2019-09-14
2
15
 
3
16
  * 1 minor enhancement:
@@ -5,6 +5,7 @@ code :: https://github.com/seattlerb/hoe
5
5
  bugs :: https://github.com/seattlerb/hoe/issues
6
6
  rdoc :: http://docs.seattlerb.org/hoe/
7
7
  doco :: http://docs.seattlerb.org/hoe/Hoe.pdf
8
+ clog :: https://github.com/seattlerb/hoe/blob/master/History.rdoc
8
9
  other :: http://github.com/jbarnette/hoe-plugin-examples
9
10
 
10
11
  == DESCRIPTION:
data/bin/sow CHANGED
@@ -117,7 +117,11 @@ Dir.chdir project do
117
117
  warn "erb: #{path}"
118
118
 
119
119
  File.open path, "w" do |io|
120
- erb = ERB.new file, nil, "<>"
120
+ if ERB.instance_method(:initialize).parameters.assoc(:key) # Ruby 2.6+
121
+ erb = ERB.new file, trim_mode: "<>"
122
+ else
123
+ erb = ERB.new file, nil, "<>"
124
+ end
121
125
  erb.filename = path
122
126
  io.puts erb.result(binding)
123
127
  end
data/lib/hoe.rb CHANGED
@@ -91,7 +91,7 @@ class Hoe
91
91
  include Rake::DSL if defined?(Rake::DSL)
92
92
 
93
93
  # duh
94
- VERSION = "3.18.1"
94
+ VERSION = "3.19.0"
95
95
 
96
96
  @@plugins = [:clean, :debug, :deps, :flay, :flog, :newb, :package,
97
97
  :publish, :gemcutter, :signing, :test]
@@ -111,6 +111,18 @@ class Hoe
111
111
 
112
112
  RUBY_FLAGS = ENV["RUBY_FLAGS"] || default_ruby_flags
113
113
 
114
+ ##
115
+ # Map from the commonly used url names to gemspec's metadata keys
116
+ # See https://guides.rubygems.org/specification-reference/#metadata
117
+
118
+ URLS_TO_META_MAP = {
119
+ "bugs" => "bug_tracker_uri",
120
+ "clog" => "changelog_uri",
121
+ "doco" => "documentation_uri",
122
+ "home" => "homepage_uri",
123
+ "code" => "source_code_uri",
124
+ }
125
+
114
126
  ##
115
127
  # Default configuration values for .hoerc. Plugins should populate
116
128
  # this on load.
@@ -243,24 +255,6 @@ class Hoe
243
255
 
244
256
  attr_accessor :test_globs
245
257
 
246
- ##
247
- # Deprecated: Optional: The url(s) of the project. (can be array).
248
- # Auto-populates to a list of urls read from the beginning of
249
- # README.txt.
250
- #
251
-
252
- def url
253
- warn "NOTE: Hoe#url is deprecated, use urls. It will be removed on or after 2012-06-01."
254
- warn "Used from #{caller.first}"
255
- @url
256
- end
257
-
258
- def url=o # :nodoc:
259
- warn "NOTE: Hoe#url= is deprecated, use urls=. It will be removed on or after 2012-06-01."
260
- warn "Used from #{caller.first}"
261
- @url=o
262
- end
263
-
264
258
  ##
265
259
  # Optional: The urls of the project. This can be an array or
266
260
  # (preferably) a hash. Auto-populates to the urls read from the
@@ -532,14 +526,7 @@ class Hoe
532
526
  s.version = version if version
533
527
  s.summary = summary
534
528
  s.email = email
535
- s.homepage = case urls
536
- when Hash then
537
- urls["home"] || urls.values.first
538
- when Array then
539
- urls.first
540
- else
541
- warn "** Unknown urls format: #{urls.inspect}"
542
- end
529
+ s.homepage = urls["home"] || urls.values.first
543
530
  s.description = description
544
531
  s.files = manifest
545
532
  s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
@@ -547,6 +534,9 @@ class Hoe
547
534
  s.require_paths = dirs unless dirs.empty?
548
535
  s.rdoc_options = ["--main", readme_file]
549
536
  s.post_install_message = post_install_message
537
+ s.metadata = (urls.keys & URLS_TO_META_MAP.keys).map { |name|
538
+ [URLS_TO_META_MAP[name], urls[name]]
539
+ }.to_h
550
540
 
551
541
  missing "Manifest.txt" if s.files.empty?
552
542
 
@@ -719,7 +709,10 @@ class Hoe
719
709
  if lines.first =~ /::/ then
720
710
  Hash[lines.map { |line| line.split(/\s*::\s*/) }]
721
711
  else
722
- lines
712
+ warn "DEPRECATED: Please switch readme to hash format for urls."
713
+ warn " Only defining 'home' url."
714
+ warn " This will be removed on or after 2020-10-28."
715
+ { "home" => lines.first }
723
716
  end
724
717
  end
725
718
 
@@ -146,14 +146,9 @@ class TestHoe < Minitest::Test
146
146
  def test_initialize_intuit
147
147
  Dir.mktmpdir do |path|
148
148
  Dir.chdir path do
149
- open "Manifest.txt", "w" do |io| # sorted
150
- io.puts "FAQ.rdoc"
151
- io.puts "History.rdoc"
152
- io.puts "README.rdoc"
153
- end
154
-
155
- open "README.rdoc", "w" do |io| io.puts "= blah" end
156
- open "History.rdoc", "w" do |io| io.puts "=== 1.0" end
149
+ File.write "Manifest.txt", "FAQ.rdoc\nHistory.rdoc\nREADME.rdoc\n"
150
+ File.write "README.rdoc", "= blah\n\nhome :: http://blah/"
151
+ File.write "History.rdoc", "=== 1.0"
157
152
 
158
153
  assert_equal "History.rdoc", hoe.history_file
159
154
  assert_equal "README.rdoc", hoe.readme_file
@@ -166,15 +161,10 @@ class TestHoe < Minitest::Test
166
161
  def test_initialize_intuit_ambiguous
167
162
  Dir.mktmpdir do |path|
168
163
  Dir.chdir path do
169
- open "Manifest.txt", "w" do |io|
170
- io.puts "History.rdoc" # sorted
171
- io.puts "README.ja.rdoc"
172
- io.puts "README.rdoc"
173
- end
174
-
175
- open "README.rdoc", "w" do |io| io.puts "= blah" end
176
- open "README.ja.rdoc", "w" do |io| io.puts "= blah" end
177
- open "History.rdoc", "w" do |io| io.puts "=== 1.0" end
164
+ File.write "Manifest.txt", "History.rdoc\nREADME.ja.rdoc\nREADME.rdoc\n"
165
+ File.write "README.rdoc", "= blah\n\nhome :: http://blah/"
166
+ File.write "README.ja.rdoc", "= blah\n\nhome :: http://blah/"
167
+ File.write "History.rdoc", "=== 1.0"
178
168
 
179
169
  assert_equal "README.ja.rdoc", hoe(:skip_files).readme_file
180
170
  end
@@ -201,12 +191,12 @@ class TestHoe < Minitest::Test
201
191
  "* http://docs.seattlerb.org/hoe/Hoe.pdf",
202
192
  "* http://github.com/jbarnette/hoe-plugin-examples"].join "\n"
203
193
 
204
- exp = ["https://github.com/seattlerb/hoe",
205
- "http://docs.seattlerb.org/hoe/",
206
- "http://docs.seattlerb.org/hoe/Hoe.pdf",
207
- "http://github.com/jbarnette/hoe-plugin-examples"]
194
+ exp = { "home" => "https://github.com/seattlerb/hoe" }
195
+ err = /DEPRECATED: Please switch readme to hash format/
208
196
 
209
- assert_equal exp, hoe.parse_urls(ary)
197
+ assert_output "", err do
198
+ assert_equal exp, hoe.parse_urls(ary)
199
+ end
210
200
  end
211
201
 
212
202
  def test_parse_urls_hash
@@ -244,6 +234,7 @@ class TestHoe < Minitest::Test
244
234
  "bugs" => "https://github.com/seattlerb/hoe/issues",
245
235
  "rdoc" => "http://docs.seattlerb.org/hoe/",
246
236
  "doco" => "http://docs.seattlerb.org/hoe/Hoe.pdf",
237
+ "clog" => "https://github.com/seattlerb/hoe/blob/master/History.rdoc",
247
238
  "other" => "http://github.com/jbarnette/hoe-plugin-examples",
248
239
  }
249
240
 
@@ -272,11 +263,12 @@ class TestHoe < Minitest::Test
272
263
 
273
264
  expected = [
274
265
  ["hoe", :development, "~> #{Hoe::VERSION.sub(/\.\d+$/, "")}"],
275
- ["rdoc", :development, ">= 4.0, < 7"],
266
+ ["rdoc", :development, "< 7", ">= 4.0"],
276
267
  ]
277
268
 
278
269
  assert_equal expected, deps.map { |dep|
279
- [dep.name, dep.type, dep.requirement.to_s]
270
+ dep_reqs = dep.requirement.to_s.split(/, /).sort
271
+ [dep.name, dep.type, *dep_reqs]
280
272
  }
281
273
  end
282
274
 
@@ -51,8 +51,6 @@ class TestHoeDebug < Minitest::Test
51
51
  end
52
52
 
53
53
  def test_check_manifest_missing
54
- skip "https://github.com/MagLev/maglev/issues/224" if maglev?
55
-
56
54
  in_tmpdir do
57
55
  manifest
58
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoe
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.18.1
4
+ version: 3.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -29,7 +29,7 @@ cert_chain:
29
29
  Em82dBUFsipwMLCYj39kcyHWAxyl6Ae1Cn9r/ItVBCxoeFdrHjfavnrIEoXUt4bU
30
30
  UfBugfLD19bu3nvL+zTAGx/U
31
31
  -----END CERTIFICATE-----
32
- date: 2019-09-15 00:00:00.000000000 Z
32
+ date: 2019-10-30 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rake
@@ -136,7 +136,12 @@ files:
136
136
  homepage: http://www.zenspider.com/projects/hoe.html
137
137
  licenses:
138
138
  - MIT
139
- metadata: {}
139
+ metadata:
140
+ homepage_uri: http://www.zenspider.com/projects/hoe.html
141
+ source_code_uri: https://github.com/seattlerb/hoe
142
+ bug_tracker_uri: https://github.com/seattlerb/hoe/issues
143
+ documentation_uri: http://docs.seattlerb.org/hoe/Hoe.pdf
144
+ changelog_uri: https://github.com/seattlerb/hoe/blob/master/History.rdoc
140
145
  post_install_message:
141
146
  rdoc_options:
142
147
  - "--main"
metadata.gz.sig CHANGED
Binary file