autoproj 1.9.7.rc11 → 1.9.7.rc12

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,6 +14,9 @@ Utilrb::Rake.hoe do
14
14
  self.email = "rock-dev@dfki.de"
15
15
 
16
16
  self.spec_extras[:required_ruby_version] = ">= 1.9.2"
17
+
18
+ license 'BSD'
19
+
17
20
  extra_deps <<
18
21
  ['autobuild', '>= 1.7.0'] <<
19
22
  ['utilrb', '>= 1.6.0'] <<
@@ -74,6 +74,9 @@ module Autoproj
74
74
  string
75
75
  end
76
76
 
77
+ def self.warn(str, *args)
78
+ STDERR.puts "WARN #{str}"
79
+ end
77
80
  def self.message(str)
78
81
  STDERR.puts " #{str}"
79
82
  end
@@ -1147,9 +1150,11 @@ fi
1147
1150
 
1148
1151
  fields = Hash.new
1149
1152
  File.readlines(filename).each do |line|
1153
+ line = line.strip
1150
1154
  if line.strip =~ /^(\w+)=(?:["'])?([^"']+)(?:["'])?$/
1151
1155
  fields[$1] = $2
1152
- else Autoproj.warn "error parsing /etc/os-release, line: #{line.inspect}"
1156
+ elsif !line.empty?
1157
+ Autoproj.warn "could not parse line '#{line.inspect}' in /etc/os-release"
1153
1158
  end
1154
1159
  end
1155
1160
 
@@ -1787,6 +1792,14 @@ module Autobuild
1787
1792
  programs[name.to_sym] || programs[name.to_s] || name.to_s
1788
1793
  end
1789
1794
 
1795
+ def find_in_path(file)
1796
+ path = ENV['PATH'].split(File::PATH_SEPARATOR).
1797
+ find { |dir| File.exists?(File.join(dir, file)) }
1798
+ if path
1799
+ return File.join(path, file)
1800
+ end
1801
+ end
1802
+
1790
1803
  # Resolves the absolute path to a given tool
1791
1804
  def tool_in_path(name)
1792
1805
  path, path_name, path_env = programs_in_path[name]
@@ -1798,11 +1811,7 @@ module Autobuild
1798
1811
  # This is already a full path
1799
1812
  path = current
1800
1813
  else
1801
- path = ENV['PATH'].split(':').
1802
- find { |dir| File.exists?(File.join(dir, current)) }
1803
- if path
1804
- path = File.join(path, current)
1805
- end
1814
+ path = find_in_path(current)
1806
1815
  end
1807
1816
 
1808
1817
  if !path
@@ -74,6 +74,9 @@ module Autoproj
74
74
  string
75
75
  end
76
76
 
77
+ def self.warn(str, *args)
78
+ STDERR.puts "WARN #{str}"
79
+ end
77
80
  def self.message(str)
78
81
  STDERR.puts " #{str}"
79
82
  end
@@ -1023,9 +1023,11 @@ fi
1023
1023
 
1024
1024
  fields = Hash.new
1025
1025
  File.readlines(filename).each do |line|
1026
+ line = line.strip
1026
1027
  if line.strip =~ /^(\w+)=(?:["'])?([^"']+)(?:["'])?$/
1027
1028
  fields[$1] = $2
1028
- else Autoproj.warn "error parsing /etc/os-release, line: #{line.inspect}"
1029
+ elsif !line.empty?
1030
+ Autoproj.warn "could not parse line '#{line.inspect}' in /etc/os-release"
1029
1031
  end
1030
1032
  end
1031
1033
 
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.9.7.rc11"
2
+ VERSION = "1.9.7.rc12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.7.rc11
4
+ version: 1.9.7.rc12
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -202,7 +202,7 @@ files:
202
202
  - .gemtest
203
203
  homepage: http://rock-robotics.org/documentation/autoproj
204
204
  licenses:
205
- - MIT
205
+ - BSD
206
206
  post_install_message:
207
207
  rdoc_options:
208
208
  - --main