origen 0.7.35 → 0.7.36

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: 44428e2ccbfc3cd21605f6181962b7962c52f098
4
- data.tar.gz: 021be942ef879236ffb661e579ab8372014530f7
3
+ metadata.gz: 1118662c21d50b42e5f844b07a727e4bdf7aa669
4
+ data.tar.gz: 9e1479f4346e08d9e04495ded26ee4fab9a09de4
5
5
  SHA512:
6
- metadata.gz: 9dd377601afa928bb2ef2a5d1991f730ab373619112c389be8ebd6aefbaac88889a5d50a245a8eb05d2958a459caed54297e28851415ec9e7a4aa8c14f8841bb
7
- data.tar.gz: 375b2f1b4ea20532f1488d4c782b4f61bd3202c2b3a2fa5005c0d93b7a26e744913df7e9c5dcb38a8b88dcd6e7102da879eec454133f9208e9ac2749c358846e
6
+ metadata.gz: dfb87c30e2a997642ef231e6a1c32a9f502d36d54a6ea1be474bbf01b8ad66078c100bf7a925552537bb884fe697208c1e4f7385aa74937d20582897fca41fcd
7
+ data.tar.gz: ea5afacc77fa582f6d8869026d292dc7bbe82bf9fac94d712a576cd43c84e7b7baa9cbcb4487e82316ecc93dd47fb4121ad36042f827338e8d751e609b85172d
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 7
4
- BUGFIX = 35
4
+ BUGFIX = 36
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -54,6 +54,10 @@ module Origen
54
54
  # that are not all of the same type are expanded, e.g. -010s-3S6
55
55
  outstr = ''
56
56
  regex = '^'
57
+ r = reg_or_val.size % 4
58
+ unless r == 0
59
+ regex += '(' + ('.' * r) + ')'
60
+ end
57
61
  (reg_or_val.size / 4).times { regex += '(....)' }
58
62
  regex += '$'
59
63
  Regexp.new(regex) =~ regval
@@ -62,12 +66,15 @@ module Origen
62
66
  (reg_or_val.size / 4).times do |n| # now grouped by nibble
63
67
  nibbles << Regexp.last_match[n + 1]
64
68
  end
69
+ unless r == 0
70
+ nibbles << Regexp.last_match[(reg_or_val.size / 4) + 1]
71
+ end
65
72
 
66
73
  nibbles.each_with_index do |nibble, i|
67
74
  # If contains any special chars...
68
75
  if nibble =~ /[XSV]/
69
76
  # If all the same...
70
- if nibble[0] == nibble[1] && nibble[1] == nibble[2] && nibble[2] == nibble[3]
77
+ if nibble.split('').all? { |c| c == nibble[0] }
71
78
  outstr += nibble[0, 1] # .to_s
72
79
  # Otherwise present this nibble in 'binary' format
73
80
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.35
4
+ version: 0.7.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty