roku_builder 4.22.9 → 4.23.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 914ac6d549694894942d8d6904f65a24b83f146841191dcd04a7c367e04902f7
4
- data.tar.gz: b2fa7a6ddfdb98276d2a34f15eba26b385c8b1b5e5c72ba635cd589434252bbb
3
+ metadata.gz: 373790650070231c745746cd44c6ad316f34746e27fd73a4849b2d02279df624
4
+ data.tar.gz: de065657de7cf806f4db60a01230eef93d1f92aba581c5456752367e01554900
5
5
  SHA512:
6
- metadata.gz: 35c1dc3f99d5761397b924e38473424fd302c52a5dd0111b3c326e247358d3a4a2c16aefde7cab6377ecccdf0bef3447ad46e09f69916b35fb62e4a18a97d0d3
7
- data.tar.gz: 3bc352f2204af791ddfc8d0a7ca7993ab97a0da684f8bc54e70a07a5190913cd1294181d9b0cf5ddf22d0edb664b8fcae6deef6fa893b46085facddc51a52e85
6
+ metadata.gz: 16a02701b5eaed8f0f6dbee5edd0c42d3f26481139384aac9ecc545c96695259d0c4509274b3543cf5fd137c55f9ae19e27dda9f21a0813a725f6d1e0ae870ce
7
+ data.tar.gz: 01fbc2cd1d4bf08f4ee2f8a8fed846300d0a6629b54cb6a45484af7b4ff0388dde3ebfc84ac7d940bed5697700c5be690bc7491c10fcc366a374c59a8caaf75f
@@ -126,7 +126,12 @@ module RokuBuilder
126
126
  if File.exist?(local_config_path) and !@loaded_configs.include?(File.expand_path(local_config_path))
127
127
  local_config_hash = read_config(File.open(local_config_path))
128
128
  add_missing_directories(local_config_hash)
129
+ local_sub_configs = "./.roku_config/*.json"
129
130
  @config = @config.deep_merge(local_config_hash)
131
+ Dir.glob("./.roku_config/*.json").each do |sub_config_path|
132
+ sub_config_hash = read_config(File.open(sub_config_path))
133
+ @config = @config.deep_merge(sub_config_hash)
134
+ end
130
135
  end
131
136
  end
132
137
 
@@ -65,11 +65,13 @@ module RokuBuilder
65
65
  def run_sca_tool(path:, ssai:)
66
66
  if OS.unix?
67
67
  command = File.join(File.dirname(__FILE__), "sca-cmd", "bin", "sca-cmd")
68
+ stderr = "/dev/null"
68
69
  else
69
70
  command = File.join(File.dirname(__FILE__), "sca-cmd", "bin", "sca-cmd.bat")
71
+ stderr = "nul"
70
72
  end
71
73
  @logger.debug("Command: '#{command}'")
72
- results = `#{command} #{path}`.split("\n")
74
+ results = `#{command} #{path} 2>#{stderr}`.split("\n")
73
75
  process_sca_results(results, ssai)
74
76
  end
75
77
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.22.9"
5
+ VERSION = "4.23.0"
6
6
  end
@@ -123,9 +123,9 @@ module RokuBuilder
123
123
  def test_core_get_plugin_by_name
124
124
  parser = OptionParser.new
125
125
  options = {}
126
- plugin_name = Core.get_plugin_by_name("loader")
127
- assert plugin_name
128
- assert_match "RokuBuilder::Loader", plugin_name.to_s
126
+ plugin_name = Core.get_plugin_by_name("core")
127
+ refute_nil plugin_name
128
+ assert_match "RokuBuilder::Core", plugin_name.to_s
129
129
  end
130
130
  end
131
131
  end
@@ -163,6 +163,37 @@ module RokuBuilder
163
163
  assert_equal `pwd`.chomp, config.raw[:projects][:p2][:directory]
164
164
  end
165
165
 
166
+ def test_config_read_local_sub_config
167
+ options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
168
+ config = Config.new(options: options)
169
+
170
+ mock = Minitest::Mock.new
171
+ io = proc { |path|
172
+ if path == './.roku_config.json' or path == "keys.json"
173
+ mock
174
+ else
175
+ IO.new(IO.sysopen(path))
176
+ end
177
+ }
178
+ local_config_content = IO.read(File.join(test_files_path(ConfigTest), "local.json"))
179
+ mock.expect(:read, local_config_content)
180
+ local_sub_config_content = IO.read(File.join(test_files_path(ConfigTest), "local_sub.json"))
181
+ mock.expect(:read, local_sub_config_content)
182
+
183
+ File.stub(:exist?, true) do
184
+ File.stub(:open, io) do
185
+ Dir.stub(:glob, ["keys.json"]) do
186
+ config.load
187
+ end
188
+ end
189
+ end
190
+
191
+ mock.verify
192
+ refute_nil config.raw[:keys]
193
+ refute_nil config.raw[:keys][:test_key]
194
+ assert_equal "password", config.raw[:keys][:test_key][:password]
195
+ end
196
+
166
197
  def test_config_edit
167
198
  orginal = File.join(test_files_path(ConfigTest), "config.json")
168
199
  tmp = File.join(test_files_path(ConfigTest), "tmpconfig.json")
@@ -23,6 +23,10 @@ sub main(externalParams)
23
23
  scene.observeField("exitApplication", port)
24
24
  scene.observeField("sessionLength", port)
25
25
 
26
+ scene.signalBeacon("AppLaunchComplete")
27
+ scene.signalBeacon("AppDialogInitiate")
28
+ scene.signalBeacon("AppDialogComplete")
29
+
26
30
  while(true)
27
31
  msg = wait(0, port)
28
32
  msgType = type(msg)
@@ -0,0 +1,8 @@
1
+ {
2
+ "keys": {
3
+ "test_key": {
4
+ "keyed_pkg": "/key/path",
5
+ "password": "password"
6
+ }
7
+ }
8
+ }
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.9
4
+ version: 4.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-20 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -557,6 +557,7 @@ files:
557
557
  - test/roku_builder/test_files/config_test/child.json
558
558
  - test/roku_builder/test_files/config_test/config.json
559
559
  - test/roku_builder/test_files/config_test/local.json
560
+ - test/roku_builder/test_files/config_test/local_sub.json
560
561
  - test/roku_builder/test_files/config_test/multi_repeat_stages.json
561
562
  - test/roku_builder/test_files/config_test/no_default_device.json
562
563
  - test/roku_builder/test_files/config_test/no_default_project.json
@@ -684,6 +685,7 @@ test_files:
684
685
  - test/roku_builder/test_files/config_test/child.json
685
686
  - test/roku_builder/test_files/config_test/config.json
686
687
  - test/roku_builder/test_files/config_test/local.json
688
+ - test/roku_builder/test_files/config_test/local_sub.json
687
689
  - test/roku_builder/test_files/config_test/multi_repeat_stages.json
688
690
  - test/roku_builder/test_files/config_test/no_default_device.json
689
691
  - test/roku_builder/test_files/config_test/no_default_project.json