Skip to content

Commit

Permalink
Allow case insensitive checking for RAF patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
greeneca committed Sep 26, 2018
1 parent 602cbea commit 7047b49
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/roku_builder/plugins/analyzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Analyzer < Util

def self.commands
{
analyze: {source: true},
analyze: {source: true, stage: true},
}
end

Expand Down
4 changes: 2 additions & 2 deletions lib/roku_builder/plugins/raf_inspector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
module RokuBuilder

class RafInspector
RAF_INTERFACE_INITIALIZATION_PATTERN = /roku_ads\(\)/
LIBRARY_IMPORT_PATTERN = /\s*library\s*"roku_ads.brs"\s*/
RAF_INTERFACE_INITIALIZATION_PATTERN = /roku_ads\(\)/i
LIBRARY_IMPORT_PATTERN = /\s*library\s*"roku_ads.brs"\s*/i

def initialize(config:, dir:)
@config = config
Expand Down
6 changes: 6 additions & 0 deletions test/roku_builder/plugins/test_analyzer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ def test_raf_proper_intergration
assert_equal 1, warnings.count
assert_match(/integrated properly/, warnings[0][:message])
end
def test_raf_proper_intergration_different_case
use_manifest("manifest_raf")
warnings = test_file(text: "library \"Roku_Ads.brs\"\nRoku_Ads()")
assert_equal 1, warnings.count
assert_match(/integrated properly/, warnings[0][:message])
end
def test_macosx_directory
config = good_config(AnalyzerTest)
config[:projects][:project1][:folders].push("Test__MACOSX")
Expand Down

0 comments on commit 7047b49

Please sign in to comment.