roku_builder 4.19.0 → 4.20.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: a19b010daf466fc04893161c9375fac06b38e952427e0c77bfa7f9bea6a395b3
4
- data.tar.gz: aa0c2b56856f2136205ae96ec7dab84ce25b6a18589bf6836521e7ed2494ec84
3
+ metadata.gz: 7ef52ed909a9cc810fa55beb4d154d59875801f76e3728c67f74293dfcb78808
4
+ data.tar.gz: 119c6d54e81b0a3a2aeb8d181638f62b0f123b1cb94327e91f689a72633ee870
5
5
  SHA512:
6
- metadata.gz: 8abdc24044e21e2a76fe862ef9138c6df175f46aa146eecda545a32b8614ab34a88796dc3c57c2c06209d39ff5c3943eefb076104daa34c7e3a1d1bad6e62615
7
- data.tar.gz: 41ba6625e8c97be5dbc17a48200be69c041d363f8195d7281204c8774bb333760121948f2b6a3de5ec8523204e24cfa39edf85ef539e2f5ff5c5208c5835865a
6
+ metadata.gz: 25444826c215fa90d046037bf13f71a8e04cd9f5022d545bedae812c826e94e7dc6bc9cf6e78b55642949a317189bbd2cbfc8938ea9fab8bf0df869c1b1aab9f
7
+ data.tar.gz: c64d613765174f9ff075502de653c709195520ed104419dd118660bb27f1ae4d8e1ed7bb05076caf023b5ee05857cdafaa86c9e18c05ce8a22bc0a733ab4eb94
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = 4.20.0 =
2
+
3
+ - Add file size warning
4
+
1
5
  = 4.19.0 =
2
6
 
3
7
  - Add pkg file size check. Package command now fails if the pkg file is
@@ -6,6 +6,10 @@ module RokuBuilder
6
6
  class Loader < Util
7
7
  extend Plugin
8
8
 
9
+ def init
10
+ @warningFileSize = 250 * 1024
11
+ end
12
+
9
13
  def self.commands
10
14
  {
11
15
  sideload: {source: true, device: true, stage: true},
@@ -153,6 +157,10 @@ module RokuBuilder
153
157
  else
154
158
  unless excludes.include?(zipFilePath)
155
159
  if File.exist?(diskFilePath)
160
+ if File.size(diskFilePath) > @warningFileSize
161
+ ignorePath = File.join(File.dirname(diskFilePath), "ignoreSize_"+File.basename(diskFilePath))
162
+ @logger.warn "Adding Large File: #{diskFilePath}" unless File.exist?(ignorePath)
163
+ end
156
164
  # Deny filetypes that aren't compatible with Roku to avoid Certification issues.
157
165
  if !zipFilePath.end_with?(".pkg", ".md", ".zip")
158
166
  io.get_output_stream(zipFilePath) { |f| f.puts(File.open(diskFilePath, "rb").read()) }
@@ -161,9 +161,13 @@ module RokuBuilder
161
161
  out_file = File.join(@config.out[:folder], @config.out[:file])
162
162
  out_file = out_file+".pkg" unless out_file.end_with?(".pkg")
163
163
  File.open(out_file, 'w+b') {|fp| fp.write(response.body)}
164
- pkg_size = File.size(out_file).to_f / 2**20
165
- raise ExecutionError, "PKG file size is too large (#{pkg_size.round(2)} MB): #{out_file}" if pkg_size > 4.0
166
- @logger.info("Outfile: #{out_file}")
164
+ if File.exist?(out_file)
165
+ pkg_size = File.size(out_file).to_f / 2**20
166
+ raise ExecutionError, "PKG file size is too large (#{pkg_size.round(2)} MB): #{out_file}" if pkg_size > 4.0
167
+ @logger.info("Outfile: #{out_file}")
168
+ else
169
+ @logger.warn("Outfile Missing: #{out_file}")
170
+ end
167
171
  end
168
172
 
169
173
  # Uses the device to generate a new signing key
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.19.0"
5
+ VERSION = "4.20.0"
6
6
  end
@@ -94,7 +94,7 @@ module RokuBuilder
94
94
 
95
95
  logger.expect(:debug, nil, [String])
96
96
  io.expect(:each_line, nil)
97
- logger.expect(:info, nil) do |message|
97
+ logger.expect(:warn, nil) do |message|
98
98
  assert_match(/#{tmp_folder}/, message)
99
99
  end
100
100
 
@@ -142,7 +142,7 @@ module RokuBuilder
142
142
 
143
143
  logger.expect(:debug, nil, [String])
144
144
  io.expect(:each_line, nil)
145
- logger.expect(:info, nil) do |message|
145
+ logger.expect(:warn, nil) do |message|
146
146
  assert_match(/#{tmp_folder}/, message)
147
147
  end
148
148
 
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.19.0
4
+ version: 4.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2019-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip