origen 0.7.37 → 0.7.38

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: 2b4c41a7e948c18b50b0152e4d9a8282e78e4f81
4
- data.tar.gz: 5ec4a78d31f5710389eee3d3802ed40af095154c
3
+ metadata.gz: 698f640c1821d9c64393653ea14b0477706608d0
4
+ data.tar.gz: b59403ab2bfe3bd50f351a734320a1f36535d1cc
5
5
  SHA512:
6
- metadata.gz: b866b7e53ffeb9933795a15586746a5ea51f5c044a780accb391bff10963acec7c8836ffddf447aade0f5ecffdde18b78a3b900349fde1895a2398c845e03566
7
- data.tar.gz: c676db445de768fa69a52a0e81dcc296c591580f7f1b651d29beb081f424b482c11a6650ba2873805679807a739057785c9cbba6a28e1d0b261166aaf3d4e025
6
+ metadata.gz: 3193f6f86078929b6935d6c7f911c09687eed2c84e6516ef7f71256d9ac150c8033dc0443664d4a4660a60b4e7c93cc157f3866c1e5ca870524c6f87c75e58cb
7
+ data.tar.gz: d0e909f1061520ccaab14b1bc7722bb03613e3a75977ec035694c3cdb01aa22506ae7105963b81cb1d6c8d6aaf8a6d2380286b3cb8a74be62d3d9bbfa0cc46a0
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 7
4
- BUGFIX = 37
4
+ BUGFIX = 38
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
data/lib/origen/specs.rb CHANGED
@@ -174,12 +174,12 @@ module Origen
174
174
  @_doc_resources[mode][type][sub_type][audience] = Doc_Resource.new(selector, table_title, text, options)
175
175
  end
176
176
 
177
- def version_history(date, author, changes)
177
+ def version_history(date, author, changes, label = nil, mark_external_internal = nil)
178
178
  # Welguisz: No idea why this is here, but keeping it here because it follows other blocks
179
179
  _version_history
180
180
  # Create a new Version History and place it in the version history 2-D Hash
181
- tmp_ver_history = Version_History.new(date, author, changes)
182
- @_version_history[date][author] = tmp_ver_history
181
+ tmp_ver_history = Version_History.new(date, author, changes, label, mark_external_internal)
182
+ @_version_history[date][author][label] = tmp_ver_history
183
183
  end
184
184
 
185
185
  def override(block_options = {}, find_spec = {}, values = {}, options = {})
@@ -463,6 +463,33 @@ module Origen
463
463
  end
464
464
  end
465
465
 
466
+ def version_histories(options = {})
467
+ options = {
468
+ date: nil,
469
+ author: nil,
470
+ label: nil
471
+ }.update(options)
472
+ vh_found = Hash.new do |h, k|
473
+ h[k] = Hash.new do |hh, kk|
474
+ hh[kk] = {}
475
+ end
476
+ end
477
+ return nil if @_version_history.nil?
478
+ return nil if @_version_history.empty?
479
+ filter_hash(@_version_history, options[:date]).each do |date, hash|
480
+ filter_hash(hash, options[:author]).each do |author, hash1|
481
+ filter_hash(hash1, options[:label]).each do |label, ver|
482
+ vh_found[date][author][label] = ver
483
+ end
484
+ end
485
+ end
486
+ if vh_found.empty?
487
+ return nil
488
+ else
489
+ return vh_found
490
+ end
491
+ end
492
+
466
493
  def versions
467
494
  @_version_history
468
495
  end
@@ -604,7 +631,9 @@ module Origen
604
631
 
605
632
  def _version_history
606
633
  @_version_history ||= Hash.new do |h, k|
607
- h[k] = {}
634
+ h[k] = Hash.new do |hh, kk|
635
+ hh[kk] = {}
636
+ end
608
637
  end
609
638
  end
610
639
 
@@ -2,12 +2,14 @@ module Origen
2
2
  module Specs
3
3
  # This class is used to store spec exhibit information used to document IP
4
4
  class Version_History
5
- attr_accessor :date, :author, :changes
5
+ attr_accessor :label, :date, :author, :changes, :external_changes_internal
6
6
 
7
- def initialize(date, author, changes)
7
+ def initialize(date, author, changes, label = nil, external_changes_internal = nil)
8
8
  @date = date
9
9
  @author = author
10
10
  @changes = changes
11
+ @label = label
12
+ @external_changes_internal = external_changes_internal
11
13
  end
12
14
  end # class Version History
13
15
  end # module Specs
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.37
4
+ version: 0.7.38
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-10-28 00:00:00.000000000 Z
11
+ date: 2016-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport