origen 0.60.0 → 0.60.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7b89041bc7a6067a7945d3b9cae3415771f2a270c3f6496a217d8b27916c2211
4
- data.tar.gz: a6c3ac53db78a810b77c0cb23c99fdb1d35fd05ec451c658f710c2501822bd03
3
+ metadata.gz: 148dec5c8f45022812ba91024776a9ef96523248ce80192eb41cde7fa15de0bd
4
+ data.tar.gz: 3a4d381a11282e37c008a321c45e24e85c0bf8dc1c62d62c646542a679badb2c
5
5
  SHA512:
6
- metadata.gz: c2d17382ac902d0391e7d2f748e5166ff6264ba2c10529b72dc5074bbb33aab30e4558e495082221a29e7365e483e2cc8f7e2517d229200519a5bef9cf1b27e8
7
- data.tar.gz: 66b8c763603a908bab112da936042f6e6e127b961acc52ba06d2d1e2b2d783d28480dda944d9dfd7fdadb24f3a98aa30a1f065fff069d37ea6d9213f4d64ff9e
6
+ metadata.gz: da91b6b19ff01e77e4cc6a43ed882204933ca913b418e86477a5a45c1182459ff38cc80525d6340951f5f582c06745d0c4db3094a365eab487f3d02e9ade9e6b
7
+ data.tar.gz: e802f0c36cfca5aa46339adebd2ef36ca79d99aa72f271970c5428f87e57ad1b0f8cc57cd6d0b5a2e9efd8dd39723f90c0f8201a537fefcfa12f91672bd7a671
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 60
4
- BUGFIX = 0
4
+ BUGFIX = 4
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -134,30 +134,40 @@ module Origen
134
134
  #
135
135
  # @api private
136
136
  def record_invocation(options)
137
- # record_invocation = false
138
- # begin
139
- # # Only record user invocations at this time, also bypass windows since it seems
140
- # # that threads can't be trusted not to block
141
- # unless Origen.running_remotely? # || Origen.running_on_windows?
142
- # record_invocation = Thread.new do
143
- # Origen.client.record_invocation(options[:action]) if options[:action]
144
- # end
145
- # end
146
- # rescue
147
- # # Don't allow this to kill an origen command
148
- # end
137
+ if Origen.site_config.record_invocation == true
138
+ record_invocation = false
139
+ begin
140
+ # Only record user invocations at this time, also bypass windows since it seems
141
+ # that threads can't be trusted not to block
142
+ unless Origen.running_remotely? # || Origen.running_on_windows?
143
+ # rubocop:disable Style/RescueModifier
144
+ record_invocation = Thread.new do
145
+ Origen.client.record_invocation(options[:action]) if options[:action]
146
+ rescue
147
+ # Dont allow server being down to flood the screen with the stacktrace
148
+ end
149
+ # rubocop:enable Style/RescueModifier
150
+ end
151
+ rescue
152
+ # Don't allow this to kill an origen command
153
+ end
154
+ end
155
+ # yield here is really important for the callback tests!!
149
156
  yield
150
- # begin
151
- # unless Origen.running_remotely?
152
- # # Wait for a server response, ideally would like to not wait here, but it seems if not
153
- # # then invocation postings can be dropped, especially on windows
154
- # Origen.profile 'waiting for recording invocation' do
155
- # record_invocation.value
156
- # end
157
- # end
158
- # rescue
159
- # # Don't allow this to kill an origen command
160
- # end
157
+
158
+ if Origen.site_config.record_invocation == true
159
+ begin
160
+ unless Origen.running_remotely?
161
+ # Wait for a server response, ideally would like to not wait here, but it seems if not
162
+ # then invocation postings can be dropped, especially on windows
163
+ Origen.profile 'waiting for recording invocation' do
164
+ record_invocation.value
165
+ end
166
+ end
167
+ rescue
168
+ # Don't allow this to kill an origen command
169
+ end
170
+ end
161
171
  end
162
172
 
163
173
  # The action to take should be set by the action option, but legacy code will pass
data/lib/origen/client.rb CHANGED
@@ -5,15 +5,17 @@ module Origen
5
5
  # https://github.com/jnunemaker/httparty/tree/v0.9.0
6
6
 
7
7
  require 'json'
8
- require 'httparty'
9
- include HTTParty
8
+ require 'net/http'
9
+ # include HTTParty
10
10
 
11
11
  USE_DEV_SERVER = false
12
12
  DEV_PORT = 3000
13
13
 
14
14
  def post(path, options = {})
15
15
  options[:port] = port
