Sha256: a91350869bcfd505a6bf643da6d6d00f029ec0b1a9421bbea11746836a5b224f

Contents?: true

Size: 443 Bytes

Versions: 7

Compression:

Stored size: 443 Bytes

Contents

module Curupira
  module Generators
    class RoutesGenerator < Rails::Generators::Base
      source_root File.expand_path('../templates', __FILE__)

      def inject_routes_into_application_routes
        route(curupira_routes)
      end

      private

      def curupira_routes
        File.read(routes_file_path)
      end

      def routes_file_path
        File.expand_path(find_in_source_paths('routes.rb'))
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
curupira-0.1.7 lib/generators/curupira/routes/routes_generator.rb
curupira-0.1.6 lib/generators/curupira/routes/routes_generator.rb
curupira-0.1.4 lib/generators/curupira/routes/routes_generator.rb
curupira-0.1.3 lib/generators/curupira/routes/routes_generator.rb
curupira-0.1.2 lib/generators/curupira/routes/routes_generator.rb
curupira-0.1.1 lib/generators/curupira/routes/routes_generator.rb
curupira-0.1.0 lib/generators/curupira/routes/routes_generator.rb