roku_builder 3.13.0 → 4.0.0
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/.travis.yml +1 -1
- data/CHANGELOG +12 -0
- data/Gemfile.lock +22 -7
- data/Guardfile +3 -3
- data/README.md +22 -398
- data/bin/roku +1 -194
- data/config.json.example +1 -1
- data/intergration/roku_builder/test_core.rb +52 -0
- data/intergration/roku_builder/test_files/core_intergration_test/manifest_template +7 -0
- data/intergration/roku_builder/test_files/core_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/components/rectanglescene.xml +28 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/source/main.brs +23 -0
- data/intergration/roku_builder/test_files/inspector_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/linker_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/loader_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/monitor_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/navigator_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/packager_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/profiler_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/scripter_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/components/rectanglescene.xml +29 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rde_mm_focus_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rde_splash_fhd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rde_splash_sd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rsgde_bg_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rsgde_mm_focus_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/images/rsgde_splash_hd.jpg +0 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/manifest +21 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/source/main.brs +21 -0
- data/intergration/roku_builder/test_files/tester_intergration_test/test.pkg +0 -0
- data/intergration/roku_builder/test_helper.rb +138 -0
- data/intergration/roku_builder/test_inspector.rb +35 -0
- data/intergration/roku_builder/test_linker.rb +32 -0
- data/intergration/roku_builder/test_loader.rb +38 -0
- data/intergration/roku_builder/test_monitor.rb +21 -0
- data/intergration/roku_builder/test_navigator.rb +34 -0
- data/intergration/roku_builder/test_packager.rb +41 -0
- data/intergration/roku_builder/test_profiler.rb +48 -0
- data/intergration/roku_builder/test_scripter.rb +38 -0
- data/intergration/roku_builder/test_tester.rb +21 -0
- data/lib/roku_builder.rb +143 -154
- data/lib/roku_builder/config.rb +17 -40
- data/lib/roku_builder/config_parser.rb +49 -200
- data/lib/roku_builder/config_validator.rb +1 -1
- data/lib/roku_builder/errors.rb +12 -0
- data/lib/roku_builder/git.rb +28 -0
- data/lib/roku_builder/hash.rb +8 -0
- data/lib/roku_builder/manifest.rb +121 -0
- data/lib/roku_builder/options.rb +68 -29
- data/lib/roku_builder/plugin.rb +30 -0
- data/lib/roku_builder/plugins/core.rb +117 -0
- data/lib/roku_builder/plugins/inspector.rb +104 -0
- data/lib/roku_builder/{linker.rb → plugins/linker.rb} +38 -12
- data/lib/roku_builder/plugins/loader.rb +152 -0
- data/lib/roku_builder/{monitor.rb → plugins/monitor.rb} +20 -9
- data/lib/roku_builder/{navigator.rb → plugins/navigator.rb} +136 -88
- data/lib/roku_builder/plugins/packager.rb +194 -0
- data/lib/roku_builder/plugins/profiler.rb +135 -0
- data/lib/roku_builder/plugins/scripter.rb +53 -0
- data/lib/roku_builder/{tester.rb → plugins/tester.rb} +28 -19
- data/lib/roku_builder/stager.rb +48 -12
- data/lib/roku_builder/string.rb +20 -0
- data/lib/roku_builder/util.rb +10 -34
- data/lib/roku_builder/version.rb +1 -1
- data/rakefile +5 -1
- data/roku_builder.gemspec +2 -0
- data/test/roku_builder/plugins/test_core.rb +112 -0
- data/test/roku_builder/plugins/test_inspector.rb +165 -0
- data/test/roku_builder/plugins/test_linker.rb +123 -0
- data/test/roku_builder/plugins/test_loader.rb +115 -0
- data/test/roku_builder/plugins/test_monitor.rb +141 -0
- data/test/roku_builder/plugins/test_navigator.rb +274 -0
- data/test/roku_builder/plugins/test_packager.rb +202 -0
- data/test/roku_builder/plugins/test_profiler.rb +127 -0
- data/test/roku_builder/plugins/test_scripter.rb +110 -0
- data/test/roku_builder/plugins/test_tester.rb +109 -0
- data/test/roku_builder/test_config.rb +51 -35
- data/test/roku_builder/test_config_parser.rb +76 -154
- data/test/roku_builder/test_config_validator.rb +18 -1
- data/test/roku_builder/test_files/{loader_test/manifest → config_parser_test/test.pkg} +0 -0
- data/test/roku_builder/test_files/config_test/config.json +3 -0
- data/test/roku_builder/test_files/controller_commands_test/manifest_template +7 -0
- data/test/roku_builder/test_files/core_test/manifest_template +7 -0
- data/test/roku_builder/test_files/core_test/test.pkg +0 -0
- data/test/roku_builder/test_files/inspector_test/manifest +6 -0
- data/test/roku_builder/test_files/inspector_test/test.pkg +0 -0
- data/test/roku_builder/test_files/linker_test/manifest +6 -0
- data/test/roku_builder/test_files/linker_test/test.pkg +0 -0
- data/test/roku_builder/test_files/loader_test/manifest_template +6 -0
- data/test/roku_builder/test_files/loader_test/test.pkg +0 -0
- data/test/roku_builder/test_files/loader_test/test.zip +0 -0
- data/test/roku_builder/test_files/manifest_test/manifest_comments +6 -0
- data/test/roku_builder/test_files/manifest_test/manifest_template +7 -0
- data/test/roku_builder/test_files/manifest_test/test.zip +0 -0
- data/test/roku_builder/test_files/packager_test/manifest +6 -0
- data/test/roku_builder/test_files/packager_test/scripter_test/manifest +6 -0
- data/test/roku_builder/test_files/packager_test/test.pkg +0 -0
- data/test/roku_builder/test_files/roku_builder_test/config.json +32 -0
- data/test/roku_builder/test_files/scripter_test/manifest +6 -0
- data/test/roku_builder/test_files/scripter_test/test.pkg +0 -0
- data/test/roku_builder/test_files/stager_test/test.pkg +0 -0
- data/test/roku_builder/test_files/tester_test/manifest +6 -0
- data/test/roku_builder/test_files/tester_test/test.pkg +0 -0
- data/test/roku_builder/test_helper.rb +44 -11
- data/test/roku_builder/test_logger.rb +1 -0
- data/test/roku_builder/test_manifest.rb +99 -0
- data/test/roku_builder/test_options.rb +106 -77
- data/test/roku_builder/test_options_plugins.rb +111 -0
- data/test/roku_builder/test_plugin.rb +48 -0
- data/test/roku_builder/test_roku_builder.rb +239 -0
- data/test/roku_builder/test_stager.rb +49 -101
- data/test/roku_builder/test_util.rb +19 -4
- metadata +241 -47
- data/lib/roku_builder/controller.rb +0 -98
- data/lib/roku_builder/controller_commands.rb +0 -224
- data/lib/roku_builder/error_handler.rb +0 -142
- data/lib/roku_builder/inspector.rb +0 -82
- data/lib/roku_builder/keyer.rb +0 -106
- data/lib/roku_builder/loader.rb +0 -131
- data/lib/roku_builder/manifest_manager.rb +0 -126
- data/lib/roku_builder/packager.rb +0 -43
- data/lib/roku_builder/profiler.rb +0 -96
- data/lib/roku_builder/scripter.rb +0 -39
- data/test/roku_builder/test_controller.rb +0 -70
- data/test/roku_builder/test_controller_commands.rb +0 -465
- data/test/roku_builder/test_error_handler.rb +0 -90
- data/test/roku_builder/test_inspector.rb +0 -298
- data/test/roku_builder/test_keyer.rb +0 -176
- data/test/roku_builder/test_linker.rb +0 -110
- data/test/roku_builder/test_loader.rb +0 -337
- data/test/roku_builder/test_manifest_manager.rb +0 -103
- data/test/roku_builder/test_monitor.rb +0 -137
- data/test/roku_builder/test_navigator.rb +0 -280
- data/test/roku_builder/test_packager.rb +0 -127
- data/test/roku_builder/test_profiler.rb +0 -35
- data/test/roku_builder/test_scripter.rb +0 -102
- data/test/roku_builder/test_tester.rb +0 -130
|
@@ -4,6 +4,9 @@ require_relative "test_helper.rb"
|
|
|
4
4
|
|
|
5
5
|
module RokuBuilder
|
|
6
6
|
class ConfigTest < Minitest::Test
|
|
7
|
+
def setup
|
|
8
|
+
Logger.set_testing
|
|
9
|
+
end
|
|
7
10
|
|
|
8
11
|
def test_config_init
|
|
9
12
|
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
|
|
@@ -59,7 +62,7 @@ module RokuBuilder
|
|
|
59
62
|
assert_equal :p1, config.raw[:projects][:default]
|
|
60
63
|
end
|
|
61
64
|
|
|
62
|
-
def
|
|
65
|
+
def test_config_read_parent_child_part
|
|
63
66
|
options = build_options({config: File.join(test_files_path(ConfigTest), "child.json"), validate: true})
|
|
64
67
|
config = Config.new(options: options)
|
|
65
68
|
config.load
|
|
@@ -67,7 +70,7 @@ module RokuBuilder
|
|
|
67
70
|
assert_equal :p1, config.raw[:projects][:default]
|
|
68
71
|
end
|
|
69
72
|
|
|
70
|
-
def
|
|
73
|
+
def test_config_read_parent_parent_part
|
|
71
74
|
options = build_options({config: File.join(test_files_path(ConfigTest), "parent_projects.json"), validate: true})
|
|
72
75
|
config = Config.new(options: options)
|
|
73
76
|
config.load
|
|
@@ -89,38 +92,6 @@ module RokuBuilder
|
|
|
89
92
|
FileUtils.rm(tmp)
|
|
90
93
|
end
|
|
91
94
|
|
|
92
|
-
def test_config_update_package
|
|
93
|
-
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), package: true, stage: :production, set_stage: true})
|
|
94
|
-
config = Config.new(options: options)
|
|
95
|
-
config.load
|
|
96
|
-
config.parse
|
|
97
|
-
options[:build_version] = "BUILDVERSION"
|
|
98
|
-
config.update
|
|
99
|
-
assert_equal "app - production - BUILDVERSION", config.parsed[:package_config][:app_name_version]
|
|
100
|
-
assert_equal "/tmp/app_production_BUILDVERSION", config.parsed[:package_config][:out_file]
|
|
101
|
-
assert_equal "/tmp/app_production_BUILDVERSION", config.parsed[:inspect_config][:pkg]
|
|
102
|
-
end
|
|
103
|
-
|
|
104
|
-
def test_config_update_build
|
|
105
|
-
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), build: true, stage: :production, set_stage: true})
|
|
106
|
-
config = Config.new(options: options)
|
|
107
|
-
config.load
|
|
108
|
-
config.parse
|
|
109
|
-
options[:build_version] = "BUILDVERSION"
|
|
110
|
-
config.update
|
|
111
|
-
assert_equal "/tmp/app_production_BUILDVERSION", config.parsed[:build_config][:out_file]
|
|
112
|
-
end
|
|
113
|
-
|
|
114
|
-
def test_config_update_sideload
|
|
115
|
-
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), sideload: true, stage: :production, set_stage: true, out: "/tmp2"})
|
|
116
|
-
config = Config.new(options: options)
|
|
117
|
-
config.load
|
|
118
|
-
config.parse
|
|
119
|
-
options[:build_version] = "BUILDVERSION"
|
|
120
|
-
config.update
|
|
121
|
-
assert_equal "/tmp2/app_production_BUILDVERSION", config.parsed[:sideload_config][:out_file]
|
|
122
|
-
end
|
|
123
|
-
|
|
124
95
|
def test_config_configure_creation
|
|
125
96
|
target_config = File.join(test_files_path(ConfigTest), "configure_test.json")
|
|
126
97
|
options = build_options({config: target_config, configure: true})
|
|
@@ -148,7 +119,7 @@ module RokuBuilder
|
|
|
148
119
|
File.delete(target_config) if File.exist?(target_config)
|
|
149
120
|
end
|
|
150
121
|
|
|
151
|
-
def
|
|
122
|
+
def test_config_configure_edit_params_default
|
|
152
123
|
target_config = File.join(test_files_path(ConfigTest), "configure_test.json")
|
|
153
124
|
options = build_options({
|
|
154
125
|
config: target_config,
|
|
@@ -164,5 +135,50 @@ module RokuBuilder
|
|
|
164
135
|
end
|
|
165
136
|
File.delete(target_config) if File.exist?(target_config)
|
|
166
137
|
end
|
|
138
|
+
|
|
139
|
+
def test_config_set_root_dir
|
|
140
|
+
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
|
|
141
|
+
config = Config.new(options: options)
|
|
142
|
+
config.load
|
|
143
|
+
config.parse
|
|
144
|
+
config.root_dir = "new/dir"
|
|
145
|
+
assert_equal "new/dir", config.root_dir
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def test_config_set_in
|
|
149
|
+
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
|
|
150
|
+
config = Config.new(options: options)
|
|
151
|
+
config.load
|
|
152
|
+
config.parse
|
|
153
|
+
config.in = "new/dir"
|
|
154
|
+
assert_equal "new/dir", config.in
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
def test_config_set_out
|
|
158
|
+
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
|
|
159
|
+
config = Config.new(options: options)
|
|
160
|
+
config.load
|
|
161
|
+
config.parse
|
|
162
|
+
config.out = "new/dir"
|
|
163
|
+
assert_equal "new/dir", config.out
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
def test_config_dont_set_params
|
|
167
|
+
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
|
|
168
|
+
config = Config.new(options: options)
|
|
169
|
+
config.load
|
|
170
|
+
config.parse
|
|
171
|
+
assert_raises StandardError do
|
|
172
|
+
config.param = "value"
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
def test_config_input_mappings
|
|
176
|
+
options = build_options({config: File.join(test_files_path(ConfigTest), "config.json"), validate: true})
|
|
177
|
+
config = Config.new(options: options)
|
|
178
|
+
config.load
|
|
179
|
+
config.parse
|
|
180
|
+
refute_nil config.input_mappings
|
|
181
|
+
assert_equal ["home", "Home"], config.input_mappings[:a]
|
|
182
|
+
end
|
|
167
183
|
end
|
|
168
184
|
end
|
|
@@ -4,51 +4,54 @@ require_relative "test_helper.rb"
|
|
|
4
4
|
|
|
5
5
|
module RokuBuilder
|
|
6
6
|
class ConfigParserTest < Minitest::Test
|
|
7
|
+
def setup
|
|
8
|
+
Logger.set_testing
|
|
9
|
+
end
|
|
7
10
|
def test_manifest_config
|
|
8
11
|
options = build_options({
|
|
9
|
-
|
|
12
|
+
validate: true,
|
|
10
13
|
working: true
|
|
11
14
|
})
|
|
12
|
-
|
|
15
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
16
|
+
config = good_config(ConfigParserTest)
|
|
13
17
|
configs = ConfigParser.parse(options: options, config: config)
|
|
14
18
|
|
|
15
19
|
assert_equal Hash, config.class
|
|
16
|
-
assert_equal
|
|
20
|
+
assert_equal test_files_path(ConfigParserTest), configs[:root_dir]
|
|
17
21
|
end
|
|
18
22
|
|
|
19
23
|
def test_manifest_config_in
|
|
20
24
|
options = build_options({
|
|
21
25
|
in: "/dev/null/infile",
|
|
22
|
-
|
|
26
|
+
validate: true
|
|
23
27
|
})
|
|
24
|
-
config = good_config
|
|
28
|
+
config = good_config(ConfigParserTest)
|
|
25
29
|
configs = ConfigParser.parse(options: options, config: config)
|
|
26
30
|
|
|
27
31
|
assert_equal Hash, config.class
|
|
28
|
-
assert_equal "/dev/null/infile", configs[:
|
|
29
|
-
assert_equal :in, configs[:stage_config][:method]
|
|
32
|
+
assert_equal "/dev/null/infile", configs[:root_dir]
|
|
30
33
|
end
|
|
31
34
|
|
|
32
35
|
def test_manifest_config_in_expand
|
|
33
36
|
options = build_options({
|
|
34
37
|
in: "./infile",
|
|
35
|
-
|
|
38
|
+
validate: true
|
|
36
39
|
})
|
|
37
|
-
config = good_config
|
|
40
|
+
config = good_config(ConfigParserTest)
|
|
38
41
|
configs = ConfigParser.parse(options: options, config: config)
|
|
39
42
|
|
|
40
43
|
assert_equal Hash, config.class
|
|
41
|
-
assert_equal File.join(Dir.pwd, "infile"), configs[:
|
|
42
|
-
assert_equal :in, configs[:stage_config][:method]
|
|
44
|
+
assert_equal File.join(Dir.pwd, "infile"), configs[:root_dir]
|
|
43
45
|
end
|
|
44
46
|
|
|
45
47
|
def test_manifest_config_current
|
|
46
48
|
options = build_options({
|
|
47
49
|
current: true,
|
|
48
|
-
|
|
50
|
+
validate: true
|
|
49
51
|
})
|
|
52
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
50
53
|
configs = nil
|
|
51
|
-
config = good_config
|
|
54
|
+
config = good_config(ConfigParserTest)
|
|
52
55
|
Pathname.stub(:pwd, "/dev/null/infile") do
|
|
53
56
|
File.stub(:exist?, true) do
|
|
54
57
|
configs = ConfigParser.parse(options: options, config: config)
|
|
@@ -56,13 +59,13 @@ module RokuBuilder
|
|
|
56
59
|
end
|
|
57
60
|
|
|
58
61
|
assert_equal Hash, config.class
|
|
59
|
-
assert_equal "/dev/null/infile", configs[:
|
|
60
|
-
assert_equal :current, configs[:stage_config][:method]
|
|
62
|
+
assert_equal "/dev/null/infile", configs[:root_dir]
|
|
61
63
|
end
|
|
62
64
|
|
|
63
65
|
def test_setup_project_config_bad_project
|
|
64
|
-
config = good_config
|
|
65
|
-
options = build_options({
|
|
66
|
+
config = good_config(ConfigParserTest)
|
|
67
|
+
options = build_options({validate: true, project: :project3, stage: "production"})
|
|
68
|
+
options.define_singleton_method(:source_commands) {[:validate]}
|
|
66
69
|
assert_raises ParseError do
|
|
67
70
|
File.stub(:exist?, true) do
|
|
68
71
|
ConfigParser.parse(options: options, config: config)
|
|
@@ -71,13 +74,13 @@ module RokuBuilder
|
|
|
71
74
|
end
|
|
72
75
|
|
|
73
76
|
def test_setup_project_config_current
|
|
74
|
-
options = build_options({
|
|
75
|
-
config = good_config
|
|
77
|
+
options = build_options({ validate: true, current: true })
|
|
78
|
+
config = good_config(ConfigParserTest)
|
|
76
79
|
configs = nil
|
|
77
80
|
File.stub(:exist?, true) do
|
|
78
81
|
configs = ConfigParser.parse(options: options, config: config)
|
|
79
82
|
end
|
|
80
|
-
project = configs[:
|
|
83
|
+
project = configs[:project]
|
|
81
84
|
assert_equal Pathname.pwd.to_s, project[:directory]
|
|
82
85
|
assert_equal :current, project[:stage_method]
|
|
83
86
|
assert_nil project[:folders]
|
|
@@ -85,17 +88,19 @@ module RokuBuilder
|
|
|
85
88
|
end
|
|
86
89
|
|
|
87
90
|
def test_setup_project_config_good_project_dir
|
|
88
|
-
config = good_config
|
|
89
|
-
options = build_options({
|
|
91
|
+
config = good_config(ConfigParserTest)
|
|
92
|
+
options = build_options({validate: true, project: :project1, stage: 'production'})
|
|
93
|
+
options.define_singleton_method(:source_commands) {[:validate]}
|
|
90
94
|
File.stub(:exist?, true) do
|
|
91
95
|
ConfigParser.parse(options: options, config: config)
|
|
92
96
|
end
|
|
93
97
|
end
|
|
94
98
|
|
|
95
99
|
def test_setup_project_config_bad_project_dir
|
|
96
|
-
config = good_config
|
|
100
|
+
config = good_config(ConfigParserTest)
|
|
97
101
|
config[:projects][:project1][:directory] = "/dev/null"
|
|
98
|
-
options = build_options({
|
|
102
|
+
options = build_options({validate: true, project: :project1, working: true})
|
|
103
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
99
104
|
assert_raises ParseError do
|
|
100
105
|
File.stub(:exist?, true) do
|
|
101
106
|
ConfigParser.parse(options: options, config: config)
|
|
@@ -104,10 +109,11 @@ module RokuBuilder
|
|
|
104
109
|
end
|
|
105
110
|
|
|
106
111
|
def test_setup_project_config_bad_child_project_dir
|
|
107
|
-
config = good_config
|
|
112
|
+
config = good_config(ConfigParserTest)
|
|
108
113
|
config[:projects][:project_dir] = "/tmp"
|
|
109
114
|
config[:projects][:project1][:directory] = "bad"
|
|
110
|
-
options = build_options({
|
|
115
|
+
options = build_options({validate: true, project: :project1, working: true})
|
|
116
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
111
117
|
assert_raises ParseError do
|
|
112
118
|
File.stub(:exist?, true) do
|
|
113
119
|
ConfigParser.parse(options: options, config: config)
|
|
@@ -116,42 +122,11 @@ module RokuBuilder
|
|
|
116
122
|
end
|
|
117
123
|
|
|
118
124
|
def test_setup_project_config_bad_parent_project_dir
|
|
119
|
-
config = good_config
|
|
125
|
+
config = good_config(ConfigParserTest)
|
|
120
126
|
config[:projects][:project_dir] = "/bad"
|
|
121
127
|
config[:projects][:project1][:directory] = "good"
|
|
122
|
-
options = build_options({
|
|
123
|
-
|
|
124
|
-
File.stub(:exist?, true) do
|
|
125
|
-
ConfigParser.parse(options: options, config: config)
|
|
126
|
-
end
|
|
127
|
-
end
|
|
128
|
-
end
|
|
129
|
-
|
|
130
|
-
def test_setup_stage_config_bad_stage
|
|
131
|
-
config = good_config
|
|
132
|
-
options = build_options({sideload: true, project: :project1, stage: :bad, set_stage: true})
|
|
133
|
-
assert_raises ParseError do
|
|
134
|
-
File.stub(:exist?, true) do
|
|
135
|
-
ConfigParser.parse(options: options, config: config)
|
|
136
|
-
end
|
|
137
|
-
end
|
|
138
|
-
end
|
|
139
|
-
|
|
140
|
-
def test_setup_stage_config_bad_method
|
|
141
|
-
config = good_config
|
|
142
|
-
config[:projects][:project1][:stage_method] = :bad
|
|
143
|
-
options = build_options({sideload: true, project: :project1, set_stage: true})
|
|
144
|
-
assert_raises ParseError do
|
|
145
|
-
File.stub(:exist?, true) do
|
|
146
|
-
ConfigParser.parse(options: options, config: config)
|
|
147
|
-
end
|
|
148
|
-
end
|
|
149
|
-
end
|
|
150
|
-
|
|
151
|
-
def test_setup_stage_config_missing_method
|
|
152
|
-
config = good_config
|
|
153
|
-
config[:projects][:project1][:stage_method] = nil
|
|
154
|
-
options = build_options({sideload: true, project: :project1, set_stage: true})
|
|
128
|
+
options = build_options({validate: true, project: :project1, stage: 'production'})
|
|
129
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
155
130
|
assert_raises ParseError do
|
|
156
131
|
File.stub(:exist?, true) do
|
|
157
132
|
ConfigParser.parse(options: options, config: config)
|
|
@@ -160,38 +135,34 @@ module RokuBuilder
|
|
|
160
135
|
end
|
|
161
136
|
|
|
162
137
|
def test_setup_stage_config_script
|
|
163
|
-
config = good_config
|
|
138
|
+
config = good_config(ConfigParserTest)
|
|
164
139
|
config[:projects][:project1][:stage_method] = :script
|
|
165
140
|
config[:projects][:project1][:stages][:production][:script] = {stage: "script", unstage: "script"}
|
|
166
|
-
options = build_options({stage: "production",
|
|
141
|
+
options = build_options({stage: "production", validate: true})
|
|
142
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
167
143
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
168
|
-
assert_equal parsed[:
|
|
169
|
-
end
|
|
170
|
-
|
|
171
|
-
def test_setup_stage_config_git_ref
|
|
172
|
-
config = good_config
|
|
173
|
-
options = build_options({stage: "production", ref: "git-ref", sideload: true})
|
|
174
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
175
|
-
assert_equal options[:ref], parsed[:stage_config][:key]
|
|
144
|
+
assert_equal parsed[:project][:stages][:production][:script], config[:projects][:project1][:stages][:production][:script]
|
|
176
145
|
end
|
|
177
146
|
|
|
178
147
|
def test_manifest_config_project_select
|
|
179
|
-
options = build_options({
|
|
180
|
-
|
|
148
|
+
options = build_options({ validate: true, working: true })
|
|
149
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
150
|
+
config = good_config(ConfigParserTest)
|
|
181
151
|
configs = nil
|
|
182
152
|
Pathname.stub(:pwd, Pathname.new("/dev/nuller")) do
|
|
183
153
|
configs = ConfigParser.parse(options: options, config: config)
|
|
184
154
|
end
|
|
185
155
|
assert_equal Hash, config.class
|
|
186
|
-
assert_equal
|
|
156
|
+
assert_equal test_files_path(ConfigParserTest), configs[:project][:directory]
|
|
187
157
|
end
|
|
188
158
|
|
|
189
159
|
def test_manifest_config_project_directory
|
|
190
160
|
options = build_options({
|
|
191
|
-
|
|
161
|
+
validate: true,
|
|
192
162
|
working: true
|
|
193
163
|
})
|
|
194
|
-
|
|
164
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
165
|
+
config = good_config(ConfigParserTest)
|
|
195
166
|
config[:projects][:project_dir] = "/tmp"
|
|
196
167
|
config[:projects][:project1][:directory] = "project1"
|
|
197
168
|
config[:projects][:project2][:directory] = "project2"
|
|
@@ -203,12 +174,13 @@ module RokuBuilder
|
|
|
203
174
|
end
|
|
204
175
|
|
|
205
176
|
assert_equal Hash, config.class
|
|
206
|
-
assert_equal "/tmp/project1", configs[:
|
|
177
|
+
assert_equal "/tmp/project1", configs[:project][:directory]
|
|
207
178
|
end
|
|
208
179
|
|
|
209
180
|
def test_manifest_config_project_directory_select
|
|
210
|
-
options = build_options({
|
|
211
|
-
|
|
181
|
+
options = build_options({validate: true, working: true})
|
|
182
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
183
|
+
config = good_config(ConfigParserTest)
|
|
212
184
|
config[:projects][:project_dir] = "/tmp"
|
|
213
185
|
config[:projects][:project1][:directory] = "project1"
|
|
214
186
|
config[:projects][:project2][:directory] = "project2"
|
|
@@ -221,13 +193,14 @@ module RokuBuilder
|
|
|
221
193
|
end
|
|
222
194
|
|
|
223
195
|
assert_equal Hash, config.class
|
|
224
|
-
assert_equal "/tmp/project2", configs[:
|
|
196
|
+
assert_equal "/tmp/project2", configs[:project][:directory]
|
|
225
197
|
end
|
|
226
198
|
|
|
227
199
|
def test_key_config_key_directory
|
|
228
200
|
tmp_file = Tempfile.new("pkg")
|
|
229
|
-
options = build_options({
|
|
230
|
-
|
|
201
|
+
options = build_options({validate: true, project: :project2, stage: 'production'})
|
|
202
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
203
|
+
config = good_config(ConfigParserTest)
|
|
231
204
|
config[:keys][:key_dir] = File.dirname(tmp_file.path)
|
|
232
205
|
config[:keys][:a][:keyed_pkg] = File.basename(tmp_file.path)
|
|
233
206
|
|
|
@@ -240,8 +213,9 @@ module RokuBuilder
|
|
|
240
213
|
|
|
241
214
|
def test_key_config_key_directory_bad
|
|
242
215
|
tmp_file = Tempfile.new("pkg")
|
|
243
|
-
options = build_options({
|
|
244
|
-
|
|
216
|
+
options = build_options({validate: true, project: :project2, stage: 'production'})
|
|
217
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
218
|
+
config = good_config(ConfigParserTest)
|
|
245
219
|
config[:keys][:key_dir] = "/bad"
|
|
246
220
|
config[:keys][:a][:keyed_pkg] = File.basename(tmp_file.path)
|
|
247
221
|
|
|
@@ -252,8 +226,9 @@ module RokuBuilder
|
|
|
252
226
|
|
|
253
227
|
def test_key_config_key_path_bad
|
|
254
228
|
tmp_file = Tempfile.new("pkg")
|
|
255
|
-
options = build_options({
|
|
256
|
-
|
|
229
|
+
options = build_options({validate: true, project: :project2, stage: 'production'})
|
|
230
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
231
|
+
config = good_config(ConfigParserTest)
|
|
257
232
|
config[:keys][:key_dir] = File.dirname(tmp_file.path)
|
|
258
233
|
config[:keys][:a][:keyed_pkg] = File.basename(tmp_file.path)+".bad"
|
|
259
234
|
|
|
@@ -261,72 +236,19 @@ module RokuBuilder
|
|
|
261
236
|
ConfigParser.parse(options: options, config: config)
|
|
262
237
|
end
|
|
263
238
|
end
|
|
264
|
-
|
|
265
239
|
def test_key_config_bad_key
|
|
266
|
-
options = build_options({
|
|
267
|
-
|
|
240
|
+
options = build_options({validate: true, project: :project1, stage: 'production', })
|
|
241
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
242
|
+
config = good_config(ConfigParserTest)
|
|
268
243
|
config[:projects][:project1][:stages][:production][:key] = "bad"
|
|
269
244
|
|
|
270
245
|
assert_raises ParseError do
|
|
271
246
|
ConfigParser.parse(options: options, config: config)
|
|
272
247
|
end
|
|
273
248
|
end
|
|
274
|
-
|
|
275
|
-
def test_setup_sideload_config
|
|
276
|
-
config = good_config
|
|
277
|
-
options = build_options({sideload: true, working: true})
|
|
278
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
279
|
-
|
|
280
|
-
refute_nil parsed[:sideload_config]
|
|
281
|
-
refute_nil parsed[:sideload_config][:content]
|
|
282
|
-
refute_nil parsed[:build_config]
|
|
283
|
-
refute_nil parsed[:build_config][:content]
|
|
284
|
-
refute_nil parsed[:init_params][:loader]
|
|
285
|
-
refute_nil parsed[:init_params][:loader][:root_dir]
|
|
286
|
-
|
|
287
|
-
assert_nil parsed[:sideload_config][:content][:excludes]
|
|
288
|
-
assert_nil parsed[:sideload_config][:update_manifest]
|
|
289
|
-
assert_nil parsed[:sideload_config][:infile]
|
|
290
|
-
end
|
|
291
|
-
def test_setup_sideload_config_exclude
|
|
292
|
-
config = good_config
|
|
293
|
-
config[:projects][:project1][:excludes] = []
|
|
294
|
-
options = build_options({sideload: true, working: true})
|
|
295
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
296
|
-
assert_nil parsed[:sideload_config][:content][:excludes]
|
|
297
|
-
|
|
298
|
-
options = build_options({build: true, working: true})
|
|
299
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
300
|
-
refute_nil parsed[:sideload_config][:content][:excludes]
|
|
301
|
-
|
|
302
|
-
options = build_options({package: true, set_stage: true})
|
|
303
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
304
|
-
refute_nil parsed[:sideload_config][:content][:excludes]
|
|
305
|
-
|
|
306
|
-
options = build_options({sideload: true, working: true, exclude: true})
|
|
307
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
308
|
-
refute_nil parsed[:sideload_config][:content][:excludes]
|
|
309
|
-
end
|
|
310
|
-
|
|
311
|
-
def test_deeplink_app_config
|
|
312
|
-
config = good_config
|
|
313
|
-
options = build_options({deeplink: "a:b", app_id: "xxxxxx"})
|
|
314
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
315
|
-
|
|
316
|
-
assert_equal parsed[:deeplink_config][:options], options[:deeplink]
|
|
317
|
-
assert_equal parsed[:deeplink_config][:app_id], options[:app_id]
|
|
318
|
-
end
|
|
319
|
-
|
|
320
|
-
def test_monitor_config
|
|
321
|
-
config = good_config
|
|
322
|
-
options = build_options({monitor: "main", regexp: "^A$"})
|
|
323
|
-
parsed = ConfigParser.parse(options: options, config: config)
|
|
324
|
-
refute_nil parsed[:monitor_config][:regexp]
|
|
325
|
-
assert parsed[:monitor_config][:regexp].match("A")
|
|
326
|
-
end
|
|
327
249
|
def test_outfile_config_default
|
|
328
|
-
config = good_config
|
|
329
|
-
options = build_options({
|
|
250
|
+
config = good_config(ConfigParserTest)
|
|
251
|
+
options = build_options({validate: true, working: true, out: nil})
|
|
330
252
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
331
253
|
|
|
332
254
|
refute_nil parsed[:out]
|
|
@@ -335,9 +257,9 @@ module RokuBuilder
|
|
|
335
257
|
assert_equal "/tmp", parsed[:out][:folder]
|
|
336
258
|
end
|
|
337
259
|
def test_outfile_config_folder
|
|
338
|
-
config = good_config
|
|
339
|
-
|
|
340
|
-
options
|
|
260
|
+
config = good_config(ConfigParserTest)
|
|
261
|
+
options = build_options({validate: true, working: true, out: "/home/user"})
|
|
262
|
+
options.define_singleton_method(:source_commands){[:validate]}
|
|
341
263
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
342
264
|
refute_nil parsed[:out]
|
|
343
265
|
refute_nil parsed[:out][:folder]
|
|
@@ -345,9 +267,9 @@ module RokuBuilder
|
|
|
345
267
|
assert_equal "/home/user", parsed[:out][:folder]
|
|
346
268
|
end
|
|
347
269
|
def test_outfile_config_pkg
|
|
348
|
-
config = good_config
|
|
270
|
+
config = good_config(ConfigParserTest)
|
|
349
271
|
|
|
350
|
-
options = build_options({
|
|
272
|
+
options = build_options({validate: true, working: true, out: "/home/user/file.pkg"})
|
|
351
273
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
352
274
|
refute_nil parsed[:out]
|
|
353
275
|
refute_nil parsed[:out][:folder]
|
|
@@ -356,9 +278,9 @@ module RokuBuilder
|
|
|
356
278
|
assert_equal "file.pkg", parsed[:out][:file]
|
|
357
279
|
end
|
|
358
280
|
def test_outfile_config_zip
|
|
359
|
-
config = good_config
|
|
281
|
+
config = good_config(ConfigParserTest)
|
|
360
282
|
|
|
361
|
-
options = build_options({
|
|
283
|
+
options = build_options({validate: true, working: true, out: "/home/user/file.zip"})
|
|
362
284
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
363
285
|
refute_nil parsed[:out]
|
|
364
286
|
refute_nil parsed[:out][:folder]
|
|
@@ -367,9 +289,9 @@ module RokuBuilder
|
|
|
367
289
|
assert_equal "file.zip", parsed[:out][:file]
|
|
368
290
|
end
|
|
369
291
|
def test_outfile_config_jpg
|
|
370
|
-
config = good_config
|
|
292
|
+
config = good_config(ConfigParserTest)
|
|
371
293
|
|
|
372
|
-
options = build_options({
|
|
294
|
+
options = build_options({validate: true, working: true, out: "/home/user/file.jpg"})
|
|
373
295
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
374
296
|
refute_nil parsed[:out]
|
|
375
297
|
refute_nil parsed[:out][:folder]
|
|
@@ -378,9 +300,9 @@ module RokuBuilder
|
|
|
378
300
|
assert_equal "file.jpg", parsed[:out][:file]
|
|
379
301
|
end
|
|
380
302
|
def test_outfile_config_default_jpg
|
|
381
|
-
config = good_config
|
|
303
|
+
config = good_config(ConfigParserTest)
|
|
382
304
|
|
|
383
|
-
options = build_options({
|
|
305
|
+
options = build_options({validate: true, working: true, out: "file.jpg"})
|
|
384
306
|
parsed = ConfigParser.parse(options: options, config: config)
|
|
385
307
|
refute_nil parsed[:out]
|
|
386
308
|
refute_nil parsed[:out][:folder]
|