autoproj 1.13.0 → 1.13.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26fd2b3055fed7ae05cf424070645adff0461145
4
- data.tar.gz: d3b0a4563a5a33767f57ceae457e46d3296a7cd2
3
+ metadata.gz: e8c0eb43db5cb20d6097d40687891ce39ea963a2
4
+ data.tar.gz: 739b2709c825b0b726c87efbece61f644535f910
5
5
  SHA512:
6
- metadata.gz: 0ff86e87b351d820f46895f3560f5672b02e2fd42106ae89e94f1501d1d249eda8070f67516182cdfcf5cc1c074a141fe60dad3f79932ef456680d4afc1c5b20
7
- data.tar.gz: 21d74bf9a38419528efa7059d1ca6622f9e278d551f024ec3e2e723a58023fa816602961c79ce1329390c1021dae562b224e56777e3d36e087b3da37f4514ea2
6
+ metadata.gz: a4028b0a7ec006dc9553c6e1ba84e5ebd978bf5f20772163b527c223a4fd61757907f79d7f34e1232ed41a33cbb3a5a2324ec25e30e87ebe4a674379e36e72df
7
+ data.tar.gz: 6c0599dc5381ecab814f22672113f96e712aca049a04b0c79b7d0e8b9c7e13eb764ef0e9776da878babb4cbbe2326a21554297f031b0283050a70586bab29adc
@@ -73,12 +73,18 @@ module Autoproj
73
73
  def self.vcs_definition_to_hash(spec)
74
74
  plain = Array.new
75
75
  filtered_spec = Hash.new
76
- spec.each do |key, value|
77
- keys = key.to_s.split(/\s+/)
78
- plain.concat(keys[0..-2])
79
- filtered_spec[keys[-1].to_sym] = value
76
+
77
+ if spec.respond_to?(:to_str)
78
+ plain << spec
79
+ spec = Hash.new
80
+ else
81
+ Array(spec).each do |key, value|
82
+ keys = key.to_s.split(/\s+/)
83
+ plain.concat(keys[0..-2])
84
+ filtered_spec[keys[-1].to_sym] = value
85
+ end
86
+ spec = filtered_spec
80
87
  end
81
- spec = filtered_spec
82
88
 
83
89
  if plain.size > 1
84
90
  raise ConfigError.new, "invalid syntax"
@@ -94,9 +100,14 @@ module Autoproj
94
100
  elsif Autoproj.has_source_handler?(vcs)
95
101
  spec = Autoproj.call_source_handler(vcs, url.join(':'), spec)
96
102
  else
97
- source_dir = File.expand_path(File.join(Autoproj.config_dir, short_url))
103
+ source_dir =
104
+ if Pathname.new(short_url).absolute?
105
+ File.expand_path(short_url)
106
+ else
107
+ File.expand_path(File.join(Autoproj.config_dir, short_url))
108
+ end
98
109
  if !File.directory?(source_dir)
99
- raise ConfigError.new, "'#{spec.inspect}' is neither a remote source specification, nor a local source definition"
110
+ raise ConfigError.new, "'#{spec.inspect}' is neither a remote source specification, nor an existing local directory"
100
111
  end
101
112
  spec.merge!(:type => 'local', :url => source_dir)
102
113
  end
@@ -168,12 +179,17 @@ module Autoproj
168
179
  url
169
180
  end
170
181
 
182
+ # Whether the underlying package needs to be imported
183
+ def needs_import?
184
+ type != 'none' && type != 'local'
185
+ end
186
+
171
187
  # Returns a properly configured instance of a subclass of
172
188
  # Autobuild::Importer that match this VCS definition
173
189
  #
174
- # Returns nil if the VCS type is 'none'
190
+ # @return [Autobuild::Importer,nil] the autobuild importer
175
191
  def create_autobuild_importer
176
- return if type == "none"
192
+ return if !needs_import?
177
193
 
178
194
  url = VCSDefinition.to_absolute_url(self.url)
179
195
  Autobuild.send(type, url, options)
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "1.13.0"
2
+ VERSION = "1.13.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 1.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rock Core Developers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild