minigems 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ GEM_EMAIL = "info@atelierfabien.be"
15
15
 
16
16
  GEM_NAME = "minigems"
17
17
  PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
18
- GEM_VERSION = (Gem::MiniGems::VERSION || "0.9.2") + PKG_BUILD
18
+ GEM_VERSION = (Gem::MiniGems::VERSION || "0.9.3") + PKG_BUILD
19
19
 
20
20
  RELEASE_NAME = "REL #{GEM_VERSION}"
21
21
 
data/lib/minigems.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Gem
2
2
  unless const_defined?(:MiniGems)
3
3
  module MiniGems
4
- VERSION = "0.9.2"
4
+ VERSION = "0.9.3"
5
5
 
6
6
  # The next line needs to be kept exactly as shown; it's being replaced
7
7
  # during minigems installation.
@@ -237,7 +237,7 @@ unless $LOADED_FEATURES.include?("rubygems.rb")
237
237
  # Find a file in the source path and activate its gem (best/highest match).
238
238
  def self.activate_from_source_path(name)
239
239
  matched_paths = self.path.map do |path|
240
- [Pathname.new("#{path}/gems"), Dir["#{path}/gems/**/#{name}.rb"]]
240
+ [Pathname.new("#{path}/gems"), Dir["#{path}/gems/**/#{name}{,.rb,.rbw,.so,.bundle,.dll,.sl,.jar}"]]
241
241
  end
242
242
  versions = matched_paths.inject([]) do |versions, (root_path, paths)|
243
243
  paths.each do |matched_path|
@@ -248,8 +248,10 @@ unless $LOADED_FEATURES.include?("rubygems.rb")
248
248
  gem_spec = Gem::Specification.load(gemspec_path)
249
249
  gem_spec.loaded_from = gemspec_path
250
250
  gem_dir = Pathname.new("#{root_path}/#{dir_name}")
251
- relative_file_path = Pathname.new(matched_path).relative_path_from(gem_dir).to_s
252
- if gem_spec.require_paths.any? { |req| relative_file_path.index(req) == 0 }
251
+
252
+ filename = name + File.extname(matched_path)
253
+ relative_file = Pathname.new(matched_path).relative_path_from(gem_dir).to_s
254
+ if gem_spec.require_paths.any? { |req| File.join(req, filename) == relative_file }
253
255
  versions << gem_spec
254
256
  end
255
257
  end
@@ -127,7 +127,7 @@ module Gem
127
127
  def interpolate_wrapper(gem_name, executable_name, mode = 'minigems')
128
128
  @template_code ||= File.read(File.join(minigems_path, 'lib', 'minigems', 'executable_wrapper'))
129
129
  vars = { 'GEM_NAME' => gem_name, 'EXECUTABLE_NAME' => executable_name }
130
- vars['SHEBANG'] = "#!#{Gem.ruby}"
130
+ vars['SHEBANG'] = "#!/usr/bin/env " + Gem::ConfigMap[:ruby_install_name]
131
131
  vars['GEM_MODE'] = mode
132
132
  vars.inject(@template_code) { |str,(k,v)| str.gsub(k,v) }
133
133
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minigems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabien Franzen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-09-27 00:00:00 +02:00
12
+ date: 2008-09-30 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15