origen 0.60.1 → 0.60.2
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/version.rb +1 -1
- data/lib/origen/application/runner.rb +33 -23
- data/lib/origen/client.rb +23 -12
- data/origen_app_generators/origen_app_generators.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f10a2c8c7cf5abff32c00fece98aa0e4cc190c88866d20213fa6b269ee4d925
|
4
|
+
data.tar.gz: d57c008c8af34d344cf2355a05e536299c482aca8d638669719d2f9bc46abd47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1ebeae4bbf56385a85ffbc2d7f2801059403b2aac4fa29475600639e38a88ff52c328b3f668094a08f90d7b1e246c9c481f2bc9b0c60475d3e1b12de8c3321f
|
7
|
+
data.tar.gz: 8b38ef3948bd4d384b76d0db2ca0099122d47a6a95aff262fb34ab812f2d1b7f18169517c3c11bdd16f727be023095c3b45a2956dfb8d4501687fd8f4838f779
|
data/config/version.rb
CHANGED
@@ -134,30 +134,40 @@ module Origen
|
|
134
134
|
#
|
135
135
|
# @api private
|
136
136
|
def record_invocation(options)
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
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 Errno::ECONNREFUSED
|
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
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
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 'httparty'
|
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
|
-
|
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
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
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('
|
51
|
+
post('applications', body: content)
|
41
52
|
end
|
42
53
|
|
43
54
|
# Returns an array of data packets for all plugins
|
@@ -8,7 +8,7 @@ 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-
|
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
|
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.
|
4
|
+
version: 0.60.2
|
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-
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|