rdmopensource-warbler 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. data/Gemfile +11 -0
  2. data/History.txt +167 -0
  3. data/LICENSE.txt +26 -0
  4. data/Manifest.txt +48 -0
  5. data/README.txt +194 -0
  6. data/Rakefile +92 -0
  7. data/bin/warble +11 -0
  8. data/ext/Main.java +110 -0
  9. data/ext/WarblerWar.java +115 -0
  10. data/ext/WarblerWarService.java +17 -0
  11. data/lib/warbler.rb +37 -0
  12. data/lib/warbler/application.rb +67 -0
  13. data/lib/warbler/config.rb +349 -0
  14. data/lib/warbler/gems.rb +37 -0
  15. data/lib/warbler/runtime.rb +44 -0
  16. data/lib/warbler/task.rb +224 -0
  17. data/lib/warbler/version.rb +10 -0
  18. data/lib/warbler/war.rb +226 -0
  19. data/lib/warbler_war.jar +0 -0
  20. data/spec/sample/app/controllers/application.rb +15 -0
  21. data/spec/sample/app/helpers/application_helper.rb +3 -0
  22. data/spec/sample/config/boot.rb +109 -0
  23. data/spec/sample/config/database.yml +19 -0
  24. data/spec/sample/config/environment.rb +67 -0
  25. data/spec/sample/config/environments/development.rb +17 -0
  26. data/spec/sample/config/environments/production.rb +22 -0
  27. data/spec/sample/config/environments/test.rb +22 -0
  28. data/spec/sample/config/initializers/inflections.rb +10 -0
  29. data/spec/sample/config/initializers/mime_types.rb +5 -0
  30. data/spec/sample/config/initializers/new_rails_defaults.rb +15 -0
  31. data/spec/sample/config/routes.rb +41 -0
  32. data/spec/sample/lib/tasks/utils.rake +0 -0
  33. data/spec/sample/public/404.html +30 -0
  34. data/spec/sample/public/422.html +30 -0
  35. data/spec/sample/public/500.html +30 -0
  36. data/spec/sample/public/favicon.ico +0 -0
  37. data/spec/sample/public/index.html +274 -0
  38. data/spec/sample/public/robots.txt +5 -0
  39. data/spec/spec_helper.rb +44 -0
  40. data/spec/warbler/application_spec.rb +93 -0
  41. data/spec/warbler/config_spec.rb +112 -0
  42. data/spec/warbler/gems_spec.rb +40 -0
  43. data/spec/warbler/task_spec.rb +146 -0
  44. data/spec/warbler/war_spec.rb +441 -0
  45. data/warble.rb +121 -0
  46. data/web.xml.erb +32 -0
  47. metadata +202 -0
