Module: Opsk::Thorable
- Included in:
- Bump, Clean, Deploy, Dockerize, GenerateChef, GeneratePuppet, Module, Package
- Defined in:
- lib/opskeleton/thorable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/opskeleton/thorable.rb', line 3 def self.included klass def klass.source_root # during dev time if(File.dirname(__FILE__) == './bin') File.dirname('.') else "#{File.dirname(__FILE__)}/../../" end end end |
Instance Method Details
#artifact ⇒ Object
28 29 30 |
# File 'lib/opskeleton/thorable.rb', line 28 def artifact "#{name}-#{.version}" end |
#artifact_path ⇒ Object
32 33 34 |
# File 'lib/opskeleton/thorable.rb', line 32 def artifact_path "pkg/#{name}-#{.version}" end |
#meta ⇒ Object
14 15 16 |
# File 'lib/opskeleton/thorable.rb', line 14 def OpenStruct.new(YAML.load_file('opsk.yaml')) end |
#name ⇒ Object
24 25 26 |
# File 'lib/opskeleton/thorable.rb', line 24 def name "#{.name}-sandbox" end |
#type_of ⇒ Object
18 19 20 21 22 |
# File 'lib/opskeleton/thorable.rb', line 18 def type_of return :puppet if .includes.include?('Puppetfile') return :chef if .includes.include?('Cheffile') raise Exception.new('no matching provisoner type found, make sure to include Cheffile or Pupppetfile in opsk.yaml') end |