sparrowhawk 0.9.0 → 0.9.1

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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.9.1 (29 December 2010)
2
+
3
+ * Features
4
+
5
+ ** Only include gems in war that are part of the :default or :production groups (https://www.pivotaltracker.com/story/show/7980329)
6
+
7
+ * Bugs
8
+
9
+ ** Application filter incorrectly grabbing files from the root directory (https://www.pivotaltracker.com/story/show/8006537)
10
+
1
11
  ## 0.9.0 (28 December 2010)
2
12
 
3
13
  * Initial feature set.
@@ -5,7 +5,7 @@ module Sparrowhawk
5
5
 
6
6
  attr_reader :application_root, :application_dirs
7
7
 
8
- def initialize *application_dirs
8
+ def initialize application_dirs=nil
9
9
  @application_root = expand_path '.'
10
10
  @excluded_path_patterns = [%r{/vendor/cache/}]
11
11
  @application_dirs = application_dirs || default_application_dirs
@@ -7,10 +7,12 @@ module Sparrowhawk
7
7
  super ::Bundler::Definition.build('Gemfile', 'Gemfile.lock', nil)
8
8
  end
9
9
 
10
+ # Filters dependencies based on what should be in the war at runtime
10
11
  def runtime_dependencies
11
12
  dependencies.select do |dep|
12
13
  dep.type.to_sym == :runtime and
13
- (dep.platforms.empty? or dep.platforms.include?(:jruby))
14
+ (dep.platforms.empty? or dep.platforms.include?(:jruby)) and
15
+ !(dep.groups & [:default, :production]).empty?
14
16
  end
15
17
  end
16
18
  end
@@ -33,8 +33,8 @@ module Sparrowhawk
33
33
  end
34
34
  end
35
35
 
36
- def specs_for_dependencies_of thing
37
- thing.runtime_dependencies.map do |dep|
36
+ def specs_for_dependencies_of def_or_dep
37
+ def_or_dep.runtime_dependencies.map do |dep|
38
38
  specs = vendor_cache.search(dep)
39
39
  specs.map { |s| specs_for_dependencies_of s } + specs
40
40
  end.flatten
@@ -11,7 +11,7 @@ module Sparrowhawk
11
11
  end
12
12
 
13
13
  def file_entry_tuples
14
- Dir.glob(file_pattern).map do |f|
14
+ Dir.glob(file_pattern).uniq.map do |f|
15
15
  [entry_name(f), expand_path(f)]
16
16
  end
17
17
  end
data/lib/sparrowhawk.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'bundler'
2
2
 
3
3
  module Sparrowhawk
4
- VERSION = "0.9.0"
4
+ VERSION = "0.9.1"
5
5
 
6
6
  autoload :War ,'sparrowhawk/war'
7
7
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparrowhawk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 59
4
+ hash: 57
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 0
10
- version: 0.9.0
9
+ - 1
10
+ version: 0.9.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan L. Bell
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-28 00:00:00 -05:00
18
+ date: 2010-12-29 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency