hoe 1.8.1 → 1.8.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.
Files changed (3) hide show
  1. data/History.txt +6 -0
  2. data/lib/hoe.rb +22 -17
  3. metadata +3 -3
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ === 1.8.2 / 2008-10-24:
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Now asks Inline for known inlined classes if you package w/ INLINE=1.
6
+
1
7
  === 1.8.1 / 2008-10-22
2
8
 
3
9
  * 1 bug fix:
data/lib/hoe.rb CHANGED
@@ -124,7 +124,7 @@ end
124
124
  #
125
125
 
126
126
  class Hoe
127
- VERSION = '1.8.1'
127
+ VERSION = '1.8.2'
128
128
  GEMURL = URI.parse 'http://gems.rubyforge.org' # for namespace :deps below
129
129
 
130
130
  ruby_prefix = Config::CONFIG['prefix']
@@ -534,27 +534,32 @@ class Hoe
534
534
  # Allow automatic inclusion of compiled extensions
535
535
  if ENV['INLINE'] then
536
536
  s.platform = ENV['FORCE_PLATFORM'] || Gem::Platform::CURRENT
537
- # name of the extension is CamelCase
538
- alternate_name = if name =~ /[A-Z]/ then
539
- name.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, '')
540
- elsif name =~ /_/ then
541
- name.capitalize.gsub(/_([a-z])/) { $1.upcase }
542
- end
543
537
 
544
538
  # Try collecting Inline extensions for +name+
545
539
  if defined?(Inline) then
546
540
  directory 'lib/inline'
547
541
 
548
- extensions = Dir.chdir(Inline::directory) {
549
- Dir["Inline_{#{name},#{alternate_name}}_*.#{DLEXT}"]
550
- }
551
- extensions.each do |ext|
552
- # add the inlined extension to the spec files
553
- s.files += ["lib/inline/#{ext}"]
554
-
555
- # include the file in the tasks
556
- file "lib/inline/#{ext}" => ["lib/inline"] do
557
- cp File.join(Inline::directory, ext), "lib/inline"
542
+ Inline.registered_inline_classes.each do |cls|
543
+ name = cls.name # TODO: what about X::Y::Z?
544
+ # name of the extension is CamelCase
545
+ alternate_name = if name =~ /[A-Z]/ then
546
+ name.gsub(/([A-Z])/, '_\1').downcase.sub(/^_/, '')
547
+ elsif name =~ /_/ then
548
+ name.capitalize.gsub(/_([a-z])/) { $1.upcase }
549
+ end
550
+
551
+ extensions = Dir.chdir(Inline::directory) {
552
+ Dir["Inline_{#{name},#{alternate_name}}_*.#{DLEXT}"]
553
+ }
554
+
555
+ extensions.each do |ext|
556
+ # add the inlined extension to the spec files
557
+ s.files += ["lib/inline/#{ext}"]
558
+
559
+ # include the file in the tasks
560
+ file "lib/inline/#{ext}" => ["lib/inline"] do
561
+ cp File.join(Inline::directory, ext), "lib/inline"
562
+ end
558
563
  end
559
564
  end
560
565
  end
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: 1.8.1
4
+ version: 1.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Davis
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-22 00:00:00 -05:00
12
+ date: 2008-10-24 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.0.0
23
+ version: 1.0.1
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rake