origen 0.60.20 → 0.61.3
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.
- checksums.yaml +4 -4
- data/config/rubocop/easy.yml +1 -1
- data/config/rubocop/strict.yml +18 -22
- data/config/version.rb +2 -2
- data/lib/origen/application/runner.rb +7 -4
- data/lib/origen/application.rb +1 -1
- data/lib/origen/boot/app.rb +2 -3
- data/lib/origen/boot.rb +12 -1
- data/lib/origen/chip_mode.rb +1 -1
- data/lib/origen/chip_package.rb +1 -1
- data/lib/origen/chips/chip.rb +2 -4
- data/lib/origen/chips.rb +2 -3
- data/lib/origen/client.rb +1 -1
- data/lib/origen/code_generators/actions.rb +1 -1
- data/lib/origen/commands/archive.rb +3 -3
- data/lib/origen/commands/extract.rb +1 -1
- data/lib/origen/commands/interactive.rb +2 -14
- data/lib/origen/commands/lint.rb +29 -5
- data/lib/origen/commands/new.rb +1 -1
- data/lib/origen/commands/web.rb +15 -2
- data/lib/origen/core_ext/hash.rb +1 -1
- data/lib/origen/core_ext/integer.rb +2 -2
- data/lib/origen/core_ext/numeric.rb +6 -6
- data/lib/origen/errata.rb +1 -1
- data/lib/origen/generator/compiler.rb +2 -2
- data/lib/origen/limits/limit.rb +1 -1
- data/lib/origen/loader.rb +21 -0
- data/lib/origen/org_file/interceptor.rb +1 -1
- data/lib/origen/parameters.rb +1 -1
- data/lib/origen/pins/pin.rb +2 -2
- data/lib/origen/pins.rb +1 -1
- data/lib/origen/registers/bit.rb +1 -4
- data/lib/origen/registers/bit_collection.rb +1 -4
- data/lib/origen/registers/reg.rb +15 -13
- data/lib/origen/regression_manager.rb +2 -2
- data/lib/origen/remote_manager.rb +1 -1
- data/lib/origen/ruby_version_check.rb +1 -1
- data/lib/origen/site_config/config.rb +1 -4
- data/lib/origen/site_config.rb +1 -4
- data/lib/origen/specs/checkers.rb +1 -1
- data/lib/origen/specs/doc_resource.rb +3 -1
- data/lib/origen/specs.rb +1 -1
- data/lib/origen/utility/csv_data.rb +4 -6
- data/lib/origen/utility/file_diff.rb +1 -1
- data/lib/origen/utility/input_capture.rb +25 -12
- data/lib/origen.rb +56 -0
- data/origen_app_generators/Gemfile.lock +2 -2
- data/origen_app_generators/bin/boot.rb +17 -6
- data/origen_app_generators/config/version.rb +1 -1
- data/origen_app_generators/doc/history +11 -0
- data/origen_app_generators/origen_app_generators.gemspec +7 -13
- data/origen_app_generators/templates/app_generators/application/app/lib/module.rb +1 -1
- data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb +2 -4
- metadata +129 -15
data/lib/origen/loader.rb
CHANGED
|
@@ -282,6 +282,27 @@ module Origen
|
|
|
282
282
|
end
|
|
283
283
|
return nil if @_checking_name == name
|
|
284
284
|
|
|
285
|
+
# Reentrancy guard (also fixes a Ruby 2.6 vs 3.0+ divergence): while the
|
|
286
|
+
# application is still loading, resolving a constant through
|
|
287
|
+
# from_namespace below calls Origen.app -> load_application, which can
|
|
288
|
+
# reentrantly force-load the top-level app while a plugin/library module
|
|
289
|
+
# is only half-composed (e.g. AmdTestHelpers mid-glob, before its trailing
|
|
290
|
+
# `include`s have run). On Ruby 3.0+ those later includes propagate
|
|
291
|
+
# retroactively into the already-including class; on Ruby 2.6 they do not,
|
|
292
|
+
# leaving methods missing. If the constant maps to a file on $LOAD_PATH by
|
|
293
|
+
# standard Ruby naming convention, require it directly so the module
|
|
294
|
+
# finishes composing in-place, with no reentrant app load.
|
|
295
|
+
unless Origen.application_loaded?
|
|
296
|
+
conv = name.split('::').map(&:underscore).join('/') + '.rb'
|
|
297
|
+
if file = $LOAD_PATH.map { |p| File.join(p, conv) }.find { |f| File.exist?(f) }
|
|
298
|
+
require file
|
|
299
|
+
resolved = name.split('::').inject(Object) do |mod, const|
|
|
300
|
+
mod.const_defined?(const, false) ? mod.const_get(const, false) : (break nil)
|
|
301
|
+
end
|
|
302
|
+
return resolved if resolved
|
|
303
|
+
end
|
|
304
|
+
end
|
|
305
|
+
|
|
285
306
|
names = name.split('::')
|
|
286
307
|
namespace = names.shift
|
|
287
308
|
if app = Origen::Application.from_namespace(namespace)
|
data/lib/origen/parameters.rb
CHANGED
data/lib/origen/pins/pin.rb
CHANGED
|
@@ -253,9 +253,9 @@ module Origen
|
|
|
253
253
|
v = configuration[attribute]
|
|
254
254
|
if v
|
|
255
255
|
if v.is_a?(Hash) && default.is_a?(Hash)
|
|
256
|
-
|
|
256
|
+
default.merge(v) # v will overwrite any default values
|
|
257
257
|
else
|
|
258
|
-
|
|
258
|
+
v
|
|
259
259
|
end
|
|
260
260
|
else
|
|
261
261
|
default
|
data/lib/origen/pins.rb
CHANGED
|
@@ -768,7 +768,7 @@ If you meant to define the pin then use the add_pin method instead.
|
|
|
768
768
|
if ids.size == 1 && !ids.first.is_a?(Regexp)
|
|
769
769
|
pins.first
|
|
770
770
|
else
|
|
771
|
-
options[:keep_duplicates]
|
|
771
|
+
pins.uniq! unless options[:keep_duplicates]
|
|
772
772
|
PinCollection.new(self, *pins, options)
|
|
773
773
|
end
|
|
774
774
|
else
|
data/lib/origen/registers/bit.rb
CHANGED
|
@@ -337,14 +337,11 @@ module Origen
|
|
|
337
337
|
self
|
|
338
338
|
end
|
|
339
339
|
|
|
340
|
-
# rubocop:disable Lint/DuplicateMethods
|
|
341
|
-
|
|
342
340
|
# Set the overlay attribute to the supplied value
|
|
343
|
-
def overlay(value)
|
|
341
|
+
def overlay(value) # rubocop:disable Lint/DuplicateMethods -- intentional override of accessor
|
|
344
342
|
@overlay = value
|
|
345
343
|
self
|
|
346
344
|
end
|
|
347
|
-
# rubocop:enable Lint/DuplicateMethods
|
|
348
345
|
|
|
349
346
|
# Returns the overlay attribute
|
|
350
347
|
def overlay_str
|
|
@@ -362,13 +362,10 @@ module Origen
|
|
|
362
362
|
end
|
|
363
363
|
alias_method :reverse_data, :data_reverse
|
|
364
364
|
|
|
365
|
-
# rubocop:disable Lint/DuplicateMethods
|
|
366
|
-
|
|
367
365
|
# Supports reg.bit[0] and bitcollection.bit[0]
|
|
368
|
-
def bit
|
|
366
|
+
def bit # rubocop:disable Lint/DuplicateMethods -- intentional override for collection accessor
|
|
369
367
|
self
|
|
370
368
|
end
|
|
371
|
-
# rubocop:enable Lint/DuplicateMethods
|
|
372
369
|
|
|
373
370
|
# Returns true if the collection contains all bits in the register
|
|
374
371
|
def whole_reg?
|
data/lib/origen/registers/reg.rb
CHANGED
|
@@ -978,13 +978,12 @@ module Origen
|
|
|
978
978
|
alias_method :has_bit, :has_bit?
|
|
979
979
|
alias_method :has_bits, :has_bit?
|
|
980
980
|
|
|
981
|
-
# rubocop:disable Layout/MultilineHashBraceLayout
|
|
982
|
-
|
|
983
981
|
# Add a bit to the register, should only be called internally
|
|
984
982
|
def add_bit(id, position, options = {}) # :nodoc:
|
|
985
|
-
options = {
|
|
986
|
-
|
|
987
|
-
|
|
983
|
+
options = {
|
|
984
|
+
data: @bits[position].data, # If undefined preserve any data/reset value that has
|
|
985
|
+
res: @bits[position].data # already been applied at reg level
|
|
986
|
+
}.merge(options)
|
|
988
987
|
|
|
989
988
|
@lookup[id] = { pos: position, bits: 1, feature: options[:feature] }
|
|
990
989
|
@bits.delete_at(position) # Remove the initial bit from this position
|
|
@@ -999,9 +998,10 @@ module Origen
|
|
|
999
998
|
size.times do |n|
|
|
1000
999
|
default_data |= @bits[position + n].data << n
|
|
1001
1000
|
end
|
|
1002
|
-
options = {
|
|
1003
|
-
|
|
1004
|
-
|
|
1001
|
+
options = {
|
|
1002
|
+
data: default_data, # If undefined preserve any data/reset value that has
|
|
1003
|
+
res: default_data # already been applied at reg level
|
|
1004
|
+
}.merge(options)
|
|
1005
1005
|
|
|
1006
1006
|
@lookup[id] = { pos: position, bits: size }
|
|
1007
1007
|
size.times do |n|
|
|
@@ -1030,9 +1030,10 @@ module Origen
|
|
|
1030
1030
|
size.times do |n|
|
|
1031
1031
|
default_data |= @bits[position + n].data << n
|
|
1032
1032
|
end
|
|
1033
|
-
options = {
|
|
1034
|
-
|
|
1035
|
-
|
|
1033
|
+
options = {
|
|
1034
|
+
data: default_data, # If undefined preserve any data/reset value that has
|
|
1035
|
+
res: default_data # already been applied at reg level
|
|
1036
|
+
}.merge(options)
|
|
1036
1037
|
|
|
1037
1038
|
@lookup[id] = [] if @lookup[id].nil?
|
|
1038
1039
|
@lookup[id] = @lookup[id].push(pos: position, bits: size)
|
|
@@ -1043,10 +1044,11 @@ module Origen
|
|
|
1043
1044
|
@bits.delete_at(position + n)
|
|
1044
1045
|
@bits.insert(position + n, Bit.new(self, position + n, bit_options))
|
|
1045
1046
|
end
|
|
1046
|
-
|
|
1047
|
+
# rubocop:disable Lint/Void, Lint/RedundantCopDisableDirective
|
|
1048
|
+
self
|
|
1049
|
+
# rubocop:enable Lint/Void, Lint/RedundantCopDisableDirective
|
|
1047
1050
|
end
|
|
1048
1051
|
end
|
|
1049
|
-
# rubocop:enable Layout/MultilineHashBraceLayout
|
|
1050
1052
|
|
|
1051
1053
|
# Delete the bits in the collection from the register
|
|
1052
1054
|
def delete_bit(collection)
|
|
@@ -59,7 +59,7 @@ module Origen
|
|
|
59
59
|
Origen.with_origen_root(reference_origen_root) do
|
|
60
60
|
disable_origen_version_check do
|
|
61
61
|
Dir.chdir reference_origen_root do
|
|
62
|
-
|
|
62
|
+
_origen_with_bundler_clean_env do
|
|
63
63
|
# Origen 0.40.0 started using origen-owned binstubs
|
|
64
64
|
system 'rm -rf lbin' if Gem::Version.new(Origen.version) < Gem::Version.new('0.40.0')
|
|
65
65
|
# If regression is run using a service account, we need to setup the path/bundler manually
|
|
@@ -151,7 +151,7 @@ module Origen
|
|
|
151
151
|
Origen.lsf.build_log(options)
|
|
152
152
|
Origen.log.flush
|
|
153
153
|
Dir.chdir reference_origen_root do
|
|
154
|
-
|
|
154
|
+
_origen_with_bundler_clean_env do
|
|
155
155
|
if options[:log_file]
|
|
156
156
|
system "bundle exec origen save all -f log/#{options[:log_file]}.txt"
|
|
157
157
|
else
|
|
@@ -270,7 +270,7 @@ module Origen
|
|
|
270
270
|
end
|
|
271
271
|
|
|
272
272
|
def top_level_remotes
|
|
273
|
-
Origen.app.config.remotes
|
|
273
|
+
Origen.app.config.remotes # + Origen.app.config.remotes_dev (there are no core remotes at this time)
|
|
274
274
|
end
|
|
275
275
|
|
|
276
276
|
def remotes
|
|
@@ -121,11 +121,10 @@ module Origen
|
|
|
121
121
|
# After the initial load, any centralized site configs will be retreived (if needed), cached, and loaded.
|
|
122
122
|
def load
|
|
123
123
|
def read_erb(erb)
|
|
124
|
-
ERB.new(File.read(erb),
|
|
124
|
+
ERB.new(File.read(erb), trim_mode: '%<>')
|
|
125
125
|
end
|
|
126
126
|
|
|
127
127
|
# YAML.safe_load is prefered
|
|
128
|
-
# rubocop:disable Security/YAMLLoad
|
|
129
128
|
if centralized?
|
|
130
129
|
if !cached?
|
|
131
130
|
if fetch
|
|
@@ -148,8 +147,6 @@ module Origen
|
|
|
148
147
|
@values = (YAML.load_file(path) || {})
|
|
149
148
|
end
|
|
150
149
|
end
|
|
151
|
-
# rubocop:enable Security/YAMLLoad
|
|
152
|
-
|
|
153
150
|
unless @values.is_a?(Hash)
|
|
154
151
|
puts red("Origen: Site Config: The config at #{path} was not parsed as a Hash, but as a #{@values.class}")
|
|
155
152
|
puts red(' Please review the format of the this file.')
|
data/lib/origen/site_config.rb
CHANGED
|
@@ -243,14 +243,11 @@ module Origen
|
|
|
243
243
|
ENV.key?(val)
|
|
244
244
|
end
|
|
245
245
|
|
|
246
|
-
# rubocop:disable Lint/DuplicateMethods
|
|
247
|
-
|
|
248
|
-
def env(val)
|
|
246
|
+
def env(val) # rubocop:disable Lint/DuplicateMethods -- intentional override with environment lookup
|
|
249
247
|
if env_contains?(val)
|
|
250
248
|
ENV[val]
|
|
251
249
|
end
|
|
252
250
|
end
|
|
253
|
-
# rubocop:enable Lint/DuplicateMethods
|
|
254
251
|
|
|
255
252
|
def inspect_variable(*vars)
|
|
256
253
|
vars.each do |var|
|
|
@@ -131,7 +131,7 @@ module Origen
|
|
|
131
131
|
# which would not work with the code above but should eval to a number 3.35
|
|
132
132
|
begin
|
|
133
133
|
result = eval(limit)
|
|
134
|
-
|
|
134
|
+
result.round(4) if result.is_a? Numeric
|
|
135
135
|
rescue ::SyntaxError, ::NameError, ::TypeError
|
|
136
136
|
Origen.log.debug "Limit '#{limit}' had to be rescued, storing it as a #{limit.class}"
|
|
137
137
|
if limit.is_a? Symbol
|
|
@@ -61,9 +61,11 @@ module Origen
|
|
|
61
61
|
tmp['sub_type'] = @sub_type unless @sub_type.nil?
|
|
62
62
|
tmp['audience'] = @audience unless @audience.nil?
|
|
63
63
|
doc_resource_ml = Nokogiri::XML::Builder.new do |xml|
|
|
64
|
+
# rubocop:disable Lint/Void, Lint/RedundantCopDisableDirective
|
|
64
65
|
xml.doc_resource(tmp.each do |t, d|
|
|
65
|
-
"#{t}=\"#{d}\""
|
|
66
|
+
"#{t}=\"#{d}\""
|
|
66
67
|
end) do
|
|
68
|
+
# rubocop:enable Lint/Void, Lint/RedundantCopDisableDirective
|
|
67
69
|
unless @table_title.nil? && @note_refs.size == 0 && @exhibit_refs.size == 0
|
|
68
70
|
unless @note_refs.first.to_s.size == 0
|
|
69
71
|
unless @exhibit_refs.first.to_s.size == 0
|
data/lib/origen/specs.rb
CHANGED
|
@@ -660,7 +660,7 @@ module Origen
|
|
|
660
660
|
filtered_hash = {}
|
|
661
661
|
select_logic = case filter
|
|
662
662
|
when String then 'k.nil? ? false : k[Regexp.new(filter)] && k.length == filter.length'
|
|
663
|
-
when (
|
|
663
|
+
when (Integer || Float || Numeric) then "k[Regexp.new('#{filter}')]"
|
|
664
664
|
when Regexp then 'k[filter]'
|
|
665
665
|
when Symbol then
|
|
666
666
|
'k == filter'
|
|
@@ -69,12 +69,10 @@ module Origen
|
|
|
69
69
|
|
|
70
70
|
# Returns an array containing all data from given CSV file
|
|
71
71
|
def extract_csv_data(options = {}) # :nodoc:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
# rubocop:enable Layout/MultilineHashBraceLayout
|
|
77
|
-
|
|
72
|
+
options = {
|
|
73
|
+
field_names_only: false, # whether to obtain field names only
|
|
74
|
+
comment_char: '#' # ignore lines that start with comment character
|
|
75
|
+
}.merge(options)
|
|
78
76
|
field_names = []
|
|
79
77
|
field_values = []
|
|
80
78
|
result = []
|
|
@@ -100,7 +100,7 @@ module Origen
|
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
def process!
|
|
103
|
-
while
|
|
103
|
+
while source.pointer < source.size && target.pointer < target.size
|
|
104
104
|
matched = source.find_current_line_in(target)
|
|
105
105
|
if matched
|
|
106
106
|
if matched > target.pointer
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
# readline was extracted from the stdlib in Ruby 4.0 and is not always present.
|
|
2
|
+
# It is only needed for interactive prompts (get_text/confirm), never during
|
|
3
|
+
# spec/example generation, so degrade gracefully if it can't be loaded.
|
|
4
|
+
begin
|
|
5
|
+
require 'readline'
|
|
6
|
+
rescue LoadError
|
|
7
|
+
nil
|
|
8
|
+
end
|
|
2
9
|
module Origen
|
|
3
10
|
module Utility
|
|
4
11
|
module InputCapture
|
|
5
12
|
# Gets text input from the user
|
|
6
13
|
# Supply an optional default value in the event that the user enters nothing
|
|
7
14
|
def get_text(options = {})
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
options = {
|
|
16
|
+
default: false,
|
|
17
|
+
single: false, # Set if only a single line entry is expected
|
|
18
|
+
confirm: false,
|
|
19
|
+
accept: false, # Supply and array of entries you are willing to accept
|
|
20
|
+
case_sensitive: false, # If accept values are supplied they will be treated as case
|
|
21
|
+
# in-sensitive by default
|
|
22
|
+
wrap: true # Automatically split long lines
|
|
16
23
|
}.merge(options)
|
|
17
|
-
# rubocop:enable Layout/MultilineHashBraceLayout
|
|
18
24
|
if options[:confirm]
|
|
19
25
|
puts "Type 'yes' or 'no' to confirm or 'quit' to abort."
|
|
20
26
|
elsif options[:accept]
|
|
21
27
|
puts "You can enter: #{options[:accept].map { |v| "'#{v}'" }.join(', ')} or 'quit' to abort."
|
|
22
|
-
|
|
28
|
+
# "
|
|
23
29
|
else
|
|
24
30
|
puts options[:single] ? "Enter 'quit' to abort." : "Enter a single '.' to finish, or 'quit' to abort."
|
|
25
31
|
end
|
|
@@ -33,7 +39,14 @@ module Origen
|
|
|
33
39
|
end
|
|
34
40
|
|
|
35
41
|
while line != '.'
|
|
36
|
-
|
|
42
|
+
# readline was extracted from the stdlib in Ruby 4.0 and may not be
|
|
43
|
+
# installed. Fall back to plain $stdin input when it is unavailable so
|
|
44
|
+
# interactive prompts still work (e.g. `origen rc tag`).
|
|
45
|
+
orig_line = if defined?(Readline)
|
|
46
|
+
Readline.readline('', false).to_s.chomp.rstrip
|
|
47
|
+
else
|
|
48
|
+
($stdin.gets || "quit\n").chomp.rstrip
|
|
49
|
+
end
|
|
37
50
|
line = orig_line.strip
|
|
38
51
|
if (line.empty? || line == '.') && text.empty? && options[:default]
|
|
39
52
|
text = options[:default].to_s
|
data/lib/origen.rb
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
# This guard is temporary to help Freescale transition to Origen from
|
|
2
2
|
# our original internal version (RGen)
|
|
3
3
|
unless defined? RGen::ORIGENTRANSITION
|
|
4
|
+
# ActiveSupport 4.2 wraps to_json via alias_method_chain, which causes infinite
|
|
5
|
+
# recursion on Ruby 4 with json gem 2.x (to_json_without_active_support_encoder
|
|
6
|
+
# ends up calling back into to_json_with_active_support_encoder). Intercept the
|
|
7
|
+
# alias for the :to_json target before ActiveSupport's json core_ext loads.
|
|
8
|
+
if RUBY_VERSION >= '4'
|
|
9
|
+
require 'json'
|
|
10
|
+
require 'active_support/core_ext/module/aliasing'
|
|
11
|
+
|
|
12
|
+
class ::Module
|
|
13
|
+
alias_method :_original_alias_method_chain, :alias_method_chain
|
|
14
|
+
def alias_method_chain(target, feature, &block)
|
|
15
|
+
return if target == :to_json
|
|
16
|
+
|
|
17
|
+
_original_alias_method_chain(target, feature, &block)
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# BigDecimal.new was removed in bigdecimal 3.x (Ruby 4 ships >= 3.1). But
|
|
22
|
+
# ActiveSupport 4.2 (pinned via origen.gemspec) calls BigDecimal.new at require
|
|
23
|
+
# time (active_support/core_ext/object/duplicable.rb). Restore it so any modern
|
|
24
|
+
# bigdecimal can be used instead of force-pinning the ancient 1.3.5. This runs
|
|
25
|
+
# before ActiveSupport's core_ext loads (boot.rb requires 'origen' before the
|
|
26
|
+
# later Bundler.require that pulls ActiveSupport in via the app's gems).
|
|
27
|
+
require 'bigdecimal'
|
|
28
|
+
unless BigDecimal.respond_to?(:new)
|
|
29
|
+
class ::BigDecimal
|
|
30
|
+
def self.new(*args, **kwargs)
|
|
31
|
+
BigDecimal(*args, **kwargs)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# ERB.new dropped its positional (safe_level, trim_mode, eoutvar) arguments in
|
|
37
|
+
# Ruby 3.4/4.0 in favour of keyword arguments. Dependencies pinned for
|
|
38
|
+
# ActiveSupport 4.2 compatibility (e.g. nanoc 3.7's ERB filter) still call the
|
|
39
|
+
# old positional form ERB.new(str, safe_level, trim_mode). Translate those calls
|
|
40
|
+
# to the keyword form so the bundled doc tooling keeps working on Ruby 4.
|
|
41
|
+
require 'erb'
|
|
42
|
+
class ::ERB
|
|
43
|
+
class << self
|
|
44
|
+
alias_method :_origen_original_new, :new
|
|
45
|
+
def new(str, *args, **kwargs)
|
|
46
|
+
unless args.empty?
|
|
47
|
+
# Legacy positional signature: (str, safe_level, trim_mode, eoutvar).
|
|
48
|
+
# safe_level was removed entirely, so it is dropped.
|
|
49
|
+
_safe_level, trim_mode, eoutvar = args
|
|
50
|
+
kwargs[:trim_mode] ||= trim_mode unless trim_mode.nil?
|
|
51
|
+
kwargs[:eoutvar] ||= eoutvar unless eoutvar.nil?
|
|
52
|
+
end
|
|
53
|
+
_origen_original_new(str, **kwargs)
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
4
59
|
require 'English'
|
|
5
60
|
require 'pathname'
|
|
6
61
|
require 'pry'
|
|
@@ -31,6 +86,7 @@ unless defined? RGen::ORIGENTRANSITION
|
|
|
31
86
|
require 'bundler'
|
|
32
87
|
require 'origen/undefined'
|
|
33
88
|
require 'origen/componentable'
|
|
89
|
+
require 'base64'
|
|
34
90
|
|
|
35
91
|
autoload :PatSeq, 'origen/generator/pattern_sequencer'
|
|
36
92
|
|
|
@@ -12,12 +12,18 @@ $LOAD_PATH.unshift ARGV.shift
|
|
|
12
12
|
require 'fileutils'
|
|
13
13
|
require 'origen'
|
|
14
14
|
|
|
15
|
+
# Resolve temp build dir with precedence:
|
|
16
|
+
# 1. ORIGEN_APP_GEN_TMP_DIR env var (highest, linux-like override)
|
|
17
|
+
# 2. site_config :app_gen_tmp_dir
|
|
18
|
+
# 3. hardcoded platform default (legacy behavior)
|
|
15
19
|
# Prevent the bundle from loading by running this outside of the
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
default_tmp = Origen.os.windows? ? 'C:/tmp/my_app_generators/new_app'
|
|
21
|
+
: '/tmp/my_app_generators/new_app'
|
|
22
|
+
|
|
23
|
+
tmp_dir = ENV['ORIGEN_APP_GEN_TMP_DIR'] ||
|
|
24
|
+
(Origen.site_config.respond_to?(:app_gen_tmp_dir) && Origen.site_config.app_gen_tmp_dir) ||
|
|
25
|
+
default_tmp
|
|
26
|
+
|
|
21
27
|
FileUtils.rm_rf tmp_dir if File.exist?(tmp_dir)
|
|
22
28
|
FileUtils.mkdir_p tmp_dir
|
|
23
29
|
|
|
@@ -33,7 +39,12 @@ begin
|
|
|
33
39
|
OrigenAppGenerators.invoke('my_app')
|
|
34
40
|
end
|
|
35
41
|
ensure
|
|
36
|
-
|
|
42
|
+
src = "#{tmp_dir}/my_app"
|
|
43
|
+
if File.exist?(src)
|
|
44
|
+
FileUtils.mkdir_p('output')
|
|
45
|
+
FileUtils.cp_r(src, 'output') # cross-device safe
|
|
46
|
+
FileUtils.rm_rf(src)
|
|
47
|
+
end
|
|
37
48
|
puts
|
|
38
49
|
puts "Ignore the above, your new app is in: output/my_app"
|
|
39
50
|
end
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
<a class="anchor release_tag" name="v2_2_1"></a>
|
|
2
|
+
<h1><a href="#v2_2_1">Tag: v2.2.1</a></h1>
|
|
3
|
+
|
|
4
|
+
##### Branch: 'master'
|
|
5
|
+
|
|
6
|
+
##### by James Creamer on 11-Jun-2026 15:21PM
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Make the move NFS mount safe if the output folder is on a different mount from the app
|
|
10
|
+
generator
|
|
11
|
+
|
|
1
12
|
<a class="anchor release_tag" name="v2_2_0"></a>
|
|
2
13
|
<h1><a href="#v2_2_0">Tag: v2.2.0</a></h1>
|
|
3
14
|
|
|
@@ -1,31 +1,25 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: origen_app_generators 2.2.
|
|
2
|
+
# stub: origen_app_generators 2.2.1 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "origen_app_generators".freeze
|
|
6
|
-
s.version = "2.2.
|
|
6
|
+
s.version = "2.2.1".freeze
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.8.11".freeze) if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.require_paths = ["lib".freeze]
|
|
10
10
|
s.authors = ["Stephen McGinty".freeze]
|
|
11
|
-
s.date = "
|
|
11
|
+
s.date = "1980-01-02"
|
|
12
12
|
s.email = ["stephen.f.mcginty@gmail.com".freeze]
|
|
13
13
|
s.files = ["bin/boot.rb".freeze, "config/application.rb".freeze, "config/boot.rb".freeze, "config/commands.rb".freeze, "config/shared_commands.rb".freeze, "config/version.rb".freeze, "lib/origen_app_generators.rb".freeze, "lib/origen_app_generators/application.rb".freeze, "lib/origen_app_generators/base.rb".freeze, "lib/origen_app_generators/empty_application.rb".freeze, "lib/origen_app_generators/empty_plugin.rb".freeze, "lib/origen_app_generators/new.rb".freeze, "lib/origen_app_generators/new_app_tests.rb".freeze, "lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb".freeze, "lib/origen_app_generators/plugin.rb".freeze, "lib/origen_app_generators/test_engineering/common.rb".freeze, "lib/origen_app_generators/test_engineering/stand_alone_application.rb".freeze, "lib/origen_app_generators/test_engineering/test_block.rb".freeze, "templates/app_generators".freeze, "templates/app_generators/application".freeze, "templates/app_generators/application/.gitignore".freeze, "templates/app_generators/application/.irbrc".freeze, "templates/app_generators/application/.rspec".freeze, "templates/app_generators/application/.travis.yml".freeze, "templates/app_generators/application/Gemfile".freeze, "templates/app_generators/application/Rakefile".freeze, "templates/app_generators/application/app".freeze, "templates/app_generators/application/app/blocks".freeze, "templates/app_generators/application/app/blocks/top_level.rb".freeze, "templates/app_generators/application/app/lib".freeze, "templates/app_generators/application/app/lib/module.rb".freeze, "templates/app_generators/application/app/templates".freeze, "templates/app_generators/application/app/templates/web".freeze, "templates/app_generators/application/app/templates/web/index.md.erb".freeze, "templates/app_generators/application/app/templates/web/layouts".freeze, "templates/app_generators/application/app/templates/web/layouts/_basic.html.erb".freeze, "templates/app_generators/application/app/templates/web/partials".freeze, "templates/app_generators/application/app/templates/web/partials/_navbar.html.erb".freeze, "templates/app_generators/application/app/templates/web/release_notes.md.erb".freeze, "templates/app_generators/application/config".freeze, "templates/app_generators/application/config/application.rb".freeze, "templates/app_generators/application/config/boot.rb".freeze, "templates/app_generators/application/config/commands.rb".freeze, "templates/app_generators/application/config/maillist_dev.txt".freeze, "templates/app_generators/application/config/maillist_prod.txt".freeze, "templates/app_generators/application/config/version.rb".freeze, "templates/app_generators/application/doc".freeze, "templates/app_generators/application/doc/history".freeze, "templates/app_generators/application/dot_keep".freeze, "templates/app_generators/application/origen_core_session".freeze, "templates/app_generators/application/spec".freeze, "templates/app_generators/application/spec/spec_helper.rb".freeze, "templates/app_generators/application/target".freeze, "templates/app_generators/application/target/debug.rb".freeze, "templates/app_generators/application/target/default.rb".freeze, "templates/app_generators/application/target/production.rb".freeze, "templates/app_generators/new".freeze, "templates/app_generators/new/generator.rb".freeze, "templates/app_generators/new/info.md.erb".freeze, "templates/app_generators/origen_infrastructure".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb".freeze, "templates/app_generators/plugin".freeze, "templates/app_generators/plugin/Gemfile".freeze, "templates/app_generators/plugin/Rakefile".freeze, "templates/app_generators/plugin/app".freeze, "templates/app_generators/plugin/app/templates".freeze, "templates/app_generators/plugin/app/templates/web".freeze, "templates/app_generators/plugin/app/templates/web/index.md.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb".freeze, "templates/app_generators/plugin/config".freeze, "templates/app_generators/plugin/config/boot.rb".freeze, "templates/app_generators/plugin/gemspec.rb".freeze, "templates/app_generators/test_engineering".freeze, "templates/app_generators/test_engineering/environment".freeze, "templates/app_generators/test_engineering/environment/j750.rb".freeze, "templates/app_generators/test_engineering/environment/uflex.rb".freeze, "templates/app_generators/test_engineering/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application".freeze, "templates/app_generators/test_engineering/stand_alone_application/.keep".freeze, "templates/app_generators/test_engineering/test_block".freeze, "templates/app_generators/test_engineering/test_block/.keep".freeze]
|
|
14
14
|
s.homepage = "http://origen-sdk.org/origen_app_generators".freeze
|
|
15
15
|
s.licenses = ["MIT".freeze]
|
|
16
16
|
s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze)
|
|
17
|
-
s.rubygems_version = "
|
|
17
|
+
s.rubygems_version = "4.0.3".freeze
|
|
18
18
|
s.summary = "Origen application generators".freeze
|
|
19
19
|
|
|
20
|
-
s.installed_by_version = "
|
|
20
|
+
s.installed_by_version = "4.0.3".freeze
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
s.specification_version = 4
|
|
24
|
-
end
|
|
22
|
+
s.specification_version = 4
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
s.add_runtime_dependency(%q<origen>.freeze, [">= 0.40.2"])
|
|
28
|
-
else
|
|
29
|
-
s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
|
|
30
|
-
end
|
|
24
|
+
s.add_runtime_dependency(%q<origen>.freeze, [">= 0.40.2".freeze])
|
|
31
25
|
end
|
|
@@ -15,14 +15,12 @@ module <%= @namespace %>
|
|
|
15
15
|
# array.
|
|
16
16
|
#
|
|
17
17
|
# You can also execute all sets of test inputs by running: 'origen app_gen:test -r'
|
|
18
|
-
TEST_INPUTS = [
|
|
19
|
-
] # END_OF_TEST_INPUTS Don't remove this comment, it is used by the app_gen:new command!
|
|
18
|
+
TEST_INPUTS = [] # END_OF_TEST_INPUTS Don't remove this comment, it is used by the app_gen:new command!
|
|
20
19
|
|
|
21
20
|
# As you add new generators to this app they will be entered here, this enables the
|
|
22
21
|
# mechanism to register them with the 'origen new' command.
|
|
23
22
|
# You should generally not modify this by hand, instead use the 'origen app_gen:new'
|
|
24
23
|
# command every time you want to create a new generator, and this will be filled in
|
|
25
24
|
# for you.
|
|
26
|
-
AVAILABLE = {
|
|
27
|
-
}
|
|
25
|
+
AVAILABLE = {}
|
|
28
26
|
end
|