Sha256: 152c7921a6c421f3866b4cacf2e695d9e8d1ba0ee87889acc8fc5e93a90ee713

Contents?: true

Size: 858 Bytes

Versions: 2

Compression:

Stored size: 858 Bytes

Contents

module AngularVelocity
  module Generators
    module AngularConfig

      def application_name
        if defined?(Rails) && Rails.application
          "#{Rails.application.class.name.split('::').first}App"
        else
          "App"
        end     
      end

      def angular_path
        path = ""
        if Rails.env == "test"
          path = "spec/tmp/app/assets/javascripts/#{application_name}"
        else
          path = "app/assets/javascripts/#{application_name}"
        end
        path = Rails.root.join(path)
        path
      end

      def angular_spec_path
        path = ""
        if Rails.env == "test"
          path =  "spec/tmp/spec/javascripts/#{application_name}"
        else
          path ="spec/javascripts/#{application_name}"
        end
        path = Rails.root.join(path)
        path
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
angular_velocity-1.0.0 lib/generators/angular_velocity/angular_config.rb
angular_velocity-0.0.6alpha lib/generators/angular_velocity/angular_config.rb