Sha256: 508342ca9883b8c0e278a50cddb4e001413ecf18bc4007f31c0eb057db12ba74

Contents?: true

Size: 746 Bytes

Versions: 10

Compression:

Stored size: 746 Bytes

Contents

require 'rails/generators/base'

module Webvalve
  module Generators
    class InstallGenerator < Rails::Generators::Base
      desc "Install WebValve"

      def create_webvalve_config_file
        create_config_file
        create_file "webvalve/.keep", ""
      end

      private

      def create_config_file
        create_file full_file_path, <<-FILE.strip_heredoc
          # # register services
          #
          # WebValve.register FakeThing
          # WebValve.register FakeExample, url: 'https://api.example.org'
          #
          # # whitelist urls
          #
          # WebValve.whitelist_url 'https://example.com'
        FILE
      end

      def full_file_path
        "config/webvalve.rb"
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
webvalve-0.9.9 lib/generators/webvalve/install_generator.rb
webvalve-0.9.8 lib/generators/webvalve/install_generator.rb
webvalve-0.9.7 lib/generators/webvalve/install_generator.rb
webvalve-0.9.6 lib/generators/webvalve/install_generator.rb
webvalve-0.9.5 lib/generators/webvalve/install_generator.rb
webvalve-0.9.4 lib/generators/webvalve/install_generator.rb
webvalve-0.9.3 lib/generators/webvalve/install_generator.rb
webvalve-0.9.2 lib/generators/webvalve/install_generator.rb
webvalve-0.9.1 lib/generators/webvalve/install_generator.rb
webvalve-0.9.0 lib/generators/webvalve/install_generator.rb