Sha256: 3f7ab290f2f91d67e928f995acc93568b822614763d3b8bc9025bd293d879428

Contents?: true

Size: 996 Bytes

Versions: 5

Compression:

Stored size: 996 Bytes

Contents

require 'rails/generators'

module Gxapi
  class InstallGenerator < Rails::Generators::Base

    # Description
    desc <<DESC
Description:
    Set up config files for Gxapi

DESC

    class_option :account_id,
      type: :string,
      default: nil,
      desc: "Google Analytics Account ID"

    class_option :profile_id,
      type: :string,
      default: nil,
      desc: "Google Analytics Profile ID"

    class_option :web_property_id,
      type: :string,
      default: nil,
      desc: "Google Analytics Web Property ID"

    class_option :email,
      type: :string,
      default: nil,
      desc: "Google Analytics Service Account Email"


    #
    # Our root for template files
    #
    # @return [String]
    def self.source_root
      @source_root ||= File.join(File.dirname(__FILE__), 'templates')
    end

    #
    # Copy our config file over
    #
    # @return [type] [description]
    def copy_config_file
      template "gxapi.yml", "config/gxapi.yml"
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gxapi_rails-0.1.0 lib/generators/gxapi/install_generator.rb
gxapi_rails-0.0.6 lib/generators/gxapi/install_generator.rb
gxapi_rails-0.0.5 lib/generators/gxapi/install_generator.rb
gxapi_rails-0.0.4 lib/generators/gxapi/install_generator.rb
gxapi_rails-0.0.3 lib/generators/gxapi/install_generator.rb