roku_builder 4.22.8 → 4.22.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 914ac6d549694894942d8d6904f65a24b83f146841191dcd04a7c367e04902f7
|
4
|
+
data.tar.gz: b2fa7a6ddfdb98276d2a34f15eba26b385c8b1b5e5c72ba635cd589434252bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35c1dc3f99d5761397b924e38473424fd302c52a5dd0111b3c326e247358d3a4a2c16aefde7cab6377ecccdf0bef3447ad46e09f69916b35fb62e4a18a97d0d3
|
7
|
+
data.tar.gz: 3bc352f2204af791ddfc8d0a7ca7993ab97a0da684f8bc54e70a07a5190913cd1294181d9b0cf5ddf22d0edb664b8fcae6deef6fa893b46085facddc51a52e85
|
@@ -98,7 +98,7 @@ module RokuBuilder
|
|
98
98
|
end
|
99
99
|
libraries = @config.project[:libraries]
|
100
100
|
libraries ||= []
|
101
|
-
if libraries.any_is_start?(@sca_warning[:path].gsub(/pkg:/, "")) and not @options[:include_libraries]
|
101
|
+
if @sca_warning[:path] and libraries.any_is_start?(@sca_warning[:path].gsub(/pkg:/, "")) and not @options[:include_libraries]
|
102
102
|
return false
|
103
103
|
end
|
104
104
|
return true
|
@@ -75,8 +75,9 @@ module RokuBuilder
|
|
75
75
|
parser.on("--debug", "Print Debug messages") do
|
76
76
|
options[:debug] = true
|
77
77
|
end
|
78
|
-
parser.on("-h", "--help", "Show
|
79
|
-
|
78
|
+
parser.on("-h", "--help [PLUGIN]", "Show help") do |h|
|
79
|
+
help_text = self.get_help_text(parser: parser, options: options, plugin_name: h)
|
80
|
+
puts help_text
|
80
81
|
exit
|
81
82
|
end
|
82
83
|
parser.on("-v", "--version", "Show version") do
|
@@ -112,6 +113,30 @@ module RokuBuilder
|
|
112
113
|
def dounstage(options:)
|
113
114
|
Stager.new(config: @config, options: options).unstage
|
114
115
|
end
|
116
|
+
|
117
|
+
def self.get_help_text(parser:, options:, plugin_name:)
|
118
|
+
plugin = self.get_plugin_by_name(plugin_name)
|
119
|
+
if nil == plugin
|
120
|
+
return parser.to_s
|
121
|
+
else
|
122
|
+
pluginParser = OptionParser.new
|
123
|
+
pluginParser.separator ""
|
124
|
+
pluginParser.separator "Options for #{plugin}:"
|
125
|
+
plugin.parse_options(parser: pluginParser, options: options)
|
126
|
+
return pluginParser.to_s
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.get_plugin_by_name(name)
|
131
|
+
if name.nil?
|
132
|
+
return nil
|
133
|
+
end
|
134
|
+
pluginIndex = RokuBuilder.plugins.map{|pluginClass| pluginClass.name.split('::').last().downcase}.index(name.downcase)
|
135
|
+
if !pluginIndex.nil?
|
136
|
+
plugin = RokuBuilder.plugins[pluginIndex]
|
137
|
+
return plugin
|
138
|
+
end
|
139
|
+
end
|
115
140
|
end
|
116
141
|
RokuBuilder.register_plugin(Core)
|
117
142
|
end
|
data/lib/roku_builder/version.rb
CHANGED
@@ -108,6 +108,25 @@ module RokuBuilder
|
|
108
108
|
core.dounstage(options: options)
|
109
109
|
end
|
110
110
|
end
|
111
|
+
def test_core_help
|
112
|
+
parser = OptionParser.new
|
113
|
+
options = {}
|
114
|
+
help_text = Core.get_help_text(parser: parser, options: options, plugin_name: nil)
|
115
|
+
assert help_text
|
116
|
+
end
|
117
|
+
def test_core_help_plugin
|
118
|
+
parser = OptionParser.new
|
119
|
+
options = {}
|
120
|
+
help_text = Core.get_help_text(parser: parser, options: options, plugin_name: "Loader")
|
121
|
+
assert help_text
|
122
|
+
end
|
123
|
+
def test_core_get_plugin_by_name
|
124
|
+
parser = OptionParser.new
|
125
|
+
options = {}
|
126
|
+
plugin_name = Core.get_plugin_by_name("loader")
|
127
|
+
assert plugin_name
|
128
|
+
assert_match "RokuBuilder::Loader", plugin_name.to_s
|
129
|
+
end
|
111
130
|
end
|
112
131
|
end
|
113
132
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roku_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.22.
|
4
|
+
version: 4.22.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greeneca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|