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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ef52ed909a9cc810fa55beb4d154d59875801f76e3728c67f74293dfcb78808
4
- data.tar.gz: 119c6d54e81b0a3a2aeb8d181638f62b0f123b1cb94327e91f689a72633ee870
3
+ metadata.gz: 893af4ba4855d2ea781043034af83671eff43a10c14ded1648e12e45377cd9aa
4
+ data.tar.gz: 4f9b84df19799dd6220718b2825d4a597327c63b8c3403432b3e5a9c53542652
5
5
  SHA512:
6
- metadata.gz: 25444826c215fa90d046037bf13f71a8e04cd9f5022d545bedae812c826e94e7dc6bc9cf6e78b55642949a317189bbd2cbfc8938ea9fab8bf0df869c1b1aab9f
7
- data.tar.gz: c64d613765174f9ff075502de653c709195520ed104419dd118660bb27f1ae4d8e1ed7bb05076caf023b5ee05857cdafaa86c9e18c05ce8a22bc0a733ab4eb94
6
+ metadata.gz: 13cdd1828544c0580c46507047ae9425a65054e3ade6d6f8ac2f5a149faac60cc59212929b64a9226c57494a80bf1fcfb36540e684ada73df7d1215e0fb68b9d
7
+ data.tar.gz: e3a7197fbafbf6138b0c5831c21e3640b47d9c4b219c2bde6c924678ff05379d1f7d09490dd4ae06753ef910b57b31816dc70933803784f1fe21fe39ec1ddc41
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
2
  rvm:
3
- - "2.4.1"
3
+ - "2.6.0"
4
4
  before_install:
5
5
  - gem install bundler
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
@@ -4,6 +4,8 @@
4
4
  $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
5
5
 
6
6
  #require "byebug"
7
+ require "rubygems"
8
+ require "bundler/setup"
7
9
  require "roku_builder"
8
10
 
9
11
  RokuBuilder.run()
@@ -4,7 +4,6 @@ require "logger"
4
4
  require "faraday"
5
5
  require "faraday/digestauth"
6
6
  require "pathname"
7
- require "rubygems"
8
7
  require "optparse"
9
8
  require "pathname"
10
9
  require "net/ping"
@@ -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 == 191 and @path.ends_with?("EpisodeGuide.animation.brs")
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 @prev_line
41
- if @prev_line =~ /^\'/
42
- # Don't change indentation
43
- elsif @prev_line =~ /[\{\[\(:]$/
44
- @ind += @count
45
- elsif @prev_line =~ /:\s*\bfunction\b|:\s*\bsub\b/i
46
- @ind += @count
47
- elsif @prev_line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
48
- @ind += @count
49
- elsif @prev_line =~ /^\s*#?if\b|^\s*#?else\b/i
50
- unless @prev_line =~ /\bthen\b[ \t ]*[^' \r\n']+.*$/i or @prev_line =~ /\breturn\b/i
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
- end
57
- if line =~ /^\'/
58
- # Don't change indentation
59
- elsif line =~ /^\s*[\}\]\)]/
60
- @ind -= @count
61
- elsif line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
62
- @ind -= 0
63
- elsif line =~ /^\s*:?\s*#?end\b|^\s*#?endif\b|^\s*endfor\b|^\s*\bnext\b/i
64
- @ind -= @count
65
- elsif line =~ /^\s*#?else\b|^\s*elseif\b/i
66
- @ind -= @count
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 = 250 * 1024
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/
@@ -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
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.20.0"
5
+ VERSION = "4.21.4"
6
6
  end
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.20.0
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: 2019-07-30 00:00:00.000000000 Z
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
- rubyforge_project:
635
- rubygems_version: 2.7.9
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: