roku_builder 4.29.7 → 4.29.8

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: a70824117e5993d1c97135aa2ca527e4c24acd462520f5a602b7bb30bd951498
4
- data.tar.gz: c4e916020854f907ae533640adcb25d7cfbee05723ad22879e6db39297d37a10
3
+ metadata.gz: 82d24a2f934584b2ddf6531d7f087aab02a8e6fbb30b95c611a825f9dae45f1d
4
+ data.tar.gz: 727d3649d936ff4a0ac96bed9c5b53f0e2b1ecdea043130f8e622a05a3b12868
5
5
  SHA512:
6
- metadata.gz: cc67d446e88e8a672f289ca56e4312a46c6a7fe788f84eb146a2258e3d9fbf59143e9e58c0b2ae3282df937123be019fc8540a62f9f5b2a70d7267d487af6023
7
- data.tar.gz: 483489cf278804bb6e2a83207abae7ad8cc7c40f66bc9c97a85b80326e58af916de41e61cb42303bd4b89f47d1990b1070074f76f379a0790bad6b4cb9648cd6
6
+ metadata.gz: bd3c416558b52d1b852e6e4101cd1a702fbf1de6c3b125b53d429e6d7e365a8453236c4498a16f9b0afc1a1b233b3fac897346736a2359921a820a14a834718f
7
+ data.tar.gz: 0ebeaae1a028abfe252177528cdb295ad7a0655959c218d59b8b6f910768f58ef950d0df3be17d7169d57553f18f262e97b2f32d1ebc401fd1a0c447a3c34c19
@@ -26,10 +26,10 @@ module RokuBuilder
26
26
  setup_project
27
27
  setup_in_out_file
28
28
  setup_project_config
29
- setup_build_dir
30
29
  setup_stage_config
31
30
  setup_key_config
32
31
  setup_root_dir
32
+ setup_build_dir
33
33
  setup_input_mappings
34
34
  setup_console_log
35
35
  setup_deeplinks
@@ -171,12 +171,6 @@ module RokuBuilder
171
171
  @parsed[:project][:stage_method] = :working if @options[:working]
172
172
  end
173
173
 
174
- def setup_build_dir
175
- if @options[:build_dir].nil? and parsed[:project] and not @parsed[:project][:build_dir].nil?
176
- @options[:build_dir] = File.expand_path(@parsed[:project][:build_dir], @parsed[:project][:directory])
177
- end
178
- end
179
-
180
174
  def setup_stage_config
181
175
  if project_required
182
176
  stage = @options[:stage].to_sym if @options[:stage]
@@ -222,6 +216,15 @@ module RokuBuilder
222
216
  root_dir
223
217
  end
224
218
 
219
+ def setup_build_dir
220
+ if @options[:build_dir].nil? and @parsed[:project] and not @parsed[:project][:build_dir].nil?
221
+ @options[:build_dir] = File.expand_path(@parsed[:project][:build_dir], @parsed[:root_dir])
222
+ end
223
+ unless @options[:build_dir].nil?
224
+ @parsed[:build_dir] = File.expand_path(@options[:build_dir], @parsed[:root_dir])
225
+ end
226
+ end
227
+
225
228
  def setup_input_mappings
226
229
  @parsed[:input_mappings] = @config[:input_mappings]
227
230
  end
@@ -4,7 +4,9 @@ module RokuBuilder
4
4
  class Manifest
5
5
 
6
6
  def self.generate(config:, attributes:)
7
- FileUtils.touch(File.join(config.parsed[:root_dir], "manifest"))
7
+ root_dir = config.build_dir
8
+ root_dir ||= config.root_dir
9
+ FileUtils.touch(File.join(root_dir, "manifest"))
8
10
  manifest = new(config: config)
9
11
  manifest.update(attributes: default_params.merge(attributes))
10
12
  manifest
@@ -78,7 +80,8 @@ module RokuBuilder
78
80
  end
79
81
 
80
82
  def process_manifest(process_folder, process_zip)
81
- root_dir = @config.root_dir
83
+ root_dir = @config.build_dir
84
+ root_dir ||= @config.root_dir
82
85
  if File.directory?(root_dir)
83
86
  path = File.join(root_dir, "manifest")
84
87
  process_folder.call(path)
@@ -95,7 +98,8 @@ module RokuBuilder
95
98
  end
96
99
 
97
100
  def write_file
98
- root_dir = @config.parsed[:root_dir]
101
+ root_dir = @config.build_dir
102
+ root_dir ||= @config.root_dir
99
103
  raise ManifestError, "Cannot Update zipped manifest" if File.extname(root_dir) == ".zip"
100
104
  path = File.join(root_dir, "manifest")
101
105
  File.open(path, "wb") do |file|
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.29.7"
5
+ VERSION = "4.29.8"
6
6
  end
data/roku_builder.gemspec CHANGED
@@ -32,18 +32,17 @@ Gem::Specification.new do |spec|
32
32
  spec.add_dependency "image_size", "~> 2.0"
33
33
  spec.add_dependency "jwt", "~> 2.7"
34
34
 
35
- spec.add_development_dependency "bundler", "~> 2.0"
36
- spec.add_development_dependency "rake", "~> 12.0"
37
- spec.add_development_dependency "byebug", "~> 10.0"
38
- spec.add_development_dependency "minitest", "~> 5.16"
39
- spec.add_development_dependency "minitest-autotest", "~> 1.0"
40
- spec.add_development_dependency "minitest-server", "~> 1.0"
41
- spec.add_development_dependency "minitest-utils", "~> 0.3"
42
- spec.add_development_dependency "webmock", "~> 3.0"
43
- spec.add_development_dependency "simplecov", "~> 0.14"
44
- spec.add_development_dependency "coveralls", "~> 0.8"
45
- spec.add_development_dependency "yard", "~> 0.9"
46
- spec.add_development_dependency "guard", "~> 2.14"
47
- spec.add_development_dependency "guard-minitest", "~> 2.4"
48
- spec.add_development_dependency "m", "~> 1.5"
35
+ spec.add_development_dependency "bundler"
36
+ spec.add_development_dependency "rake"
37
+ spec.add_development_dependency "byebug"
38
+ spec.add_development_dependency "minitest"
39
+ spec.add_development_dependency "minitest-autotest"
40
+ spec.add_development_dependency "minitest-server"
41
+ spec.add_development_dependency "minitest-utils"
42
+ spec.add_development_dependency "webmock"
43
+ spec.add_development_dependency "simplecov"
44
+ spec.add_development_dependency "yard"
45
+ spec.add_development_dependency "guard"
46
+ spec.add_development_dependency "guard-minitest"
47
+ spec.add_development_dependency "m"
49
48
  end
@@ -195,7 +195,7 @@ module RokuBuilder
195
195
  waitfor = Proc.new do |telnet_config, &blk|
196
196
  assert_equal(/.+/, telnet_config["Match"])
197
197
  assert_equal(1, telnet_config["Timeout"])
198
- txt = " RoGraphics instance\n0x234 1 2 3 4\nAvailable memory\n"
198
+ txt = " RoGraphics instance\n0x234 1 2 3 4\nAvailable texture memory\n"
199
199
  blk.call(txt)
200
200
  true
201
201
  end
@@ -227,7 +227,7 @@ module RokuBuilder
227
227
  waitfor = Proc.new do |telnet_config, &blk|
228
228
  assert_equal(/.+/, telnet_config["Match"])
229
229
  assert_equal(1, telnet_config["Timeout"])
230
- txt = " RoGraphics instance 0x123\nAvailable memory 123 used 456 max 579\n"
230
+ txt = " RoGraphics instance 0x123\nAvailable texture memory 123 used 456 max 579\n"
231
231
  blk.call(txt)
232
232
  true
233
233
  end
@@ -78,6 +78,20 @@ module RokuBuilder
78
78
  assert_equal "/dev/null/infile", configs[:root_dir]
79
79
  end
80
80
 
81
+ def test_config_build_dir
82
+ options = build_options({
83
+ validate: true,
84
+ working: true,
85
+ build_dir: "build_dir"
86
+ })
87
+ options.define_singleton_method(:source_commands){[:validate]}
88
+ config = good_config(ConfigParserTest)
89
+ configs = ConfigParser.parse(options: options, config: config)
90
+
91
+ assert_equal Hash, config.class
92
+ assert_equal File.join(test_files_path(ConfigParserTest), "build_dir"), configs[:build_dir]
93
+ end
94
+
81
95
  def test_setup_project_config_bad_project
82
96
  config = good_config(ConfigParserTest)
83
97
  options = build_options({validate: true, project: :project3, stage: "production"})
@@ -0,0 +1,7 @@
1
+ #comment
2
+ title=Build Dir Title
3
+ major_version=1
4
+ minor_version=0
5
+ build_version=010101.1
6
+ mm_icon_focus_hd=pkg:/images/focus.png
7
+ mm_icon_focus_sd=pkg:/images/focus.png
@@ -1,11 +1,9 @@
1
1
  # ********** Copyright Viacom, Inc. Apache 2.0 **********
2
2
 
3
3
  require "simplecov"
4
- require "coveralls"
5
4
 
6
5
  SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter::new([
7
- SimpleCov::Formatter::HTMLFormatter,
8
- Coveralls::SimpleCov::Formatter
6
+ SimpleCov::Formatter::HTMLFormatter
9
7
  ])
10
8
  SimpleCov.start
11
9
 
@@ -19,6 +19,12 @@ module RokuBuilder
19
19
  def test_manifest_read
20
20
  Manifest.new(config: @config)
21
21
  end
22
+ def test_manifest_read_build_dir
23
+ build_dir = File.join(test_files_path(ManifestTest), "build_dir")
24
+ @config.instance_variable_set(:@parsed, {root_dir: @root_dir, build_dir: build_dir})
25
+ manifest = Manifest.new(config: @config)
26
+ assert_equal "Build Dir Title", manifest.title
27
+ end
22
28
  def test_manifest_read_missing
23
29
  FileUtils.rm(File.join(@config.parsed[:root_dir], "manifest"))
24
30
  assert_raises ManifestError do
@@ -74,6 +80,17 @@ module RokuBuilder
74
80
  assert !!manifest.mm_icon_focus_hd
75
81
  assert !!manifest.splash_screen_fhd
76
82
  end
83
+ def test_manifest_generate_build_dir
84
+ attributes = {
85
+ title: "New Title"
86
+ }
87
+ build_dir = File.join(test_files_path(ManifestTest), "build_dir_gen")
88
+ @config.instance_variable_set(:@parsed, {root_dir: @root_dir, build_dir: build_dir})
89
+ manifest = Manifest.generate(config: @config, attributes: attributes)
90
+ manifest = Manifest.new(config: @config)
91
+ assert_equal attributes[:title], manifest.title
92
+ FileUtils.rm(File.join(@root_dir, "build_dir_gen", "manifest"))
93
+ end
77
94
  def test_manifest_increment_build_version
78
95
  manifest = Manifest.new(config: @config)
79
96
  assert_equal "010101.1", manifest.build_version
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.29.7
4
+ version: 4.29.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-10 00:00:00.000000000 Z
11
+ date: 2024-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -168,198 +168,184 @@ dependencies:
168
168
  name: bundler
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: '2.0'
173
+ version: '0'
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - "~>"
178
+ - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: '2.0'
180
+ version: '0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: rake
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: '12.0'
187
+ version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: '12.0'
194
+ version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: byebug
197
197
  requirement: !ruby/object:Gem::Requirement
198
198
  requirements:
199
- - - "~>"
199
+ - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: '10.0'
201
+ version: '0'
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
- - - "~>"
206
+ - - ">="
207
207
  - !ruby/object:Gem::Version
208
- version: '10.0'
208
+ version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: minitest
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - "~>"
213
+ - - ">="
214
214
  - !ruby/object:Gem::Version
215
- version: '5.16'
215
+ version: '0'
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
- - - "~>"
220
+ - - ">="
221
221
  - !ruby/object:Gem::Version
222
- version: '5.16'
222
+ version: '0'
223
223
  - !ruby/object:Gem::Dependency
224
224
  name: minitest-autotest
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - "~>"
227
+ - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '1.0'
229
+ version: '0'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - "~>"
234
+ - - ">="
235
235
  - !ruby/object:Gem::Version
236
- version: '1.0'
236
+ version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: minitest-server
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - "~>"
241
+ - - ">="
242
242
  - !ruby/object:Gem::Version
243
- version: '1.0'
243
+ version: '0'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - "~>"
248
+ - - ">="
249
249
  - !ruby/object:Gem::Version
250
- version: '1.0'
250
+ version: '0'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: minitest-utils
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - "~>"
255
+ - - ">="
256
256
  - !ruby/object:Gem::Version
257
- version: '0.3'
257
+ version: '0'
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - "~>"
262
+ - - ">="
263
263
  - !ruby/object:Gem::Version
264
- version: '0.3'
264
+ version: '0'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: webmock
267
267
  requirement: !ruby/object:Gem::Requirement
268
268
  requirements:
269
- - - "~>"
269
+ - - ">="
270
270
  - !ruby/object:Gem::Version
271
- version: '3.0'
271
+ version: '0'
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
- - - "~>"
276
+ - - ">="
277
277
  - !ruby/object:Gem::Version
278
- version: '3.0'
278
+ version: '0'
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: simplecov
281
281
  requirement: !ruby/object:Gem::Requirement
282
282
  requirements:
283
- - - "~>"
283
+ - - ">="
284
284
  - !ruby/object:Gem::Version
285
- version: '0.14'
285
+ version: '0'
286
286
  type: :development
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
- - - "~>"
290
+ - - ">="
291
291
  - !ruby/object:Gem::Version
292
- version: '0.14'
293
- - !ruby/object:Gem::Dependency
294
- name: coveralls
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - "~>"
298
- - !ruby/object:Gem::Version
299
- version: '0.8'
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - "~>"
305
- - !ruby/object:Gem::Version
306
- version: '0.8'
292
+ version: '0'
307
293
  - !ruby/object:Gem::Dependency
308
294
  name: yard
309
295
  requirement: !ruby/object:Gem::Requirement
310
296
  requirements:
311
- - - "~>"
297
+ - - ">="
312
298
  - !ruby/object:Gem::Version
313
- version: '0.9'
299
+ version: '0'
314
300
  type: :development
315
301
  prerelease: false
316
302
  version_requirements: !ruby/object:Gem::Requirement
317
303
  requirements:
318
- - - "~>"
304
+ - - ">="
319
305
  - !ruby/object:Gem::Version
320
- version: '0.9'
306
+ version: '0'
321
307
  - !ruby/object:Gem::Dependency
322
308
  name: guard
323
309
  requirement: !ruby/object:Gem::Requirement
324
310
  requirements:
325
- - - "~>"
311
+ - - ">="
326
312
  - !ruby/object:Gem::Version
327
- version: '2.14'
313
+ version: '0'
328
314
  type: :development
329
315
  prerelease: false
330
316
  version_requirements: !ruby/object:Gem::Requirement
331
317
  requirements:
332
- - - "~>"
318
+ - - ">="
333
319
  - !ruby/object:Gem::Version
334
- version: '2.14'
320
+ version: '0'
335
321
  - !ruby/object:Gem::Dependency
336
322
  name: guard-minitest
337
323
  requirement: !ruby/object:Gem::Requirement
338
324
  requirements:
339
- - - "~>"
325
+ - - ">="
340
326
  - !ruby/object:Gem::Version
341
- version: '2.4'
327
+ version: '0'
342
328
  type: :development
343
329
  prerelease: false
344
330
  version_requirements: !ruby/object:Gem::Requirement
345
331
  requirements:
346
- - - "~>"
332
+ - - ">="
347
333
  - !ruby/object:Gem::Version
348
- version: '2.4'
334
+ version: '0'
349
335
  - !ruby/object:Gem::Dependency
350
336
  name: m
351
337
  requirement: !ruby/object:Gem::Requirement
352
338
  requirements:
353
- - - "~>"
339
+ - - ">="
354
340
  - !ruby/object:Gem::Version
355
- version: '1.5'
341
+ version: '0'
356
342
  type: :development
357
343
  prerelease: false
358
344
  version_requirements: !ruby/object:Gem::Requirement
359
345
  requirements:
360
- - - "~>"
346
+ - - ">="
361
347
  - !ruby/object:Gem::Version
362
- version: '1.5'
348
+ version: '0'
363
349
  description: Allows the user to easily sideload, package, deeplink, test, roku apps.
364
350
  email:
365
351
  - charles.greene@redspace.com
@@ -624,6 +610,8 @@ files:
624
610
  - test/roku_builder/test_files/manifest_manager_test/manifest_template_2
625
611
  - test/roku_builder/test_files/manifest_manager_test/test.zip
626
612
  - test/roku_builder/test_files/manifest_manager_test/updated_title_manifest
613
+ - test/roku_builder/test_files/manifest_test/build_dir/manifest
614
+ - test/roku_builder/test_files/manifest_test/build_dir_gen/.keep
627
615
  - test/roku_builder/test_files/manifest_test/manifest_comments
628
616
  - test/roku_builder/test_files/manifest_test/manifest_template
629
617
  - test/roku_builder/test_files/manifest_test/test.zip
@@ -758,6 +746,8 @@ test_files:
758
746
  - test/roku_builder/test_files/manifest_manager_test/manifest_template_2
759
747
  - test/roku_builder/test_files/manifest_manager_test/test.zip
760
748
  - test/roku_builder/test_files/manifest_manager_test/updated_title_manifest
749
+ - test/roku_builder/test_files/manifest_test/build_dir/manifest
750
+ - test/roku_builder/test_files/manifest_test/build_dir_gen/.keep
761
751
  - test/roku_builder/test_files/manifest_test/manifest_comments
762
752
  - test/roku_builder/test_files/manifest_test/manifest_template
763
753
  - test/roku_builder/test_files/manifest_test/test.zip