Sha256: 2f14a6151a13a3e46d0db0f8eefd9f6027f4ae4479a9bb2e9715d0401c8f5243

Contents?: true

Size: 1.24 KB

Versions: 14

Compression:

Stored size: 1.24 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
      puts @@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

14 entries across 14 versions & 1 rubygems

Version Path
site_hook-0.9.19 lib/site_hook/config_sections.rb
site_hook-0.9.16 lib/site_hook/config_sections.rb
site_hook-0.9.15 lib/site_hook/config_sections.rb
site_hook-0.9.14 lib/site_hook/config_sections.rb
site_hook-0.9.12 lib/site_hook/config_sections.rb
site_hook-0.9.11 lib/site_hook/config_sections.rb
site_hook-0.9.10 lib/site_hook/config_sections.rb
site_hook-0.9.9 lib/site_hook/config_sections.rb
site_hook-0.9.8 lib/site_hook/config_sections.rb
site_hook-0.9.7 lib/site_hook/config_sections.rb
site_hook-0.9.6 lib/site_hook/config_sections.rb
site_hook-0.9.5 lib/site_hook/config_sections.rb
site_hook-0.9.4 lib/site_hook/config_sections.rb
site_hook-0.9.3 lib/site_hook/config_sections.rb