roku_builder 4.21.0 → 4.21.1
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/CHANGELOG +4 -0
- data/lib/roku_builder/plugins/indentation_inspector.rb +30 -26
- data/lib/roku_builder/version.rb +1 -1
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 14e0e8c8c442ff787f466072df4d0ada2940af2211b912fc34483de1a4240dd2
         | 
| 4 | 
            +
              data.tar.gz: 3a080babe3d406b62aace4a74ae296f017f46ce43e9eb39d33c8ccaf0fdb16e1
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: ec5169d5a364464d2c5497af55220501d467625fd89e0bd87af25db03d00ff3c61f6571782ea6267089218e5f57404a33df63fb2bb49d5b8538ee95a24d79c16
         | 
| 7 | 
            +
              data.tar.gz: 7a99072769cf9433d2223b88ed4443ce0be2018a90b5b8c4e38ca37ef93629f926551c00ce99408caf7e014e8fff45c2d08de3df838a1a0e4c58bbdc06914883
         | 
    
        data/CHANGELOG
    CHANGED
    
    
| @@ -14,10 +14,10 @@ module RokuBuilder | |
| 14 14 | 
             
                end
         | 
| 15 15 |  | 
| 16 16 | 
             
                def check_line(line:, number:)
         | 
| 17 | 
            -
                  #byebug if number ==  | 
| 17 | 
            +
                  #byebug if number == 43 and @path.ends_with?("keyEvents.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/
         | 
| 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
         | 
    
        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.21. | 
| 4 | 
            +
              version: 4.21.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - greeneca
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2019- | 
| 11 | 
            +
            date: 2019-09-19 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rubyzip
         |