Sha256: a916d860cef2a5fce06be20b8132e8214f06cc4ca386a8430b6346e7b510346d

Contents?: true

Size: 262 Bytes

Versions: 104

Compression:

Stored size: 262 Bytes

Contents

module Terraspace::Compiler
  module Basename
    def basename(path)
      # double escape of \\w is tricky
      regexp = Regexp.new(".*(app|vendor)\/\\w+\/#{@mod.name}\/")
      path.sub(%r{.*config/terraform/}, '')
          .sub(regexp,'')
    end
  end
end

Version data entries

104 entries across 104 versions & 1 rubygems

Version Path
terraspace-2.2.17 lib/terraspace/compiler/basename.rb
terraspace-2.2.16 lib/terraspace/compiler/basename.rb
terraspace-2.2.15 lib/terraspace/compiler/basename.rb
terraspace-2.2.14 lib/terraspace/compiler/basename.rb
terraspace-2.2.13 lib/terraspace/compiler/basename.rb
terraspace-2.2.12 lib/terraspace/compiler/basename.rb
terraspace-2.2.11 lib/terraspace/compiler/basename.rb
terraspace-2.2.10 lib/terraspace/compiler/basename.rb
terraspace-2.2.9 lib/terraspace/compiler/basename.rb
terraspace-2.2.8 lib/terraspace/compiler/basename.rb
terraspace-2.2.7 lib/terraspace/compiler/basename.rb
terraspace-2.2.6 lib/terraspace/compiler/basename.rb
terraspace-2.2.5 lib/terraspace/compiler/basename.rb
terraspace-2.2.4 lib/terraspace/compiler/basename.rb
terraspace-2.2.3 lib/terraspace/compiler/basename.rb
terraspace-2.2.2 lib/terraspace/compiler/basename.rb
terraspace-2.2.1 lib/terraspace/compiler/basename.rb
terraspace-2.2.0 lib/terraspace/compiler/basename.rb
terraspace-2.1.7 lib/terraspace/compiler/basename.rb
terraspace-2.1.6 lib/terraspace/compiler/basename.rb