subwrap 0.3.6 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ module Project
5
5
  PrettyName = "Subwrap: Enhanced Subversion Command"
6
6
  Name = "subwrap"
7
7
  RubyForgeName = "subwrap"
8
- Version = "0.3.6"
8
+ Version = "0.3.7"
9
9
  Specification = Gem::Specification.new do |s|
10
10
  s.name = Project::Name
11
11
  s.summary = "A nifty wrapper command for Subversion's command-line svn client"
@@ -6,15 +6,18 @@ require 'rexml/document'
6
6
  require 'rexml/xpath'
7
7
  require 'rubygems'
8
8
 
9
- gem 'facets', '>=1.8.51'
9
+ gem 'facets'
10
10
  require 'facets/core/kernel/require_local'
11
11
  require 'facets/core/enumerable/uniq_by'
12
12
  require 'facets/core/kernel/silence_stream'
13
13
  require 'facets/core/module/initializer'
14
+ require 'facets/core/fileutils/which'
15
+ require 'facets/core/fileutils/whereis'
14
16
 
15
- gem 'quality_extensions', '>=0.0.7'
17
+ gem 'quality_extensions'
16
18
  require 'quality_extensions/kernel/windows_platform'
17
19
 
20
+
18
21
  # Had a lot of trouble getting ActiveSupport to load without giving errors! Eventually gave up on that idea since I only needed it for mattr_accessor and Facets supplies that.
19
22
  #gem 'activesupport' # mattr_accessor
20
23
  #require 'active_support'
@@ -398,12 +401,13 @@ module Subversion
398
401
  end
399
402
 
400
403
  # The location of the executable to be used
401
- # to do: We should find a smarter way to do this. (Could cache this result in .subwrap or somewhere, so we don't have to do all this work on every invocation...)
404
+ # to do: Is there a smarter/faster way to do this? (Could cache this result in .subwrap or somewhere, so we don't have to do all this work on every invocation...)
402
405
  def self.executable
406
+ # FileUtils.which('svn') would return our Ruby *wrapper* script for svn. We actually want to return here the binary/executable that we are
407
+ # *wrapping* so we have to use whereis and then use the first one that is ''not'' a Ruby script.
403
408
  @@executable ||=
404
- ENV['PATH'].split(windows_platform? ? ';' : ':').each do |dir|
405
- executable = File.join(dir, (windows_platform? ? 'svn.exe' : 'svn'))
406
- if File.exist?(executable) and !self.ruby_script?(executable) # We want to wrap the svn binary provided by Subversion, not our custom replacement for that.
409
+ FileUtils.whereis('svn') do |executable|
410
+ if !self.ruby_script?(executable) # We want to wrap the svn binary provided by Subversion, not our custom replacement for that.
407
411
  return windows_platform? ? %{"#{executable}"} : executable
408
412
  end
409
413
  end
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: subwrap
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.6
6
+ version: 0.3.7
7
7
  date: 2007-07-18 00:00:00 -07:00
8
8
  summary: A nifty wrapper command for Subversion's command-line svn client
9
9
  require_paths: