autobuild 1.7.12.b1 → 1.7.12.rc1

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: 3b751fdd16c5fd714935d5c171f4d9e409205d81
4
- data.tar.gz: 7a1e3aed96af604c30b08fb5072221d0da304251
3
+ metadata.gz: 471798bd185dc3139ce68a4c7af01ed7362e1aa9
4
+ data.tar.gz: 2f50cd8d1df428914ceba5004c22c2d41b9d6aae
5
5
  SHA512:
6
- metadata.gz: e4d025a0012ab19085301c0fe8796ded4b68e05b49a2f0a25c9bedc4a177f954af446a5ae17afc1c3699ef894dd11b5d426b7dbf8a976c7fddbf5610cac97b24
7
- data.tar.gz: dc15319a8e9348b41a70f771567f0cca92f3553cda9d2d099f54bf8f8ebe49eeed3733b98ca1200cc93c18ba9266d9dbe16add9f463a7ec598f526a8e4371e16
6
+ metadata.gz: 6f9928f0e06d4d8d4d41c034af96d2d729ff78adb1fbe2f8ada7b669d4efc674d9ba5ebce07fdbe4ce6bca514c1e1155f1dadef7f87aeb6d6903daee44555474
7
+ data.tar.gz: d5a3e1fdb7d8bba6a62bab49acede13af5cde51215269a8a355e1bb369358342deb792e8e6ec24f6bf7aaa2d6021b02b5bcdf34e5adfcd6ba560c9d85abfb505
@@ -205,13 +205,6 @@ module Autobuild
205
205
  # is the same than the source dir
206
206
  def archive_dir; @options[:archive_dir] || tardir end
207
207
 
208
- # Returns a string that identifies the remote repository uniquely
209
- #
210
- # This is meant for display purposes
211
- def repository_id
212
- url.dup
213
- end
214
-
215
208
  # Creates a new importer which downloads +url+ in +cachedir+ and unpacks it. The following options
216
209
  # are allowed:
217
210
  # [:cachedir] the cache directory. Defaults to "#{Autobuild.prefix}/cache"
@@ -221,6 +214,7 @@ module Autobuild
221
214
  # [:no_subdirectory] the archive does not have the custom archive
222
215
  # subdirectory.
223
216
  def initialize(url, options)
217
+ options = Hash[repository_id: URI.parse(url)].merge(options)
224
218
  super(options)
225
219
  if !@options.has_key?(:update_cached_file)
226
220
  @options[:update_cached_file] = false
@@ -60,7 +60,9 @@ module Autobuild
60
60
  Autobuild.warn " Autobuild.git 'git://gitorious.org/rock/buildconf.git', :branch => 'master'"
61
61
  end
62
62
 
63
- gitopts, common = Kernel.filter_options options, :push_to => nil, :branch => nil, :tag => nil, :commit => nil, :with_submodules => false
63
+ gitopts, common = Kernel.filter_options options,
64
+ :push_to => nil, :branch => nil, :tag => nil, :commit => nil, :with_submodules => false,
65
+ :repository_id => "git:#{@repository}"
64
66
  if gitopts[:branch] && branch
65
67
  raise ConfigException, "git branch specified with both the option hash and the explicit parameter"
66
68
  end
@@ -74,14 +76,7 @@ module Autobuild
74
76
  @tag = tag
75
77
  @commit = commit
76
78
  @remote_name = 'autobuild'
77
- super(common)
78
- end
79
-
80
- # Returns a string that identifies the remote repository uniquely
81
- #
82
- # This is meant for display purposes
83
- def repository_id
84
- "git:#{repository}"
79
+ super(common.merge(repository_id: gitopts[:repository_id]))
85
80
  end
86
81
 
87
82
  # The name of the remote that should be set up by the importer
@@ -18,16 +18,11 @@ module Autobuild
18
18
  def initialize(repository, options = {})
19
19
  @repository = repository.to_str
20
20
 
21
- hgopts, common = Kernel.filter_options options, :branch => 'default'
21
+ hgopts, common = Kernel.filter_options options,
22
+ :branch => 'default',
23
+ :repository_id => "hg:#{repository}"
22
24
  @branch = hgopts[:branch]
23
- super(common)
24
- end
25
-
26
- # Returns a string that identifies the remote repository uniquely
27
- #
28
- # This is meant for display purposes
29
- def repository_id
30
- "hg:#{repository}"
25
+ super(common.merge(repository_id: hgopts[:repository_id]))
31
26
  end
32
27
 
33
28
  # The remote repository URL.
@@ -12,10 +12,11 @@ module Autobuild
12
12
  # to 'svn' and can be configured by doing
13
13
  # Autobuild.programs['svn'] = 'my_svn_tool'
14
14
  def initialize(source, options = {})
15
- svnopts, common = Kernel.filter_options options,
16
- :svnup => [], :svnco => [], :revision => nil
17
15
 
18
16
  @source = [*source].join("/")
17
+ svnopts, common = Kernel.filter_options options,
18
+ :svnup => [], :svnco => [], :revision => nil,
19
+ :repository_id => "svn:#{@source}"
19
20
  @program = Autobuild.tool('svn')
20
21
  @options_up = [*svnopts[:svnup]]
21
22
  @options_co = [*svnopts[:svnco]]
@@ -23,14 +24,7 @@ module Autobuild
23
24
  @options_up << "--revision" << rev
24
25
  @options_co << "--revision" << rev
25
26
  end
26
- super(common)
27
- end
28
-
29
- # Returns a string that identifies the remote repository uniquely
30
- #
31
- # This is meant for display purposes
32
- def repository_id
33
- @source.dup
27
+ super(common.merge(repository_id: svnopts[:repository_id]))
34
28
  end
35
29
 
36
30
  private
@@ -71,8 +71,15 @@ class Importer
71
71
  def initialize(options)
72
72
  @options = options.dup
73
73
  @options[:retry_count] = Integer(@options[:retry_count] || 0)
74
+ @repository_id = options[:repository_id] || "#{self.class.name}:#{object_id}"
74
75
  end
75
76
 
77
+ # Returns a string that identifies the remote repository uniquely
78
+ #
79
+ # This can be used to check whether two importers are pointing to the same
80
+ # repository, regardless of e.g. the access protocol used
81
+ attr_reader :repository_id
82
+
76
83
  # The number of times update / checkout should be retried before giving up.
77
84
  # The default is 0 (do not retry)
78
85
  #
@@ -312,6 +312,10 @@ module Autobuild
312
312
  @@reporters << reporter
313
313
  end
314
314
 
315
+ def self.clear_reporters
316
+ @@reporters.clear
317
+ end
318
+
315
319
  def self.each_reporter(&iter)
316
320
  @@reporters.each(&iter)
317
321
  end
@@ -1,5 +1,5 @@
1
1
  module Autobuild
2
- VERSION = "1.7.12.b1" unless defined? Autobuild::VERSION
2
+ VERSION = "1.7.12.rc1" unless defined? Autobuild::VERSION
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autobuild
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.12.b1
4
+ version: 1.7.12.rc1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-17 00:00:00.000000000 Z
11
+ date: 2014-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake