hoe 2.3.1 → 2.3.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.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,15 @@
1
+ === 2.3.2 / 2009-06-30
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * splat all gems on release. (luis lavena)
6
+
7
+ * 3 bug fixes:
8
+
9
+ * Fix File.read_utf on ruby 1.9 for UTF-8 files
10
+ * Force read_utf to open file ascii-8bit. UGH. ruby 1.9 encoding is a PITA.
11
+ * Version regex needs to allow multiple spaces for OCD coders.
12
+
1
13
  === 2.3.1 / 2009-06-24
2
14
 
3
15
  * 2 minor enhancements:
data/lib/hoe.rb CHANGED
@@ -59,7 +59,7 @@ require 'hoe/rake'
59
59
 
60
60
  class Hoe
61
61
  # duh
62
- VERSION = '2.3.1'
62
+ VERSION = '2.3.2'
63
63
 
64
64
  @@plugins = [:clean, :debug, :deps, :flay, :flog, :package, :publish,
65
65
  :rcov, :signing, :test]
@@ -357,7 +357,7 @@ class Hoe
357
357
 
358
358
  spec.files.each do |file|
359
359
  next unless File.exist? file
360
- version = File.read(file)[/VERSION = ([\"\'])([\d][\d\w\.]+)\1/, 2]
360
+ version = File.read(file)[/VERSION += +([\"\'])([\d][\d\w\.]+)\1/, 2]
361
361
  break if version
362
362
  end
363
363
 
@@ -564,6 +564,8 @@ end
564
564
  class File
565
565
  # Like File::read, but strips out a BOM marker if it exists.
566
566
  def self.read_utf path
567
- File.read(path).sub(/\A\xEF\xBB\xBF/, '')
567
+ open path, 'rb' do |f|
568
+ f.read.sub %r/\A\xEF\xBB\xBF/, ''
569
+ end
568
570
  end
569
571
  end
@@ -81,7 +81,7 @@ module Hoe::Package
81
81
  pkg = "pkg/#{name}-#{version}"
82
82
  files = [(@need_tar ? "#{pkg}.tgz" : nil),
83
83
  (@need_zip ? "#{pkg}.zip" : nil),
84
- "#{pkg}.gem"].compact
84
+ Dir["#{pkg}*.gem"]].flatten.compact
85
85
 
86
86
  puts "Releasing #{name} v. #{version}"
87
87
  rf.add_release rubyforge_name, name, version, *files
@@ -1,5 +1,6 @@
1
1
  require 'minitest/autorun'
2
2
  require 'hoe'
3
+ require 'tempfile'
3
4
 
4
5
  $rakefile = nil # shuts up a warning in rdoctask.rb
5
6
 
@@ -8,6 +9,14 @@ class TestHoe < MiniTest::Unit::TestCase
8
9
  Rake.application.clear
9
10
  end
10
11
 
12
+ def test_file_read_utf
13
+ Tempfile.open 'BOM' do |io|
14
+ io.write "\xEF\xBB\xBFBOM"
15
+ io.rewind
16
+ assert_equal 'BOM', File.read_utf(io.path)
17
+ end
18
+ end
19
+
11
20
  def test_possibly_better
12
21
  t = Gem::Specification::TODAY
13
22
  hoe = Hoe.spec("blah") do
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: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -30,7 +30,7 @@ cert_chain:
30
30
  FBHgymkyj/AOSqKRIpXPhjC6
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2009-06-24 00:00:00 -07:00
33
+ date: 2009-06-30 00:00:00 -07:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file