AndyObtiva/abstract_feature_branch

View on GitHub
lib/generators/abstract_feature_branch/context_generator.rb

Summary

Maintainability
A
0 mins
Test Coverage
module AbstractFeatureBranch
  module Generators
    class ContextGenerator < Rails::Generators::NamedBase
      source_root File.expand_path("../../templates", __FILE__)

      desc "Creates a configuration file for a specific application context (e.g. admin). Takes context path as argument (e.g. admin or internal/wiki) to create config/features/[context_path].yml"
      def copy_config
        template "config/features.yml", "config/features/#{file_path}.yml"
      end
    end
  end
end