16
- self.class.post("#{url}/#{path}", options)
16
+ invocation_url = URI.parse("#{url}/#{path}")
17
+ http = Net::HTTP.new(invocation_url.host, invocation_url.port)
18
+ http.post(invocation_url, JSON.dump(options[:body]), 'Content-type' => 'application/vnd.api+json', 'Accept' => 'text/json, application/vnd.api+json')
17
19
  end
18
20
 
19
21
  def get(path, options = {})
@@ -21,7 +23,11 @@ module Origen
21
23
  end
22
24
 
23
25
  def url
24
- 'http://hub.origen-sdk.org/api'
26
+ if Origen.site_config.invocation_url.nil?
27
+ 'http://localhost:3000'
28
+ else
29
+ Origen.site_config.invocation_url
30
+ end
25
31
  end
26
32
 
27
33
  def port
@@ -29,15 +35,20 @@ module Origen
29
35
  end
30
36
 
31
37
  def record_invocation(command)
32
- data = {
33
- user: Origen.current_user.core_id,
34
- application: Origen.app.config.initials,
35
- app_version: Origen.app.version,
36
- origen_version: Origen.version,
37
- command: command,
38
- platform: Origen.running_on_windows? ? 'windows' : 'linux'
38
+ content = {
39
+ data: {
40
+ type: 'applications',
41
+ attributes: {
42
+ user: Origen.current_user.core_id,
43
+ application: Origen.app.config.initials,
44
+ "app-version": Origen.app.version,
45
+ "origen-version": Origen.version,
46
+ command: command,
47
+ platform: Origen.running_on_windows? ? 'windows' : 'linux'
48
+ }
49
+ }
39
50
  }
40
- post('record_invocation', body: data)
51
+ post('applications', body: content)
41
52
  end
42
53
 
43
54
  # Returns an array of data packets for all plugins
@@ -336,7 +336,11 @@ module Origen
336
336
  # => NameSpaceA::B::C
337
337
  if constantizable && (options[:class_name] != options[:class_name].constantize.to_s)
338
338
  block_dir = options[:block_file] || _find_block_dir(options)
339
+ # files that aren't initializing a new namespace and have special loading shouldn't be required
340
+ # the code they contain may try to call methods that dont exist yet
341
+ skip_require_files = options[:skip_require_files] || %w(attributes parameters pins registers sub_blocks timesets)
339
342
  Dir.glob("#{block_dir}/*.rb").each do |file|
343
+ next if skip_require_files.include?(Pathname.new(file).basename('.rb').to_s)
340
344
  require file
341
345
  end
342
346
  end
@@ -8,23 +8,25 @@ Gem::Specification.new do |s|
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 = "2021-04-27"
11
+ s.date = "2021-08-10"
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 = "3.2.16".freeze
17
+ s.rubygems_version = "3.0.1".freeze
18
18
  s.summary = "Origen application generators".freeze
19
19
 
20
- s.installed_by_version = "3.2.16" if s.respond_to? :installed_by_version
20
+ s.installed_by_version = "3.0.1" if s.respond_to? :installed_by_version
21
21
 
22
22
  if s.respond_to? :specification_version then
23
23
  s.specification_version = 4
24
- end
25
24
 
26
- if s.respond_to? :add_runtime_dependency then
27
- s.add_runtime_dependency(%q<origen>.freeze, [">= 0.40.2"])
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
+ s.add_runtime_dependency(%q<origen>.freeze, [">= 0.40.2"])
27
+ else
28
+ s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
29
+ end
28
30
  else
29
31
  s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
30
32
  end
@@ -146,9 +146,11 @@ gem_use_from_system:
146
146
  #ldap_user_id_attribute: uid
147
147
 
148
148
  # LSF Configuration
149
- lsf_queue: 'batchq'
150
- lsf_group: 'nil'
151
- lsf_project: 'msg.te'
152
- lsf_resource: 'rhel6'
153
- lsf_cores: '1'
149
+ # lsf_queue: 'batchq'
150
+ # lsf_group: 'nil'
151
+ # lsf_project: 'msg.te'
152
+ # lsf_resource: 'rhel6'
153
+ # lsf_cores: '1'
154
+
155
+ # lsf_debug is needed for spec tests on the core.
154
156
  lsf_debug: '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.60.0
4
+ version: 0.60.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-27 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -749,7 +749,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
749
749
  - !ruby/object:Gem::Version
750
750
  version: 1.8.11
751
751
  requirements: []
752
- rubygems_version: 3.2.16
752
+ rubygems_version: 3.0.1
753
753
  signing_key:
754
754
  specification_version: 4
755
755
  summary: The Semiconductor Developer's Kit