Sha256: bfac291937550c78ff1b8b690c243ddf32d29eaf6a094389a8a82b249118a595

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 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
      end

      def angular_spec_path
        if Rails.env == "test"
          "spec/tmp/spec/javascripts/#{application_name}"
        else
          "spec/javascripts/#{application_name}"
        end
      end

    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
angular_velocity-0.0.5alpha lib/generators/angular_velocity/angular_config.rb
angular_velocity-0.0.4alpha lib/generators/angular_velocity/angular_config.rb