origen 0.7.13 → 0.7.14
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/bin/origen +14 -7
- data/config/version.rb +1 -1
- data/helpers/url.rb +21 -11
- data/lib/origen/application/configuration.rb +8 -2
- data/lib/origen/commands/new.rb +2 -2
- data/lib/origen/commands/web.rb +5 -1
- data/lib/origen/generator/flow.rb +5 -0
- data/lib/origen/generator/job.rb +16 -2
- data/lib/origen/generator/pattern.rb +5 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40391053371e047fa27346b149db5b2ff484918a
|
4
|
+
data.tar.gz: 3f50782d9a9a343ed66b4a7394617f17abf0142e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 346f223195d1f35d701b68939c50d4af4f83e2860bc3f831a06e34f9b4c1eb1f22b5ac4b67c9fbcad545e97557c985716a5c0e8314914824bd7d64026d4184ae
|
7
|
+
data.tar.gz: 25dac8be070f239281329c89a6b45ac480ca2105513c82b71fa7be66ad6f5961441e4f2da3ca7f5285544af9326e66623e57d00e2b5009743599c5eec0229746
|
data/bin/origen
CHANGED
@@ -238,25 +238,32 @@ begin
|
|
238
238
|
rescue Exception => e
|
239
239
|
unless e.is_a?(SystemExit) && e.status == 0
|
240
240
|
puts
|
241
|
-
puts e.message unless e.is_a?(SystemExit)
|
242
241
|
if Origen.app_loaded?
|
242
|
+
puts "COMPLETE CALL STACK"
|
243
|
+
puts "-------------------"
|
244
|
+
puts e.message unless e.is_a?(SystemExit)
|
245
|
+
puts e.backtrace
|
246
|
+
|
247
|
+
puts
|
248
|
+
puts "APPLICATION CALL STACK"
|
249
|
+
puts "----------------------"
|
250
|
+
puts e.message unless e.is_a?(SystemExit)
|
243
251
|
# Only print out the application stack trace by default, if verbose logging is
|
244
252
|
# enabled then output the full thing
|
245
253
|
e.backtrace.each do |line|
|
246
254
|
path = Pathname.new(line)
|
247
255
|
if path.absolute?
|
248
|
-
if
|
256
|
+
if line =~ /^#{Origen.root}/ && line !~ /^#{Origen.root}\/lbin/
|
249
257
|
puts line
|
250
258
|
end
|
251
259
|
else
|
252
|
-
|
253
|
-
puts line
|
254
|
-
else
|
255
|
-
puts line unless line =~ /^.\/lbin/
|
256
|
-
end
|
260
|
+
puts line unless line =~ /^.\/lbin/
|
257
261
|
end
|
258
262
|
end
|
259
263
|
else
|
264
|
+
puts "COMPLETE CALL STACK"
|
265
|
+
puts "-------------------"
|
266
|
+
puts e.message unless e.is_a?(SystemExit)
|
260
267
|
puts e.backtrace
|
261
268
|
end
|
262
269
|
exit 1
|
data/config/version.rb
CHANGED
data/helpers/url.rb
CHANGED
@@ -4,6 +4,22 @@ module Origen
|
|
4
4
|
# Helper methods that are available to all templates
|
5
5
|
module Helpers
|
6
6
|
|
7
|
+
def self.archive_name=(val)
|
8
|
+
@archive_name = val
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.archive_name
|
12
|
+
@archive_name
|
13
|
+
end
|
14
|
+
|
15
|
+
def generate_hard_links?
|
16
|
+
!!archive_name
|
17
|
+
end
|
18
|
+
|
19
|
+
def archive_name
|
20
|
+
Origen::Generator::Compiler::Helpers.archive_name
|
21
|
+
end
|
22
|
+
|
7
23
|
def current_path
|
8
24
|
path(options[:top_level_file].to_s.sub(/^.*\/templates\/web/, '').sub(/\..*$/, ''))
|
9
25
|
end
|
@@ -15,7 +31,7 @@ module Origen
|
|
15
31
|
# Like current_url except always returns the latest version of the url and
|
16
32
|
# not one with an embedded production version
|
17
33
|
def current_latest_url
|
18
|
-
current_url.sub(
|
34
|
+
current_url.sub(_archive, 'latest')
|
19
35
|
end
|
20
36
|
|
21
37
|
def path(p)
|
@@ -27,7 +43,7 @@ module Origen
|
|
27
43
|
elsif Origen.app.deployer.deploy_to_git?
|
28
44
|
"#{root_path}#{p}"
|
29
45
|
else
|
30
|
-
"#{root_path}/#{
|
46
|
+
"#{root_path}/#{_archive}#{p}"
|
31
47
|
end
|
32
48
|
end
|
33
49
|
|
@@ -43,17 +59,11 @@ module Origen
|
|
43
59
|
domain.sub /#{root_path}$/, ''
|
44
60
|
end
|
45
61
|
|
46
|
-
def
|
47
|
-
|
48
|
-
|
49
|
-
version = Origen.version
|
62
|
+
def _archive
|
63
|
+
if generate_hard_links?
|
64
|
+
archive_name.to_s.gsub(".", "_")
|
50
65
|
else
|
51
|
-
version = Origen.app.version
|
52
|
-
end
|
53
|
-
if version.development?
|
54
66
|
'latest'
|
55
|
-
else
|
56
|
-
version.to_s.gsub(".", "_")
|
57
67
|
end
|
58
68
|
end
|
59
69
|
|
@@ -65,13 +65,19 @@ module Origen
|
|
65
65
|
@compile_only_dot_erb_files = true
|
66
66
|
# Functions used here since Origen.root is not available when this is first instantiated
|
67
67
|
@output_directory = -> { "#{Origen.root}/output" }
|
68
|
-
@reference_directory =
|
68
|
+
@reference_directory = lambda do
|
69
|
+
if Origen.config.output_directory.to_s =~ /(\\|\/)output(\\|\/)/
|
70
|
+
Origen.config.output_directory.to_s.sub(/(\\|\/)output(\\|\/)/, '\1.ref\2')
|
71
|
+
else
|
72
|
+
"#{Origen.root}/.ref"
|
73
|
+
end
|
74
|
+
end
|
69
75
|
@release_directory = -> { Origen.root }
|
70
76
|
@release_email_subject = false
|
71
77
|
@log_directory = -> { "#{Origen.root}/log" }
|
72
78
|
@pattern_name_translator = ->(name) { name }
|
73
79
|
@pattern_directory = -> { "#{Origen.root}/pattern" }
|
74
|
-
@pattern_output_directory = -> {
|
80
|
+
@pattern_output_directory = -> { Origen.app.config.output_directory }
|
75
81
|
@history_file = -> { "#{Origen.root}/doc/history" }
|
76
82
|
@default_lsf_action = :clear
|
77
83
|
@proceed_with_pattern = ->(_name) { true }
|
data/lib/origen/commands/new.rb
CHANGED
@@ -69,7 +69,7 @@ md5 = "#{tmp}/md5#{version}"
|
|
69
69
|
if File.exist?(tmp_dir) && File.exist?(md5)
|
70
70
|
old_sig = File.read(md5)
|
71
71
|
hash = Digest::MD5.new
|
72
|
-
Dir["#{tmp_dir}
|
72
|
+
Dir["#{tmp_dir}/**/{*,.*}"].each do |f|
|
73
73
|
hash << File.read(f) unless File.directory?(f)
|
74
74
|
end
|
75
75
|
new_sig = hash.hexdigest
|
@@ -99,7 +99,7 @@ unless all_present
|
|
99
99
|
end
|
100
100
|
|
101
101
|
hash = Digest::MD5.new
|
102
|
-
Dir["#{tmp_dir}
|
102
|
+
Dir["#{tmp_dir}/**/{*,.*}"].each do |f|
|
103
103
|
hash << File.read(f) unless File.directory?(f)
|
104
104
|
end
|
105
105
|
File.open(md5, 'w') { |f| f.write(hash.hexdigest) }
|
data/lib/origen/commands/web.rb
CHANGED
@@ -40,7 +40,11 @@ The following options are available:
|
|
40
40
|
opts.on('-t', '--target NAME', String, 'Override the default target, NAME can be a full path or a fragment of a target file name') { |t| options[:target] = t }
|
41
41
|
opts.on('-r', '--remote', 'Use in conjunction with the compile command to deploy files to a remote web server') { options[:remote] = true }
|
42
42
|
opts.on('-a', '--api', 'Generate API documentation after compiling') { options[:api] = true }
|
43
|
-
opts.on('--archive ID', String, 'Archive the documents after compiling or deploying remotely')
|
43
|
+
opts.on('--archive ID', String, 'Archive the documents after compiling or deploying remotely') do |id|
|
44
|
+
options[:archive] = id
|
45
|
+
require "#{Origen.top}/helpers/url"
|
46
|
+
Origen::Generator::Compiler::Helpers.archive_name = id
|
47
|
+
end
|
44
48
|
opts.on('-d', '--debugger', 'Enable the debugger') { options[:debugger] = true }
|
45
49
|
opts.on('-m', '--mode MODE', Origen::Mode::MODES, 'Force the Origen operating mode:', ' ' + Origen::Mode::MODES.join(', ')) { |_m| }
|
46
50
|
opts.on('--no-serve', "Don't serve the website after compiling without the remote option") { options[:no_serve] = true }
|
@@ -22,7 +22,9 @@ module Origen
|
|
22
22
|
if sub_flow
|
23
23
|
interface = Origen.interface
|
24
24
|
opts = Origen.generator.option_pipeline.pop || {}
|
25
|
+
Origen.interface.startup(options) if Origen.interface.respond_to?(:startup)
|
25
26
|
interface.instance_exec(opts, &block)
|
27
|
+
Origen.interface.shutdown(options) if Origen.interface.respond_to?(:shutdown)
|
26
28
|
if Origen.tester.doc?
|
27
29
|
Origen.interface.flow.stop_section
|
28
30
|
end
|
@@ -32,7 +34,10 @@ module Origen
|
|
32
34
|
interface = Origen.reset_interface(options)
|
33
35
|
Origen.interface.set_top_level_flow
|
34
36
|
Origen.interface.flow_generator.set_flow_description(Origen.interface.consume_comments)
|
37
|
+
options[:top_level] = true
|
38
|
+
Origen.interface.startup(options) if Origen.interface.respond_to?(:startup)
|
35
39
|
interface.instance_eval(&block)
|
40
|
+
Origen.interface.shutdown(options) if Origen.interface.respond_to?(:shutdown)
|
36
41
|
interface.close(flow: true)
|
37
42
|
end
|
38
43
|
end
|
data/lib/origen/generator/job.rb
CHANGED
@@ -59,11 +59,25 @@ module Origen
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def output_pattern_directory
|
62
|
-
|
62
|
+
@output_pattern_directory ||= begin
|
63
|
+
dir = Origen.app.config.pattern_output_directory
|
64
|
+
if tester.respond_to?(:subdirectory)
|
65
|
+
dir = File.join(dir, tester.subdirectory)
|
66
|
+
end
|
67
|
+
FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
68
|
+
dir
|
69
|
+
end
|
63
70
|
end
|
64
71
|
|
65
72
|
def reference_pattern_directory
|
66
|
-
|
73
|
+
@reference_pattern_directory ||= begin
|
74
|
+
dir = Origen.file_handler.reference_directory
|
75
|
+
if tester.respond_to?(:subdirectory)
|
76
|
+
dir = File.join(dir, tester.subdirectory)
|
77
|
+
end
|
78
|
+
FileUtils.mkdir_p(dir) unless File.exist?(dir)
|
79
|
+
dir
|
80
|
+
end
|
67
81
|
end
|
68
82
|
|
69
83
|
def output_prefix
|
@@ -220,7 +220,11 @@ module Origen
|
|
220
220
|
c2 'GENERATED:'
|
221
221
|
c2 " Time: #{Origen.launch_time}"
|
222
222
|
c2 " By: #{Origen.current_user.name}"
|
223
|
-
|
223
|
+
l = " Command: origen g #{job.requested_pattern} -t #{Origen.target.file.basename}"
|
224
|
+
if Origen.environment && Origen.environment.file
|
225
|
+
l += " -e #{Origen.environment.file.basename}"
|
226
|
+
end
|
227
|
+
c2(l)
|
224
228
|
c2 '*' * 75
|
225
229
|
c2 'ENVIRONMENT:'
|
226
230
|
c2 ' Application'
|
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.
|
4
|
+
version: 0.7.14
|
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-06-
|
11
|
+
date: 2016-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -652,7 +652,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
652
652
|
version: 1.8.11
|
653
653
|
requirements: []
|
654
654
|
rubyforge_project:
|
655
|
-
rubygems_version: 2.
|
655
|
+
rubygems_version: 2.6.2
|
656
656
|
signing_key:
|
657
657
|
specification_version: 4
|
658
658
|
summary: The Semiconductor Developer's Kit
|