sparrowhawk 0.9.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.
- data/CHANGELOG.md +4 -0
- data/LICENSE +19 -0
- data/README.md +25 -0
- data/lib/sparrowhawk/application_files_mapper.rb +30 -0
- data/lib/sparrowhawk/bundler_definition.rb +18 -0
- data/lib/sparrowhawk/bundler_gem_finder.rb +56 -0
- data/lib/sparrowhawk/entry.rb +13 -0
- data/lib/sparrowhawk/file_entry.rb +17 -0
- data/lib/sparrowhawk/file_entry_mapper.rb +31 -0
- data/lib/sparrowhawk/gem_mapper.rb +43 -0
- data/lib/sparrowhawk/gemfile_entry.rb +9 -0
- data/lib/sparrowhawk/index.rb +44 -0
- data/lib/sparrowhawk/jar_entry.rb +18 -0
- data/lib/sparrowhawk/jruby_core_jar_entry.rb +12 -0
- data/lib/sparrowhawk/jruby_rack_jar_entry.rb +22 -0
- data/lib/sparrowhawk/jruby_stdlib_jar_entry.rb +12 -0
- data/lib/sparrowhawk/lockfile_entry.rb +11 -0
- data/lib/sparrowhawk/manifest_entry.rb +15 -0
- data/lib/sparrowhawk/public_dir_mapper.rb +24 -0
- data/lib/sparrowhawk/rake_task.rb +56 -0
- data/lib/sparrowhawk/war.rb +48 -0
- data/lib/sparrowhawk/web_xml_entry.rb +75 -0
- data/lib/sparrowhawk.rb +27 -0
- metadata +203 -0
data/CHANGELOG.md
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2010 Ryan L. Bell
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
## Sparrowhawk: The Warbler Killer
|
2
|
+
|
3
|
+
'The Warbler Killer' is kind of tongue-in-cheek. Sparrowhawk is for teams that would like to distribute their application as a WAR file, but prefer that their distribution tool chain remain purely MRI. That's not to say that Sparrowhawk won't run on JRuby, just that the goal was to produce a tool that would run on any ruby.
|
4
|
+
|
5
|
+
## Why Sparrowhawk?
|
6
|
+
|
7
|
+
Why would you pick Sparrowhawk over another tool, like, ohhhhh I don't know... Warbler?
|
8
|
+
|
9
|
+
I can think of two reasons.
|
10
|
+
|
11
|
+
First, we run on any ruby (or, we will, by 1.0.0)
|
12
|
+
|
13
|
+
The second reason depends on preference. Warbler is a command line tool based on rake. To use warbler, you need to load up all of rake. There are times when this can have negative ramifications.
|
14
|
+
|
15
|
+
>TODO: Give examples of negative ramifications
|
16
|
+
|
17
|
+
Sparrowhawk, on the other hand, is a library for packaging Rack applications as war files. It happens that sparrowhawk ships with a rake task, but rake isn't required to use Sparrowhawk.
|
18
|
+
|
19
|
+
## Notes and Warnings
|
20
|
+
|
21
|
+
Sparrowhawk was built to package TriSano.
|
22
|
+
|
23
|
+
Sparrowhawk only does rails applications so far. Full Rack support is forth coming, but wasn't our first priority.
|
24
|
+
|
25
|
+
I've only tested Sparrowhawk on Rails 2.3.x applications w/ bundler integration (a niche group, to be certain). It does, however, work beautifully on one such application (TriSano).
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
class ApplicationFilesMapper
|
4
|
+
include FileEntryMapper
|
5
|
+
|
6
|
+
attr_reader :application_root, :application_dirs
|
7
|
+
|
8
|
+
def initialize *application_dirs
|
9
|
+
@application_root = expand_path '.'
|
10
|
+
@excluded_path_patterns = [%r{/vendor/cache/}]
|
11
|
+
@application_dirs = application_dirs || default_application_dirs
|
12
|
+
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def file_pattern
|
17
|
+
application_root + "/{#{application_dirs.join(',')}}/**{,/*/**}/*"
|
18
|
+
end
|
19
|
+
|
20
|
+
def entry_name file_name
|
21
|
+
"WEB-INF/" + expand_path(file_name)[application_root.length + 1..-1]
|
22
|
+
end
|
23
|
+
|
24
|
+
def default_application_dirs
|
25
|
+
%w(app config lib vendor)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'delegate'
|
2
|
+
|
3
|
+
module Sparrowhawk
|
4
|
+
|
5
|
+
class BundlerDefinition < DelegateClass(::Bundler::Definition)
|
6
|
+
def initialize
|
7
|
+
super ::Bundler::Definition.build('Gemfile', 'Gemfile.lock', nil)
|
8
|
+
end
|
9
|
+
|
10
|
+
def runtime_dependencies
|
11
|
+
dependencies.select do |dep|
|
12
|
+
dep.type.to_sym == :runtime and
|
13
|
+
(dep.platforms.empty? or dep.platforms.include?(:jruby))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
class BundlerGemFinder
|
4
|
+
include Enumerable
|
5
|
+
|
6
|
+
attr_reader :definition
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@definition = BundlerDefinition.new
|
10
|
+
end
|
11
|
+
|
12
|
+
def each
|
13
|
+
gems.each { |g| yield g }
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def specs
|
19
|
+
specs_for_dependencies_of @definition
|
20
|
+
end
|
21
|
+
|
22
|
+
def gems
|
23
|
+
@gems ||= [bundler_gem] + specs.map { |s| gem_from_file_by_path(s.source) }
|
24
|
+
end
|
25
|
+
|
26
|
+
def vendor_cache
|
27
|
+
@vendor_cache ||= Index.build do |idx|
|
28
|
+
Dir['vendor/cache/*.gem'].each do |gemfile|
|
29
|
+
spec ||= gem_from_file_by_path(gemfile).spec
|
30
|
+
idx << spec
|
31
|
+
spec.source = gemfile
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def specs_for_dependencies_of thing
|
37
|
+
thing.runtime_dependencies.map do |dep|
|
38
|
+
specs = vendor_cache.search(dep)
|
39
|
+
specs.map { |s| specs_for_dependencies_of s } + specs
|
40
|
+
end.flatten
|
41
|
+
end
|
42
|
+
|
43
|
+
def bundler_gem
|
44
|
+
gem_from_file_by_path cached_bundler_gem_path
|
45
|
+
end
|
46
|
+
|
47
|
+
def cached_bundler_gem_path
|
48
|
+
File.join ENV['GEM_HOME'], "cache", "bundler-#{::Bundler::VERSION}.gem"
|
49
|
+
end
|
50
|
+
|
51
|
+
def gem_from_file_by_path path
|
52
|
+
Gem::Format.from_file_by_path path
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
module FileEntryMapper
|
3
|
+
include Enumerable
|
4
|
+
|
5
|
+
def each
|
6
|
+
file_entry_tuples.each do |entry_name, file_path|
|
7
|
+
next if File.directory? file_path
|
8
|
+
next if excluded? file_path
|
9
|
+
yield FileEntry.new entry_name, file_path
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def file_entry_tuples
|
14
|
+
Dir.glob(file_pattern).map do |f|
|
15
|
+
[entry_name(f), expand_path(f)]
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def expand_path file_name
|
20
|
+
File.expand_path file_name
|
21
|
+
end
|
22
|
+
|
23
|
+
def excluded? file_path
|
24
|
+
excluded_path_patterns.any? { |pattern| pattern =~ file_path }
|
25
|
+
end
|
26
|
+
|
27
|
+
def excluded_path_patterns
|
28
|
+
@excluded_path_patterns ||= []
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
class GemMapper
|
4
|
+
include Enumerable
|
5
|
+
|
6
|
+
attr_reader :gems
|
7
|
+
|
8
|
+
def initialize gems
|
9
|
+
@gems = gems
|
10
|
+
end
|
11
|
+
|
12
|
+
def each
|
13
|
+
gems.each do |gem|
|
14
|
+
spec = gem.spec
|
15
|
+
yield spec_entry spec.spec_name, spec.to_ruby
|
16
|
+
|
17
|
+
gem.file_entries.each do |file_entry|
|
18
|
+
yield gem_file_entry spec.full_name, file_entry[0]["path"], file_entry[1]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def spec_entry spec_name, content
|
26
|
+
Entry.new spec_prefix(spec_name), content
|
27
|
+
end
|
28
|
+
|
29
|
+
def spec_prefix basename
|
30
|
+
File.join "WEB-INF/gems/specifications", basename
|
31
|
+
end
|
32
|
+
|
33
|
+
def gem_file_entry gem_name, basename, content
|
34
|
+
Entry.new gem_file_prefix(gem_name, basename), content
|
35
|
+
end
|
36
|
+
|
37
|
+
def gem_file_prefix gem_name, file_name
|
38
|
+
File.join "WEB-INF/gems/gems", gem_name, file_name
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
# Needed a bundler index can search for gems on the java platform,
|
4
|
+
# regardless of what platform you are cuurrently on.
|
5
|
+
class Index < ::Bundler::Index
|
6
|
+
|
7
|
+
def << spec
|
8
|
+
super
|
9
|
+
arr = @specs[spec.name]
|
10
|
+
if arr.any? { |s| s.platform == java_platform }
|
11
|
+
arr.delete_if { |s| s.platform != java_platform }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def search_by_dependency dependency
|
18
|
+
@cache[dependency.hash] ||= begin
|
19
|
+
specs = @specs[dependency.name]
|
20
|
+
|
21
|
+
wants_prerelease = dependency.requirement.prerelease?
|
22
|
+
only_prerelease = specs.all? {|spec| spec.version.prerelease? }
|
23
|
+
found = specs.select { |spec| dependency.matches_spec?(spec) && matches_java_platform?(spec.platform) }
|
24
|
+
|
25
|
+
unless wants_prerelease || only_prerelease
|
26
|
+
found.reject! { |spec| spec.version.prerelease? }
|
27
|
+
end
|
28
|
+
|
29
|
+
found.sort_by {|s| [s.version, s.platform.to_s == 'ruby' ? "\0" : s.platform.to_s] }
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def matches_java_platform? platform
|
34
|
+
["ruby", java_platform].any? do |java_platform|
|
35
|
+
platform.nil? or java_platform == platform or
|
36
|
+
(java_platform != Gem::Platform::RUBY and java_platform =~ platform)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def java_platform
|
41
|
+
@java_platform ||= Gem::Platform.new("java")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
class JarEntry < FileEntry
|
4
|
+
|
5
|
+
def initialize
|
6
|
+
super jar_entry_name, jar_path
|
7
|
+
end
|
8
|
+
|
9
|
+
def jar_entry_name
|
10
|
+
"WEB-INF/lib/#{File.basename(jar_path)}"
|
11
|
+
end
|
12
|
+
|
13
|
+
def jar_path
|
14
|
+
raise NotImplementedError, "#jar_path should be implemented by a subclass"
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
class JRubyRackJarEntry < JarEntry
|
4
|
+
|
5
|
+
def jar_path
|
6
|
+
return @jar_path if @jar_path
|
7
|
+
begin
|
8
|
+
require 'jruby-rack'
|
9
|
+
@jar_path = JRubyJars.jruby_rack_jar_path
|
10
|
+
rescue LoadError => err
|
11
|
+
@jar_path = jar_path_from_load_error(err)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def jar_path_from_load_error err
|
18
|
+
@jar_path = err.message.split(' -- ')[1]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Sparrowhawk
|
2
|
+
|
3
|
+
class PublicDirMapper
|
4
|
+
include FileEntryMapper
|
5
|
+
|
6
|
+
attr_reader :public_dir
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@public_dir = expand_path('./public')
|
10
|
+
@excluded_path_patterns = [%r{.*\.sass$}]
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def file_pattern
|
16
|
+
public_dir + "/**{,/*/**}/*"
|
17
|
+
end
|
18
|
+
|
19
|
+
def entry_name file_name
|
20
|
+
expand_path(file_name)[public_dir.length + 1..-1 ]
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'rake/tasklib'
|
2
|
+
require 'sparrowhawk'
|
3
|
+
|
4
|
+
module Sparrowhawk
|
5
|
+
|
6
|
+
class RakeTask < ::Rake::TaskLib
|
7
|
+
|
8
|
+
attr_accessor :war_file
|
9
|
+
|
10
|
+
attr_accessor :application_dirs
|
11
|
+
|
12
|
+
attr_accessor :runtimes
|
13
|
+
|
14
|
+
attr_accessor :environment
|
15
|
+
|
16
|
+
attr_accessor :other_files
|
17
|
+
|
18
|
+
def initialize task_name=:war
|
19
|
+
yield self if block_given?
|
20
|
+
|
21
|
+
task task_name do
|
22
|
+
war.build
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def war
|
29
|
+
war = War.new war_file
|
30
|
+
war.entries << PublicDirMapper.new.to_a
|
31
|
+
war.entries << WebXmlEntry.new(web_xml_options)
|
32
|
+
war.entries << ManifestEntry.new
|
33
|
+
war.entries << ApplicationFilesMapper.new(application_dirs).to_a
|
34
|
+
war.entries << JRubyCoreJarEntry.new
|
35
|
+
war.entries << JRubyStdLibJarEntry.new
|
36
|
+
war.entries << JRubyRackJarEntry.new
|
37
|
+
gem_finder = BundlerGemFinder.new
|
38
|
+
war.entries << GemMapper.new(gem_finder).to_a
|
39
|
+
war.entries << GemfileEntry.new
|
40
|
+
war.entries << LockfileEntry.new
|
41
|
+
other_files.each do |file|
|
42
|
+
war.entries << FileEntry.new("WEB-INF/#{file}", file)
|
43
|
+
end if other_files
|
44
|
+
war
|
45
|
+
end
|
46
|
+
|
47
|
+
def web_xml_options
|
48
|
+
options = {}
|
49
|
+
options[:runtimes] = runtimes if runtimes
|
50
|
+
options[:environment] = environment if environment
|
51
|
+
options
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'zip/zipfilesystem'
|
2
|
+
|
3
|
+
module Sparrowhawk
|
4
|
+
|
5
|
+
class War
|
6
|
+
|
7
|
+
attr_reader :name, :entries
|
8
|
+
|
9
|
+
def initialize file_name=nil
|
10
|
+
@name = file_name || default_file_name
|
11
|
+
@entries = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def exist?
|
15
|
+
File.exist? name
|
16
|
+
end
|
17
|
+
alias exists? exist?
|
18
|
+
|
19
|
+
def has_entry? entry_name
|
20
|
+
return false unless exists?
|
21
|
+
open_war { |zip| zip.file.exists?(entry_name) }
|
22
|
+
end
|
23
|
+
|
24
|
+
def build
|
25
|
+
open_war for_writing do |zip|
|
26
|
+
entries.flatten.each do |entry|
|
27
|
+
zip.file.open(entry.name, "w") { |f| f << entry.content }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
self
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def open_war for_writing=nil, &block
|
36
|
+
Zip::ZipFile.open name, for_writing, &block
|
37
|
+
end
|
38
|
+
|
39
|
+
def for_writing
|
40
|
+
Zip::ZipFile::CREATE
|
41
|
+
end
|
42
|
+
|
43
|
+
def default_file_name
|
44
|
+
"#{File.basename File.expand_path('.')}.war"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'builder'
|
2
|
+
|
3
|
+
module Sparrowhawk
|
4
|
+
|
5
|
+
class WebXmlEntry
|
6
|
+
attr_reader :name, :environment
|
7
|
+
|
8
|
+
def initialize options={}
|
9
|
+
@name = 'WEB-INF/web.xml'
|
10
|
+
@runtimes = options[:runtimes] || (1..1)
|
11
|
+
@environment = options[:environment] || 'development'
|
12
|
+
end
|
13
|
+
|
14
|
+
def content
|
15
|
+
xml = Builder::XmlMarkup.new
|
16
|
+
xml.instruct!
|
17
|
+
xml.declare!(:DOCTYPE, 'web-app'.to_sym, :PUBLIC,
|
18
|
+
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN",
|
19
|
+
"http://java.sun.com/dtd/web-app_2_3.dtd")
|
20
|
+
xml.tag! 'web-app' do |xml|
|
21
|
+
xml << context_param('rails.env', environment)
|
22
|
+
xml << context_param('public.root', '/')
|
23
|
+
xml << context_param('jruby.min.runtimes', min_runtimes)
|
24
|
+
xml << context_param('jruby.max.runtimes', max_runtimes)
|
25
|
+
xml << filter(:name => 'RackFilter',
|
26
|
+
:class => 'org.jruby.rack.RackFilter',
|
27
|
+
:url => '/*')
|
28
|
+
xml << listener('org.jruby.rack.rails.RailsServletContextListener')
|
29
|
+
end
|
30
|
+
xml.target!
|
31
|
+
end
|
32
|
+
|
33
|
+
def max_runtimes
|
34
|
+
@runtimes.end.to_s
|
35
|
+
end
|
36
|
+
|
37
|
+
def min_runtimes
|
38
|
+
@runtimes.begin.to_s
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def context_param name, value
|
44
|
+
xml = Builder::XmlMarkup.new
|
45
|
+
xml.tag! 'context-param' do |xml|
|
46
|
+
xml.tag! 'param-name', name
|
47
|
+
xml.tag! 'param-value', value
|
48
|
+
end
|
49
|
+
xml.target!
|
50
|
+
end
|
51
|
+
|
52
|
+
def filter options
|
53
|
+
xml = Builder::XmlMarkup.new
|
54
|
+
xml.filter do |xml|
|
55
|
+
xml.tag! 'filter-name', options[:name]
|
56
|
+
xml.tag! 'filter-class', options[:class]
|
57
|
+
end
|
58
|
+
xml.tag! 'filter-mapping' do |xml|
|
59
|
+
xml.tag! 'filter-name', options[:name]
|
60
|
+
xml.tag! 'url-pattern', options[:url]
|
61
|
+
end
|
62
|
+
xml.target!
|
63
|
+
end
|
64
|
+
|
65
|
+
def listener clazz
|
66
|
+
xml = Builder::XmlMarkup.new
|
67
|
+
xml.listener do |xml|
|
68
|
+
xml.tag! 'listener-class', clazz
|
69
|
+
end
|
70
|
+
xml.target!
|
71
|
+
end
|
72
|
+
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
data/lib/sparrowhawk.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'bundler'
|
2
|
+
|
3
|
+
module Sparrowhawk
|
4
|
+
VERSION = "0.9.0"
|
5
|
+
|
6
|
+
autoload :War ,'sparrowhawk/war'
|
7
|
+
|
8
|
+
autoload :Entry ,'sparrowhawk/entry'
|
9
|
+
autoload :FileEntry ,'sparrowhawk/file_entry'
|
10
|
+
autoload :WebXmlEntry ,'sparrowhawk/web_xml_entry'
|
11
|
+
autoload :ManifestEntry ,'sparrowhawk/manifest_entry'
|
12
|
+
autoload :JarEntry ,'sparrowhawk/jar_entry'
|
13
|
+
autoload :JRubyCoreJarEntry ,'sparrowhawk/jruby_core_jar_entry'
|
14
|
+
autoload :JRubyStdLibJarEntry ,'sparrowhawk/jruby_stdlib_jar_entry'
|
15
|
+
autoload :JRubyRackJarEntry ,'sparrowhawk/jruby_rack_jar_entry'
|
16
|
+
autoload :GemfileEntry ,'sparrowhawk/gemfile_entry'
|
17
|
+
autoload :LockfileEntry ,'sparrowhawk/lockfile_entry'
|
18
|
+
|
19
|
+
autoload :FileEntryMapper ,'sparrowhawk/file_entry_mapper'
|
20
|
+
autoload :PublicDirMapper ,'sparrowhawk/public_dir_mapper'
|
21
|
+
autoload :ApplicationFilesMapper ,'sparrowhawk/application_files_mapper'
|
22
|
+
autoload :GemMapper ,'sparrowhawk/gem_mapper'
|
23
|
+
|
24
|
+
autoload :BundlerGemFinder ,'sparrowhawk/bundler_gem_finder'
|
25
|
+
autoload :BundlerDefinition ,'sparrowhawk/bundler_definition'
|
26
|
+
autoload :Index ,'sparrowhawk/index'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,203 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sparrowhawk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 59
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 9
|
9
|
+
- 0
|
10
|
+
version: 0.9.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Ryan L. Bell
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-12-28 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
name: rubyzip
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
48
|
+
name: jruby-jars
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
name: jruby-rack
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
name: rake
|
77
|
+
- !ruby/object:Gem::Dependency
|
78
|
+
prerelease: false
|
79
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
80
|
+
none: false
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
hash: 3
|
85
|
+
segments:
|
86
|
+
- 0
|
87
|
+
version: "0"
|
88
|
+
type: :development
|
89
|
+
version_requirements: *id005
|
90
|
+
name: rspec
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
prerelease: false
|
93
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
hash: 3
|
99
|
+
segments:
|
100
|
+
- 0
|
101
|
+
version: "0"
|
102
|
+
type: :development
|
103
|
+
version_requirements: *id006
|
104
|
+
name: cucumber
|
105
|
+
- !ruby/object:Gem::Dependency
|
106
|
+
prerelease: false
|
107
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
108
|
+
none: false
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
hash: 3
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
version: "0"
|
116
|
+
type: :development
|
117
|
+
version_requirements: *id007
|
118
|
+
name: aruba
|
119
|
+
- !ruby/object:Gem::Dependency
|
120
|
+
prerelease: false
|
121
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
122
|
+
none: false
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
hash: 3
|
127
|
+
segments:
|
128
|
+
- 0
|
129
|
+
version: "0"
|
130
|
+
type: :development
|
131
|
+
version_requirements: *id008
|
132
|
+
name: nokogiri
|
133
|
+
description: Sparrowhawk uses bundler and vendor/cache to package rails applications into a war file, without executing Java or JRuby
|
134
|
+
email:
|
135
|
+
- ryan.l.bell@gmail.com
|
136
|
+
executables: []
|
137
|
+
|
138
|
+
extensions: []
|
139
|
+
|
140
|
+
extra_rdoc_files: []
|
141
|
+
|
142
|
+
files:
|
143
|
+
- lib/sparrowhawk/public_dir_mapper.rb
|
144
|
+
- lib/sparrowhawk/war.rb
|
145
|
+
- lib/sparrowhawk/jruby_stdlib_jar_entry.rb
|
146
|
+
- lib/sparrowhawk/rake_task.rb
|
147
|
+
- lib/sparrowhawk/bundler_gem_finder.rb
|
148
|
+
- lib/sparrowhawk/web_xml_entry.rb
|
149
|
+
- lib/sparrowhawk/manifest_entry.rb
|
150
|
+
- lib/sparrowhawk/bundler_definition.rb
|
151
|
+
- lib/sparrowhawk/jruby_core_jar_entry.rb
|
152
|
+
- lib/sparrowhawk/file_entry_mapper.rb
|
153
|
+
- lib/sparrowhawk/application_files_mapper.rb
|
154
|
+
- lib/sparrowhawk/jruby_rack_jar_entry.rb
|
155
|
+
- lib/sparrowhawk/gemfile_entry.rb
|
156
|
+
- lib/sparrowhawk/gem_mapper.rb
|
157
|
+
- lib/sparrowhawk/lockfile_entry.rb
|
158
|
+
- lib/sparrowhawk/file_entry.rb
|
159
|
+
- lib/sparrowhawk/entry.rb
|
160
|
+
- lib/sparrowhawk/jar_entry.rb
|
161
|
+
- lib/sparrowhawk/index.rb
|
162
|
+
- lib/sparrowhawk.rb
|
163
|
+
- LICENSE
|
164
|
+
- README.md
|
165
|
+
- CHANGELOG.md
|
166
|
+
has_rdoc: true
|
167
|
+
homepage: https://github.com/kofno/Sparrowhawk
|
168
|
+
licenses: []
|
169
|
+
|
170
|
+
post_install_message:
|
171
|
+
rdoc_options: []
|
172
|
+
|
173
|
+
require_paths:
|
174
|
+
- lib
|
175
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
176
|
+
none: false
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
hash: 3
|
181
|
+
segments:
|
182
|
+
- 0
|
183
|
+
version: "0"
|
184
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ">="
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
hash: 23
|
190
|
+
segments:
|
191
|
+
- 1
|
192
|
+
- 3
|
193
|
+
- 6
|
194
|
+
version: 1.3.6
|
195
|
+
requirements: []
|
196
|
+
|
197
|
+
rubyforge_project:
|
198
|
+
rubygems_version: 1.3.7
|
199
|
+
signing_key:
|
200
|
+
specification_version: 3
|
201
|
+
summary: An MRI friendly war packaginer for rack applications
|
202
|
+
test_files: []
|
203
|
+
|