@@ -0,0 +1,121 @@
1
+ # Disable automatic framework detection by uncommenting/setting to false
2
+ # Warbler.framework_detection = false
3
+
4
+ # Warbler web application assembly configuration file
5
+ Warbler::Config.new do |config|
6
+ # Features: additional options controlling how the jar is built.
7
+ # Currently the following features are supported:
8
+ # - gemjar: package the gem repository in a jar file in WEB-INF/lib
9
+ # config.features = %w(gemjar)
10
+
11
+ # Application directories to be included in the webapp.
12
+ config.dirs = %w(app config lib log vendor tmp)
13
+
14
+ # Additional files/directories to include, above those in config.dirs
15
+ # config.includes = FileList["db"]
16
+
17
+ # Additional files/directories to exclude
18
+ # config.excludes = FileList["lib/tasks/*"]
19
+
20
+ # Additional Java .jar files to include. Note that if .jar files are placed
21
+ # in lib (and not otherwise excluded) then they need not be mentioned here.
22
+ # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
23
+ # own versions if you directly set the value
24
+ # config.java_libs += FileList["lib/java/*.jar"]
25
+
26
+ # Loose Java classes and miscellaneous files to be placed in WEB-INF/classes.
27
+ # config.java_classes = FileList["target/classes/**.*"]
28
+
29
+ # One or more pathmaps defining how the java classes should be copied into
30
+ # WEB-INF/classes. The example pathmap below accompanies the java_classes
31
+ # configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
32
+ # for details of how to specify a pathmap.
33
+ # config.pathmaps.java_classes << "%{target/classes/,}p"
34
+
35
+ # Path to the pre-bundled gem directory inside the war file. Default
36
+ # is 'WEB-INF/gems'. Specify path if gems are already bundled
37
+ # before running Warbler. This also sets 'gem.path' inside web.xml.
38
+ # config.gem_path = "WEB-INF/vendor/bundler_gems"
39
+
40
+ # Bundler support is built-in. If Warbler finds a Gemfile in the
41
+ # project directory, it will be used to collect the gems to bundle
42
+ # in your application. If you wish to explicitly disable this
43
+ # functionality, uncomment here.
44
+ # config.bundler = false
45
+
46
+ # Files for WEB-INF directory (next to web.xml). This contains
47
+ # web.xml by default. If there is an .erb-File it will be processed
48
+ # with webxml-config. You may want to exclude this file via
49
+ # config.excludes.
50
+ # config.webinf_files += FileList["jboss-web.xml"]
51
+
52
+ # Other gems to be included. You need to tell Warbler which gems
53
+ # your application needs so that they can be packaged in the war
54
+ # file.
55
+ # The Rails gems are included by default unless the vendor/rails
56
+ # directory is present.
57
+ # config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
58
+ # config.gems << "tzinfo"
59
+
60
+ # Uncomment this if you don't want to package rails gem.
61
+ # config.gems -= ["rails"]
62
+
63
+ # The most recent versions of gems are used.
64
+ # You can specify versions of gems by using a hash assignment:
65
+ # config.gems["rails"] = "2.0.2"
66
+
67
+ # You can also use regexps or Gem::Dependency objects for flexibility or
68
+ # fine-grained control.
69
+ # config.gems << /^merb-/
70
+ # config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
71
+
72
+ # Include gem dependencies not mentioned specifically. Default is true, uncomment
73
+ # to turn off.
74
+ # config.gem_dependencies = false
75
+
76
+ # Files to be included in the root of the webapp. Note that files in public
77
+ # will have the leading 'public/' part of the path stripped during staging.
78
+ # config.public_html = FileList["public/**/*", "doc/**/*"]
79
+
80
+ # Pathmaps for controlling how public HTML files are copied into the .war
81
+ # config.pathmaps.public_html = ["%{public/,}p"]
82
+
83
+ # Pathmaps for controlling how application files are copied into the .war
84
+ # config.pathmaps.application = ["WEB-INF/%p"]
85
+
86
+ # Name of the war file (without the .war) -- defaults to the basename
87
+ # of RAILS_ROOT
88
+ # config.war_name = "mywar"
89
+
90
+ # Name of the MANIFEST.MF template for the war file. Defaults to the
91
+ # MANIFEST.MF normally generated by `jar cf`.
92
+ # config.manifest_file = "config/MANIFEST.MF"
93
+
94
+ # Value of RAILS_ENV for the webapp -- default as shown below
95
+ # config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
96
+
97
+ # Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
98
+ # config.webxml.booter = :rails
99
+
100
+ # When using the :rack booter, "Rackup" script to use.
101
+ # - For 'rackup.path', the value points to the location of the rackup
102
+ # script in the web archive file. You need to make sure this file
103
+ # gets included in the war, possibly by adding it to config.includes
104
+ # or config.webinf_files above.
105
+ # - For 'rackup', the rackup script you provide as an inline string
106
+ # is simply embedded in web.xml.
107
+ # The script is evaluated in a Rack::Builder to load the application.
108
+ # Examples:
109
+ # config.webxml.rackup.path = 'WEB-INF/hello.ru'
110
+ # config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
111
+ # config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
112
+
113
+ # Control the pool of Rails runtimes. Leaving unspecified means
114
+ # the pool will grow as needed to service requests. It is recommended
115
+ # that you fix these values when running a production server!
116
+ # config.webxml.jruby.min.runtimes = 2
117
+ # config.webxml.jruby.max.runtimes = 4
118
+
119
+ # JNDI data source name
120
+ # config.webxml.jndi = 'jdbc/rails'
121
+ end
@@ -0,0 +1,32 @@
1
+ <!DOCTYPE web-app PUBLIC
2
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
3
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
4
+ <web-app>
5
+ <% webxml.context_params.each do |k,v| %>
6
+ <context-param>
7
+ <param-name><%= k %></param-name>
8
+ <param-value><%= v %></param-value>
9
+ </context-param>
10
+ <% end %>
11
+
12
+ <filter>
13
+ <filter-name>RackFilter</filter-name>
14
+ <filter-class>org.jruby.rack.RackFilter</filter-class>
15
+ </filter>
16
+ <filter-mapping>
17
+ <filter-name>RackFilter</filter-name>
18
+ <url-pattern>/*</url-pattern>
19
+ </filter-mapping>
20
+
21
+ <listener>
22
+ <listener-class><%= webxml.servlet_context_listener %></listener-class>
23
+ </listener>
24
+
25
+ <% if webxml.jndi then webxml.jndi.each do |jndi| %>
26
+ <resource-ref>
27
+ <res-ref-name><%= jndi %></res-ref-name>
28
+ <res-type>javax.sql.DataSource</res-type>
29
+ <res-auth>Container</res-auth>
30
+ </resource-ref>
31
+ <% end; end %>
32
+ </web-app>
metadata ADDED
@@ -0,0 +1,202 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rdmopensource-warbler
3
+ version: !ruby/object:Gem::Version
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 1
9
+ - 0
10
+ version: 1.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Nick Sieger
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-05-13 00:00:00 -04:00
19
+ default_executable: warble
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rake
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 49
30
+ segments:
31
+ - 0
32
+ - 8
33
+ - 7
34
+ version: 0.8.7
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: jruby-jars
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 7
46
+ segments:
47
+ - 1
48
+ - 4
49
+ - 0
50
+ version: 1.4.0
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: jruby-rack
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ hash: 43
62
+ segments:
63
+ - 0
64
+ - 9
65
+ - 8
66
+ version: 0.9.8
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubyzip
71
+ prerelease: false
72
+ requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ hash: 51
78
+ segments:
79
+ - 0
80
+ - 9
81
+ - 4
82
+ version: 0.9.4
83
+ type: :runtime
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
86
+ name: rubyforge
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ hash: 7
94
+ segments:
95
+ - 2
96
+ - 0
97
+ - 4
98
+ version: 2.0.4
99
+ type: :development
100
+ version_requirements: *id005
101
+ description: |-
102
+ Warbler is a gem to make a .war file out of a Rails, Merb, or Rack-based
103
+ application. The intent is to provide a minimal, flexible, ruby-like way to
104
+ bundle up all of your application files for deployment to a Java application
105
+ server.
106
+ email: nick@nicksieger.com
107
+ executables:
108
+ - warble
109
+ extensions: []
110
+
111
+ extra_rdoc_files:
112
+ - History.txt
113
+ - LICENSE.txt
114
+ - Manifest.txt
115
+ - README.txt
116
+ files:
117
+ - Gemfile
118
+ - History.txt
119
+ - LICENSE.txt
120
+ - Manifest.txt
121
+ - README.txt
122
+ - Rakefile
123
+ - bin/warble
124
+ - ext/Main.java
125
+ - ext/WarblerWar.java
126
+ - ext/WarblerWarService.java
127
+ - lib/warbler.rb
128
+ - lib/warbler/application.rb
129
+ - lib/warbler/config.rb
130
+ - lib/warbler/gems.rb
131
+ - lib/warbler/runtime.rb
132
+ - lib/warbler/task.rb
133
+ - lib/warbler/version.rb
134
+ - lib/warbler/war.rb
135
+ - lib/warbler_war.jar
136
+ - spec/sample/app/controllers/application.rb
137
+ - spec/sample/app/helpers/application_helper.rb
138
+ - spec/sample/config/boot.rb
139
+ - spec/sample/config/database.yml
140
+ - spec/sample/config/environment.rb
141
+ - spec/sample/config/environments/development.rb
142
+ - spec/sample/config/environments/production.rb
143
+ - spec/sample/config/environments/test.rb
144
+ - spec/sample/config/initializers/inflections.rb
145
+ - spec/sample/config/initializers/mime_types.rb
146
+ - spec/sample/config/initializers/new_rails_defaults.rb
147
+ - spec/sample/config/routes.rb
148
+ - spec/sample/lib/tasks/utils.rake
149
+ - spec/sample/public/404.html
150
+ - spec/sample/public/422.html
151
+ - spec/sample/public/500.html
152
+ - spec/sample/public/favicon.ico
153
+ - spec/sample/public/index.html
154
+ - spec/sample/public/robots.txt
155
+ - spec/spec_helper.rb
156
+ - spec/warbler/application_spec.rb
157
+ - spec/warbler/config_spec.rb
158
+ - spec/warbler/gems_spec.rb
159
+ - spec/warbler/task_spec.rb
160
+ - spec/warbler/war_spec.rb
161
+ - warble.rb
162
+ - web.xml.erb
163
+ has_rdoc: true
164
+ homepage: http://caldersphere.rubyforge.org/warbler
165
+ licenses: []
166
+
167
+ post_install_message:
168
+ rdoc_options:
169
+ - --main
170
+ - README.txt
171
+ - -SHN
172
+ - -f
173
+ - darkfish
174
+ require_paths:
175
+ - lib
176
+ required_ruby_version: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ">="
180
+ - !ruby/object:Gem::Version
181
+ hash: 3
182
+ segments:
183
+ - 0
184
+ version: "0"
185
+ required_rubygems_version: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ">="
189
+ - !ruby/object:Gem::Version
190
+ hash: 3
191
+ segments:
192
+ - 0
193
+ version: "0"
194
+ requirements: []
195
+
196
+ rubyforge_project: caldersphere
197
+ rubygems_version: 1.3.7
198
+ signing_key:
199
+ specification_version: 3
200
+ summary: Warbler chirpily constructs .war files of your Rails applications.
201
+ test_files: []
202
+