Class: GaeDependencies
- Inherits:
-
Object
- Object
- GaeDependencies
- Defined in:
- lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #append_freemarker_dependency_if_necessary(dependencies) ⇒ Object
- #compile_scope ⇒ Object
- #default_dependencies ⇒ Object
-
#initialize(options) ⇒ GaeDependencies
constructor
A new instance of GaeDependencies.
- #provided_scope ⇒ Object
- #test_scope ⇒ Object
Constructor Details
#initialize(options) ⇒ GaeDependencies
Returns a new instance of GaeDependencies.
5 6 7 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 5 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 3 def @options end |
Instance Method Details
#append_freemarker_dependency_if_necessary(dependencies) ⇒ Object
45 46 47 48 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 45 def append_freemarker_dependency_if_necessary dependencies dependencies << Dependency.new("org.freemarker", "freemarker", "2.3.18") if @options[:template_engine] == 'ftl' dependencies end |
#compile_scope ⇒ Object
9 10 11 12 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 9 def compile_scope dependencies = append_freemarker_dependency_if_necessary default_dependencies dependencies end |
#default_dependencies ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 24 def default_dependencies dependencies = [Dependency.new("br.com.caelum", "vraptor", "3.4.1", [Dependency.new("org.objenesis", "objenesis")]), Dependency.new("opensymphony", "sitemesh", "2.4.2"), Dependency.new("javax.servlet", "jstl", "1.2"), Dependency.new("org.hibernate", "hibernate-validator", "4.2.0.Final"), Dependency.new("joda-time", "joda-time", "2.0"), Dependency.new("com.thoughtworks.xstream", "xstream", "1.4.1")] appengine_version = "1.7.2.1" dependencies += [Dependency.new("com.googlecode.objectify", "objectify", "3.1"), Dependency.new("br.com.caelum", "vraptor3.4-compatible-gae", "1.1"), Dependency.new("commons-fileupload", "commons-fileupload", "1.2.2"), Dependency.new("com.google.appengine", "appengine-api-1.0-sdk", appengine_version), Dependency.new("com.google.appengine", "appengine-api-labs", appengine_version), Dependency.new("com.google.appengine", "appengine-jsr107cache", appengine_version), Dependency.new("net.sf.jsr107cache", "jsr107cache", "1.1"), Dependency.new("org.apache.geronimo.specs", "geronimo-jpa_3.0_spec", "1.1.1")] dependencies end |
#provided_scope ⇒ Object
20 21 22 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 20 def provided_scope [Dependency.new("javax.servlet", "servlet-api", "2.5"), Dependency.new("javax.servlet.jsp", "jsp-api", "2.1")] end |
#test_scope ⇒ Object
14 15 16 17 18 |
# File 'lib/vraptor-scaffold/generators/app/dependency/gae_dependencies.rb', line 14 def test_scope [Dependency.new("junit", "junit", "4.10"), Dependency.new("org.hamcrest", "hamcrest-all", "1.1"), Dependency.new("org.mockito", "mockito-all", "1.9.0")] end |