autobuild 1.5.58 → 1.5.59.rc1

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.
@@ -142,11 +142,28 @@ module Autobuild
142
142
  @extended_states || (@extended_states.nil? && Orogen.extended_states)
143
143
  end
144
144
 
145
+ attr_writer :orogen_file
146
+
145
147
  # Path to the orogen file used for this package
146
148
  #
147
149
  # If not set, the class will look for a .orogen file in the package
148
- # source directory
149
- attr_accessor :orogen_file
150
+ # source directory. It will return nil if the package is not checked out
151
+ # yet, and raise ArgumentError if the package is indeed present but no
152
+ # orogen file can be found
153
+ #
154
+ # It can be explicitely set with #orogen_file=
155
+ def orogen_file
156
+ if @orogen_file
157
+ @orogen_file
158
+ else
159
+ return if !File.directory?(srcdir)
160
+
161
+ Dir.glob(File.join(srcdir, '*.orogen')) do |path|
162
+ return File.basename(path)
163
+ end
164
+ raise ArgumentError, "cannot find an oroGen specification file in #{srcdir}"
165
+ end
166
+ end
150
167
 
151
168
  def initialize(*args, &config)
152
169
  super
@@ -202,15 +219,8 @@ module Autobuild
202
219
 
203
220
  file configurestamp => genstamp
204
221
 
205
- if !orogen_file
206
- Dir.glob(File.join(srcdir, '*.orogen')) do |path|
207
- @orogen_file = File.basename(path)
208
- break
209
- end
210
- if !orogen_file
211
- raise ArgumentError, "cannot find an oroGen specification file in #{srcdir}"
212
- end
213
- end
222
+ # Cache the orogen file name
223
+ @orogen_file ||= self.orogen_file
214
224
 
215
225
  file genstamp => File.join(srcdir, orogen_file) do
216
226
  isolate_errors { regen }
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.5.58" unless defined? Autobuild::VERSION
2
+ VERSION = "1.5.59.rc1" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,13 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- hash: 119
5
- prerelease:
4
+ hash: 15424447
5
+ prerelease: 7
6
6
  segments:
7
7
  - 1
8
8
  - 5
9
- - 58
10
- version: 1.5.58
9
+ - 59
10
+ - rc
11
+ - 1
12
+ version: 1.5.59.rc1
11
13
  platform: ruby
12
14
  authors:
13
15
  - Sylvain Joyeux
@@ -15,7 +17,7 @@ autorequire:
15
17
  bindir: bin
16
18
  cert_chain: []
17
19
 
18
- date: 2012-01-16 00:00:00 Z
20
+ date: 2012-01-17 00:00:00 Z
19
21
  dependencies:
20
22
  - !ruby/object:Gem::Dependency
21
23
  name: rake
@@ -155,12 +157,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
157
  required_rubygems_version: !ruby/object:Gem::Requirement
156
158
  none: false
157
159
  requirements:
158
- - - ">="
160
+ - - ">"
159
161
  - !ruby/object:Gem::Version
160
- hash: 3
162
+ hash: 25
161
163
  segments:
162
- - 0
163
- version: "0"
164
+ - 1
165
+ - 3
166
+ - 1
167
+ version: 1.3.1
164
168
  requirements: []
165
169
 
166
170
  rubyforge_project: autobuild