Sha256: 6c98ab6f5da989c8ecc37baf237f5c0ca5a7c920b58a840114356be35f9738c7

Contents?: true

Size: 550 Bytes

Versions: 17

Compression:

Stored size: 550 Bytes

Contents

class Terraspace::Compiler::Builder
  class Skip
    def initialize(mod, src_path)
      @mod, @src_path = mod, src_path
    end

    def check?
      return true unless File.file?(@src_path)

      # skip certain folders
      check_dirs?(
        "config/args",
        "config/helpers",
        "config/hooks",
        "test",
        "tfvars",
      )
    end

    def check_dirs?(*names)
      names.flatten.detect { |name| check_dir?(name) }
    end

    def check_dir?(name)
      @src_path.include?("#{@mod.root}/#{name}/")
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
terraspace-1.0.6 lib/terraspace/compiler/builder/skip.rb
terraspace-1.0.5 lib/terraspace/compiler/builder/skip.rb
terraspace-1.0.4 lib/terraspace/compiler/builder/skip.rb
terraspace-1.0.3 lib/terraspace/compiler/builder/skip.rb
terraspace-1.0.2 lib/terraspace/compiler/builder/skip.rb
terraspace-1.0.1 lib/terraspace/compiler/builder/skip.rb
terraspace-1.0.0 lib/terraspace/compiler/builder/skip.rb
terraspace-0.7.2 lib/terraspace/compiler/builder/skip.rb
terraspace-0.7.1 lib/terraspace/compiler/builder/skip.rb
terraspace-0.7.0 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.23 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.22 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.21 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.20 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.19 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.18 lib/terraspace/compiler/builder/skip.rb
terraspace-0.6.17 lib/terraspace/compiler/builder/skip.rb