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.30 lib/site_hook/config_sections.rb
site_hook-1.0.29 lib/site_hook/config_sections.rb
site_hook-1.0.28 lib/site_hook/config_sections.rb
site_hook-1.0.27 lib/site_hook/config_sections.rb
site_hook-1.0.26 lib/site_hook/config_sections.rb
site_hook-1.0.25 lib/site_hook/config_sections.rb
site_hook-1.0.24 lib/site_hook/config_sections.rb
site_hook-1.0.23 lib/site_hook/config_sections.rb
site_hook-1.0.22 lib/site_hook/config_sections.rb
site_hook-1.0.21 lib/site_hook/config_sections.rb
site_hook-1.0.20 lib/site_hook/config_sections.rb
site_hook-1.0.19 lib/site_hook/config_sections.rb
site_hook-1.0.18 lib/site_hook/config_sections.rb
site_hook-1.0.17 lib/site_hook/config_sections.rb
site_hook-1.0.16 lib/site_hook/config_sections.rb
site_hook-1.0.15 lib/site_hook/config_sections.rb
site_hook-1.0.14 lib/site_hook/config_sections.rb
site_hook-1.0.13 lib/site_hook/config_sections.rb
site_hook-1.0.12 lib/site_hook/config_sections.rb
site_hook-1.0.11 lib/site_hook/config_sections.rb