Sha256: 092064b59d59453875be5908113491b861c7765eeacd3fc35d9e3e1281caf72c

Contents?: true

Size: 1.23 KB

Versions: 32

Compression:

Stored size: 1.23 KB

Contents

module SiteHook
  class ConfigSections
    def self.all_samples
      sections = self.constants
      @@sample = []
      sections.each do |section|
        @@sample << self.const_get(section).sample
      end
      @@sample
    end
    class Webhook
      def self.sample
        <<~WEBHOOK
          webhook:
            host: 127.0.0.1
            port: 9090

        WEBHOOK
      end

    end
    class LogLevels
      def self.sample
        <<~LOGLEVELS
          log_levels:
            # unknown, fatal, error, warn, info, debug
            app: info
            build: info
            git: info
            hook: info

        LOGLEVELS
      end
    end
    class Cli
      def self.sample
        <<~CLI
          cli:
            config:
              mkpass:
                length: 20
                symbols: false

        CLI
      end
    end
    class Projects
      def self.sample
        <<~PROJECTS
          projects:
            project1:
              config: _config.yml
              src: /path/2/site/source
              dst: /path/2/build/destination
              host: github.com
              repo: some/repo
              hookpass: SOMESECRETSTRING
              private: false

        PROJECTS
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
site_hook-1.0.10 lib/site_hook/config_sections.rb
site_hook-1.0.9 lib/site_hook/config_sections.rb
site_hook-1.0.8 lib/site_hook/config_sections.rb
site_hook-1.0.7 lib/site_hook/config_sections.rb
site_hook-1.0.6 lib/site_hook/config_sections.rb
site_hook-1.0.5 lib/site_hook/config_sections.rb
site_hook-1.0.4 lib/site_hook/config_sections.rb
site_hook-1.0.3 lib/site_hook/config_sections.rb
site_hook-1.0.2 lib/site_hook/config_sections.rb
site_hook-1.0.1 lib/site_hook/config_sections.rb
site_hook-1.0.0 lib/site_hook/config_sections.rb
site_hook-0.9.20 lib/site_hook/config_sections.rb