Project

General

Profile

Download (689 Bytes) Statistics
| Branch: | Tag: | Revision:

runcible / lib / runcible / models / puppet_distributor.rb @ 5fcde76f

1
require 'active_support/json'
2
require 'securerandom'
3

    
4
module Runcible
5
  module Models
6
    class PuppetDistributor < Distributor
7
      attr_accessor 'serve_http', 'serve_https', 'http_dir', 'https_dir', 'absolute_path'
8

    
9
      def initialize(absolute_path, http, https, params = {})
10
        @absolute_path = absolute_path
11
        @serve_http = http
12
        @serve_https = https
13
        super(params)
14
      end
15

    
16
      def self.type_id
17
        'puppet_distributor'
18
      end
19

    
20
      def config
21
        to_ret = self.as_json
22
        to_ret.delete('absolute_path') if absolute_path.nil?
23
        to_ret.delete('auto_publish')
24
        to_ret.delete('id')
25
        to_ret
26
      end
27
    end
28
  end
29
end