Class: Configuration
- Inherits:
-
Object
- Object
- Configuration
- Defined in:
- lib/vraptor-scaffold/configuration.rb
Constant Summary collapse
- MAIN_SRC =
"src/main/java"
- MAIN_RESOURCES =
"src/main/resources"
- TEST_SRC =
"src/test/java"
- TEST_RESOURCES =
"src/test/resources"
- WEB_APP =
"src/main/webapp"
- FRONTEND =
"#{WEB_APP}/templates"
- JAVASCRIPTS =
"#{WEB_APP}/javascripts"
- STYLESHEETS =
"#{WEB_APP}/stylesheets"
- IMAGES =
"#{WEB_APP}/images"
- WEB_INF =
"#{WEB_APP}/WEB-INF"
- META_INF =
"#{WEB_APP}/META-INF"
- FILENAME =
"#{META_INF}/vraptor-scaffold.properties"
Class Method Summary collapse
- .config ⇒ Object
- .controllers_package ⇒ Object
- .full_models_package ⇒ Object
- .hibernate? ⇒ Boolean
- .main_class_path(*path) ⇒ Object
- .models_package ⇒ Object
- .orm ⇒ Object
- .package ⇒ Object
- .repositories_package ⇒ Object
- .test_class_path(*path) ⇒ Object
Class Method Details
.config ⇒ Object
15 16 17 |
# File 'lib/vraptor-scaffold/configuration.rb', line 15 def self.config YAML.load_file FILENAME end |
.controllers_package ⇒ Object
27 28 29 |
# File 'lib/vraptor-scaffold/configuration.rb', line 27 def self.controllers_package config["controllers_package"] ? config["controllers_package"] : 'controllers' end |
.full_models_package ⇒ Object
35 36 37 |
# File 'lib/vraptor-scaffold/configuration.rb', line 35 def self.full_models_package "#{package}.#{models_package}" end |
.hibernate? ⇒ Boolean
43 44 45 |
# File 'lib/vraptor-scaffold/configuration.rb', line 43 def self.hibernate? orm.eql? "hibernate" end |
.main_class_path(*path) ⇒ Object
47 48 49 |
# File 'lib/vraptor-scaffold/configuration.rb', line 47 def self.main_class_path *path File.join MAIN_SRC, package.gsub(".", File::Separator), path end |
.models_package ⇒ Object
23 24 25 |
# File 'lib/vraptor-scaffold/configuration.rb', line 23 def self.models_package config["models_package"] ? config["models_package"] : 'models' end |
.orm ⇒ Object
39 40 41 |
# File 'lib/vraptor-scaffold/configuration.rb', line 39 def self.orm config["orm"] ? config["orm"] : 'jpa' end |
.package ⇒ Object
19 20 21 |
# File 'lib/vraptor-scaffold/configuration.rb', line 19 def self.package config["package"] ? config["package"] : 'app' end |
.repositories_package ⇒ Object
31 32 33 |
# File 'lib/vraptor-scaffold/configuration.rb', line 31 def self.repositories_package config["repositories_package"] ? config["repositories_package"] : 'repositories' end |
.test_class_path(*path) ⇒ Object
51 52 53 |
# File 'lib/vraptor-scaffold/configuration.rb', line 51 def self.test_class_path *path File.join TEST_SRC, package.gsub(".", File::Separator), path end |