roku_builder 4.20.0 → 4.21.4
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 +16 -0
- data/bin/roku +2 -0
- data/lib/roku_builder.rb +0 -1
- data/lib/roku_builder/plugins/indentation_inspector.rb +31 -27
- data/lib/roku_builder/plugins/line_inspector.rb +1 -1
- data/lib/roku_builder/plugins/loader.rb +8 -4
- data/lib/roku_builder/stager.rb +2 -0
- data/lib/roku_builder/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 893af4ba4855d2ea781043034af83671eff43a10c14ded1648e12e45377cd9aa
|
4
|
+
data.tar.gz: 4f9b84df19799dd6220718b2825d4a597327c63b8c3403432b3e5a9c53542652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13cdd1828544c0580c46507047ae9425a65054e3ade6d6f8ac2f5a149faac60cc59212929b64a9226c57494a80bf1fcfb36540e684ada73df7d1215e0fb68b9d
|
7
|
+
data.tar.gz: e3a7197fbafbf6138b0c5831c21e3640b47d9c4b219c2bde6c924678ff05379d1f7d09490dd4ae06753ef910b57b31816dc70933803784f1fe21fe39ec1ddc41
|
data/.travis.yml
CHANGED
data/CHANGELOG
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
= 4.21.3 =
|
2
|
+
|
3
|
+
- Ignore indentation in multi-line xml comments
|
4
|
+
|
5
|
+
= 4.21.2 =
|
6
|
+
|
7
|
+
- Fix bundler load paths for later versions of ruby
|
8
|
+
|
9
|
+
= 4.21.1 =
|
10
|
+
|
11
|
+
- Add indent-ignore and indent-reset comment processing to analyzer
|
12
|
+
|
13
|
+
= 4.21.0 =
|
14
|
+
|
15
|
+
- Add post stage/unstage hooks
|
16
|
+
|
1
17
|
= 4.20.0 =
|
2
18
|
|
3
19
|
- Add file size warning
|
data/bin/roku
CHANGED
data/lib/roku_builder.rb
CHANGED
@@ -13,11 +13,11 @@ module RokuBuilder
|
|
13
13
|
@ind = 0
|
14
14
|
end
|
15
15
|
|
16
|
-
def check_line(line:, number:)
|
17
|
-
#byebug if number ==
|
16
|
+
def check_line(line:, number:, comment:)
|
17
|
+
#byebug if number == 10 and @path.ends_with?(".brs")
|
18
18
|
set_indentation(line: line)
|
19
19
|
regexp = /^#{@character}{#{@ind}}[^#{@character}]/
|
20
|
-
unless line =~ regexp or line == "\n"
|
20
|
+
unless line =~ regexp or line == "\n" or line =~ /\'indent-ignore/ or comment
|
21
21
|
add_warning(line: number)
|
22
22
|
end
|
23
23
|
@prev_line = line
|
@@ -37,33 +37,37 @@ module RokuBuilder
|
|
37
37
|
end
|
38
38
|
end
|
39
39
|
when :brs
|
40
|
-
if
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
@
|
45
|
-
|
46
|
-
@
|
47
|
-
|
48
|
-
@
|
49
|
-
|
50
|
-
|
40
|
+
if line =~ /'indent-reset/
|
41
|
+
@ind = line.index(/[^#{@character}]/)
|
42
|
+
else
|
43
|
+
if @prev_line
|
44
|
+
if @prev_line =~ /^\'/ or @prev_line =~ /\'indent-ignore/
|
45
|
+
# Don't change indentation
|
46
|
+
elsif @prev_line =~ /[\{\[\(:]$/
|
47
|
+
@ind += @count
|
48
|
+
elsif @prev_line =~ /:\s*\bfunction\b|:\s*\bsub\b/i
|
49
|
+
@ind += @count
|
50
|
+
elsif @prev_line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
|
51
|
+
@ind += @count
|
52
|
+
elsif @prev_line =~ /^\s*#?if\b|^\s*#?else\b/i
|
53
|
+
unless @prev_line =~ /\bthen\b[ \t ]*[^' \r\n']+.*$/i or @prev_line =~ /\breturn\b/i
|
54
|
+
@ind += @count
|
55
|
+
end
|
56
|
+
elsif @prev_line =~ /^\s*\bfor\b|^\s*\bwhile\b/i
|
51
57
|
@ind += @count
|
52
58
|
end
|
53
|
-
elsif @prev_line =~ /^\s*\bfor\b|^\s*\bwhile\b/i
|
54
|
-
@ind += @count
|
55
59
|
end
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
60
|
+
if line =~ /^\'/ or line =~ /\'indent-ignore/
|
61
|
+
# Don't change indentation
|
62
|
+
elsif line =~ /^\s*[\}\]\)]/
|
63
|
+
@ind -= @count
|
64
|
+
elsif line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
|
65
|
+
@ind -= 0
|
66
|
+
elsif line =~ /^\s*:?\s*#?end\b|^\s*#?endif\b|^\s*endfor\b|^\s*\bnext\b/i
|
67
|
+
@ind -= @count
|
68
|
+
elsif line =~ /^\s*#?else\b|^\s*elseif\b/i
|
69
|
+
@ind -= @count
|
70
|
+
end
|
67
71
|
end
|
68
72
|
end
|
69
73
|
end
|
@@ -14,7 +14,6 @@ module RokuBuilder
|
|
14
14
|
in_xml_comment = false
|
15
15
|
indent_inspector = IndentationInspector.new(rules: @indent_config, path: file_path) if @indent_config
|
16
16
|
file.readlines.each_with_index do |line, line_number|
|
17
|
-
indent_inspector.check_line(line: line, number: line_number) if indent_inspector
|
18
17
|
full_line = line.dup
|
19
18
|
line = line.partition("'").first if file_path.end_with?(".brs")
|
20
19
|
if file_path.end_with?(".xml")
|
@@ -28,6 +27,7 @@ module RokuBuilder
|
|
28
27
|
line.gsub!(/<!--.*-->/, "")
|
29
28
|
in_xml_comment = true if line.gsub!(/<!--.*/, "")
|
30
29
|
end
|
30
|
+
indent_inspector.check_line(line: full_line, number: line_number, comment: in_xml_comment) if indent_inspector
|
31
31
|
@inspector_config.each do |line_inspector|
|
32
32
|
line_to_check = line
|
33
33
|
line_to_check = full_line if line_inspector[:include_comments]
|
@@ -7,7 +7,7 @@ module RokuBuilder
|
|
7
7
|
extend Plugin
|
8
8
|
|
9
9
|
def init
|
10
|
-
@warningFileSize =
|
10
|
+
@warningFileSize = 500 * 1024
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.commands
|
@@ -37,6 +37,9 @@ module RokuBuilder
|
|
37
37
|
parser.on("-x", "--exclude", "Apply exclude config to sideload") do
|
38
38
|
options[:exclude] = true
|
39
39
|
end
|
40
|
+
parser.on("--remote-debug", "Sideload will enable remote debug") do
|
41
|
+
options[:remoteDebug] = true
|
42
|
+
end
|
40
43
|
end
|
41
44
|
|
42
45
|
def self.dependencies
|
@@ -52,7 +55,7 @@ module RokuBuilder
|
|
52
55
|
build(options: options)
|
53
56
|
end
|
54
57
|
keep_build_file = is_build_command(options) and options[:out]
|
55
|
-
upload
|
58
|
+
upload(options)
|
56
59
|
# Cleanup
|
57
60
|
File.delete(file_path(:in)) if did_build and not keep_build_file
|
58
61
|
end
|
@@ -99,11 +102,12 @@ module RokuBuilder
|
|
99
102
|
[:sideload, :build].include? options.command
|
100
103
|
end
|
101
104
|
|
102
|
-
def upload
|
105
|
+
def upload(options)
|
103
106
|
payload = {
|
104
107
|
mysubmit: "Replace",
|
105
|
-
archive: Faraday::UploadIO.new(file_path(:in), 'application/zip')
|
108
|
+
archive: Faraday::UploadIO.new(file_path(:in), 'application/zip'),
|
106
109
|
}
|
110
|
+
payload["remotedebug"] = "1" if options[:remoteDebug]
|
107
111
|
response = multipart_connection.post "/plugin_install", payload
|
108
112
|
@logger.debug("Status: #{response.status}, Body: #{response.body}")
|
109
113
|
if response.status==200 and response.body=~/Identical to previous version/
|
data/lib/roku_builder/stager.rb
CHANGED
@@ -53,6 +53,7 @@ module RokuBuilder
|
|
53
53
|
when :plugin
|
54
54
|
@plugin.stage(options: @options)
|
55
55
|
end
|
56
|
+
RokuBuilder.process_hook(hook: "post_stage", params: {config: @config, options: @options})
|
56
57
|
@stage_success
|
57
58
|
end
|
58
59
|
|
@@ -87,6 +88,7 @@ module RokuBuilder
|
|
87
88
|
when :plugin
|
88
89
|
@plugin.unstage(options: @options)
|
89
90
|
end
|
91
|
+
RokuBuilder.process_hook(hook: "post_unstage", params: {config: @config, options: @options})
|
90
92
|
unstage_success
|
91
93
|
end
|
92
94
|
|
data/lib/roku_builder/version.rb
CHANGED
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.
|
4
|
+
version: 4.21.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greeneca
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -616,7 +616,7 @@ homepage: ''
|
|
616
616
|
licenses:
|
617
617
|
- Apache-2.0
|
618
618
|
metadata: {}
|
619
|
-
post_install_message:
|
619
|
+
post_install_message:
|
620
620
|
rdoc_options: []
|
621
621
|
require_paths:
|
622
622
|
- lib
|
@@ -631,9 +631,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
631
631
|
- !ruby/object:Gem::Version
|
632
632
|
version: '0'
|
633
633
|
requirements: []
|
634
|
-
|
635
|
-
|
636
|
-
signing_key:
|
634
|
+
rubygems_version: 3.1.2
|
635
|
+
signing_key:
|
637
636
|
specification_version: 4
|
638
637
|
summary: Build Tool for Roku Apps
|
639
638
|
test_files:
|