origen 0.7.28 → 0.7.29

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: 75d5d9aaf90f96ddc002948b9de5093f25c0e242
4
- data.tar.gz: 25129581da1a3cfdd2d90f19eb99329e2a565219
3
+ metadata.gz: 82e6c45883ec5797c6a69d7af5cbf81a7f0abd30
4
+ data.tar.gz: 2e339ab8e5ffdac4e51876008844425f34aba46b
5
5
  SHA512:
6
- metadata.gz: 99667abb0f3589396192c82d68c6737ba567924a3cc71c2b49db0371fc0e18c0cd3a89fc8530e58d3fe1c5711e2b50297ce772d65fa850ff94332cd4e2128b9b
7
- data.tar.gz: 0e7d3b9ff878aacdd2fd7643f3dad9a9382b6a69cea505ecf51b2fccfc62fa4b2144c83acf33389b183b48594a6f94513134e4afba83a516fc8c5ab6a0513563
6
+ metadata.gz: 0c4c01e0b963d8a12816078b9827f6daf6897f0f9cba016e61e8863f698dfaf44d8d539c151b086670f87b17af873253cf7760012155a686d862264ca2586e57
7
+ data.tar.gz: b8624abcb510d26731f4e5c9e1ab03b72b85f733cd54f261b0ed695a42647f6de1f5ebe9bcbae0fc7cb15a5e9c7f77895f70b448279a594739dfb9ffcbd63cdc
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 7
4
- BUGFIX = 28
4
+ BUGFIX = 29
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -119,10 +119,11 @@ module Origen
119
119
  )
120
120
  elsif config.rc_url =~ /git/
121
121
  @revision_controller ||= RevisionControl::Git.new(
122
- local: root,
122
+ local: root,
123
123
  # If a workspace is based on a fork of the master repo, config.rc_url may not
124
124
  # be correct
125
- remote: (options[:uninitialized] ? config.rc_url : (RevisionControl::Git.origin || config.rc_url))
125
+ remote: (options[:uninitialized] ? config.rc_url : (RevisionControl::Git.origin || config.rc_url)),
126
+ allow_local_adjustment: true
126
127
  )
127
128
 
128
129
  end
@@ -27,7 +27,7 @@ module Origen
27
27
  end
28
28
  @remote = Pathname.new(options[:remote])
29
29
  @local = Pathname.new(options[:local]).expand_path
30
- initialize_local_dir
30
+ initialize_local_dir(options)
31
31
  end
32
32
 
33
33
  # Build the local workspace for the first time.
@@ -249,7 +249,7 @@ module Origen
249
249
  end
250
250
  end
251
251
 
252
- def initialize_local_dir
252
+ def initialize_local_dir(options = {})
253
253
  FileUtils.mkdir_p(local.to_s) unless local.exist?
254
254
  end
255
255
  end
@@ -285,7 +285,7 @@ module Origen
285
285
  end
286
286
  end
287
287
 
288
- def initialize_local_dir
288
+ def initialize_local_dir(options = {})
289
289
  super
290
290
  unless initialized?
291
291
  Origen.log.debug "Initializing DSSC workspace at #{local}"
@@ -244,7 +244,22 @@ module Origen
244
244
  end
245
245
  end
246
246
 
247
- def initialized?
247
+ def initialized?(options = {})
248
+ @hierarchy_searched ||= begin
249
+ path = @local.dup
250
+ until path.root? || File.exist?("#{local}/.git")
251
+ if File.exist?("#{path}/.git")
252
+ if options[:allow_local_adjustment]
253
+ @local = path
254
+ else
255
+ fail "Requested local repository #{local} is within existing local repository #{path}"
256
+ end
257
+ else
258
+ path = path.parent
259
+ end
260
+ end
261
+ true
262
+ end
248
263
  File.exist?("#{local}/.git") &&
249
264
  git('remote -v', verbose: false).any? { |r| r =~ /#{remote_without_protocol_and_user}/ || r =~ /#{remote_without_protocol_and_user.to_s.gsub(':', "\/")}/ } &&
250
265
  !git('status', verbose: false).any? { |l| l =~ /^#? ?Initial commit$/ }
@@ -309,9 +324,9 @@ module Origen
309
324
  !(git('status --verbose', verbose: false).last =~ /^(no changes|nothing to commit|nothing added to commit but untracked files present)/)
310
325
  end
311
326
 
312
- def initialize_local_dir
327
+ def initialize_local_dir(options = {})
313
328
  super
314
- unless initialized?
329
+ unless initialized?(options)
315
330
  Origen.log.debug "Initializing Git workspace at #{local}"
316
331
  git 'init'
317
332
  git 'remote remove origin', verbose: false, check_errors: false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.28
4
+ version: 0.7.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-24 00:00:00.000000000 Z
11
+ date: 2016-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport