roku_builder 4.24.0 → 4.25.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b072e460501a9671d72c7014a21bfb00754563439d6e9bef567988c51607a362
4
- data.tar.gz: 3ee7363cd19dfdb08217498c107508299e26f692a4dfb040846e14cfc4402411
3
+ metadata.gz: 52c0b3b6cb2daf28a09b46b92395b0031dca520af02ff829622a914a554931d3
4
+ data.tar.gz: 7b47eb73a7a97578d564709f020ac1c8a831a406fc1e076406c2905b78d0c091
5
5
  SHA512:
6
- metadata.gz: 5f4eee2ac6a7a516c508a1339ea70bc941c66901744322fe27ce743ec161649fe7623141d04458d330edf473a063775a5ffe6513414dea607336e1af26b69577
7
- data.tar.gz: 45de05bd19128a26f5443104c84535bf1ca0466de87efb94c177854dd871ae344c04391b4e1e50870177b30b8fc84a2e7587506ee29bffdd6010eb05bc55efaa
6
+ metadata.gz: 9bca38fa14d587fdacefcd43e259c7f8549609cd1dd2658913155a021070eae6208995acfca424e936bc62462e316383ab2fa9a5eadaeae839d892820da43c0b
7
+ data.tar.gz: 631b044f84ea498713fa8bbfeb74822dab2eede5788ce2dcd46c98385b85daff495841bb7bda3ebeddb1648a08986539b5ee01892584cba5f800f7ec4c35ecca
@@ -15,9 +15,9 @@ module RokuBuilder
15
15
  cleanup_uuid_script
16
16
  end
17
17
  def test_sideload
18
- output = `#{roku} --sideload --stage production`
18
+ output = `#{roku} --sideload --stage production -V`
19
19
  assert_log @uuid
20
- refute_match(/WARN: Missing File/, output)
20
+ refute_match(/INFO: Missing File/, output)
21
21
  end
22
22
  def test_delete
23
23
  `#{roku} --sideload --working`
@@ -17,8 +17,8 @@ module RokuBuilder
17
17
  def test_package
18
18
  target = File.join(testfiles_path(PackagerIntergrationTest), "pkg.pkg")
19
19
  FileUtils.rm(target) if File.exist?(target)
20
- output = `#{roku} --package --stage production --out #{target}`
21
- refute_match(/WARN: Missing File/, output)
20
+ output = `#{roku} --package --stage production --out #{target} -V`
21
+ refute_match(/INFO: Missing File/, output)
22
22
  wait_assert {File.exist?(target)}
23
23
  refute File.exist?(target+".zip")
24
24
  FileUtils.rm(target) if File.exist?(target)
@@ -27,7 +27,7 @@ module RokuBuilder
27
27
  target = File.join(testfiles_path(PackagerIntergrationTest), "pkg.pkg")
28
28
  FileUtils.rm(target) if File.exist?(target)
29
29
  output = `#{roku} --package --stage production --out #{target} -V`
30
- refute_match(/WARN: Missing File/, output)
30
+ refute_match(/INFO: Missing File/, output)
31
31
  assert_match(/#{target}/, output)
32
32
  wait_assert {File.exist?(target)}
33
33
  refute File.exist?(target+".zip")
@@ -40,6 +40,9 @@ module RokuBuilder
40
40
  parser.on("--remote-debug", "Sideload will enable remote debug") do
41
41
  options[:remoteDebug] = true
42
42
  end
43
+ parser.on("--build-dir DIR", "The directory to load files from when building the app") do |dir|
44
+ options[:build_dir] = dir
45
+ end
43
46
  end
44
47
 
45
48
  def self.dependencies
@@ -48,7 +51,6 @@ module RokuBuilder
48
51
 
49
52
  # Sideload an app onto a roku device
50
53
  def sideload(options:)
51
- delete(options: options, ignoreFailure: true)
52
54
  did_build = false
53
55
  unless options[:in]
54
56
  did_build = true
@@ -142,7 +144,7 @@ module RokuBuilder
142
144
  path = file_path(:out)
143
145
  File.delete(path) if File.exist?(path)
144
146
  io = Zip::File.open(path, Zip::File::CREATE)
145
- writeEntries(@config.parsed[:root_dir], content[:source_files], "", content[:excludes], io)
147
+ writeEntries(build_dir, content[:source_files], "", content[:excludes], io)
146
148
  io.close()
147
149
  end
148
150
 
@@ -173,7 +175,7 @@ module RokuBuilder
173
175
  @logger.warn "Ignored file with invalid Roku filetype " + File.basename(diskFilePath)
174
176
  end
175
177
  else
176
- @logger.warn "Missing File: #{diskFilePath}"
178
+ @logger.info "Missing File: #{diskFilePath}"
177
179
  end
178
180
  end
179
181
  end
@@ -188,6 +190,11 @@ module RokuBuilder
188
190
  end
189
191
  end
190
192
  end
193
+ def build_dir
194
+ dir = @options[:build_dir]
195
+ dir ||= @config.parsed[:root_dir]
196
+ dir
197
+ end
191
198
  end
192
199
  RokuBuilder.register_plugin(Loader)
193
200
  end
@@ -138,8 +138,8 @@ module RokuBuilder
138
138
  lines = get_command_response(command: "sgnodes all", start_reg: start_reg, end_reg: end_reg)
139
139
  xml_string = lines.join("\n")
140
140
  stats = {"Total" => {count: 0}}
141
- doc = Oga.parse_xml(xml_string)
142
- handle_node(stats: stats, node: doc.children.first)
141
+ doc = Nokogiri::XML(xml_string)
142
+ handle_node(stats: stats, node: doc.root)
143
143
  stats
144
144
  end
145
145
 
@@ -171,8 +171,7 @@ module RokuBuilder
171
171
 
172
172
  def handle_node(stats:, node:)
173
173
  if node
174
- node.children.each do |element|
175
- next unless element.class == Oga::XML::Element
174
+ node.element_children.each do |element|
176
175
  attributes = element.attributes.map{|attr| {"#{attr.name}": attr.value}}.reduce({}, :merge)
177
176
  stats[element.name] ||= {count: 0, ids: []}
178
177
  stats[element.name][:count] += 1
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.24.0"
5
+ VERSION = "4.25.0"
6
6
  end
data/lib/roku_builder.rb CHANGED
@@ -13,7 +13,7 @@ require 'json'
13
13
  require 'pstore'
14
14
  require "git"
15
15
  #profiler
16
- require 'oga'
16
+ require 'nokogiri'
17
17
  #navigator
18
18
  require 'io/console'
19
19
  #monitor
data/roku_builder.gemspec CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency "git", "~> 1.3"
27
27
  spec.add_dependency "net-ping", "~> 2.0"
28
28
  spec.add_dependency "net-telnet", "~> 0.1"
29
- spec.add_dependency "oga", "~> 2.11"
29
+ spec.add_dependency "nokogiri", "~> 1.12"
30
30
  spec.add_dependency "win32-security", "~> 0.5" # For windows compatibility
31
31
  spec.add_dependency "image_size", "~> 2.0"
32
32
 
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.24.0
4
+ version: 4.25.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-06 00:00:00.000000000 Z
11
+ date: 2022-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip
@@ -95,19 +95,19 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0.1'
97
97
  - !ruby/object:Gem::Dependency
98
- name: oga
98
+ name: nokogiri
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '2.11'
103
+ version: '1.12'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '2.11'
110
+ version: '1.12'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: win32-security
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -633,7 +633,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
633
633
  - !ruby/object:Gem::Version
634
634
  version: '0'
635
635
  requirements: []
636
- rubygems_version: 3.2.3
636
+ rubygems_version: 3.3.4
637
637
  signing_key:
638
638
  specification_version: 4
639
639
  summary: Build Tool for Roku Apps