appengine-tools 0.0.10.1 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -4,15 +4,9 @@ require 'rubygems/specification'
4
4
  require 'date'
5
5
  require 'spec/rake/spectask'
6
6
 
7
- require File.dirname(__FILE__) + '/lib/jruby-rack-jar'
8
-
9
7
  GEM = "appengine-tools"
10
- GEM_VERSION = "0.0.10.1"
8
+ GEM_VERSION = "0.0.11"
11
9
  HOMEPAGE = "http://code.google.com/p/appengine-jruby"
12
- JRUBYRACK_VERSION = AppEngine::JRubyJars::JRUBYRACK_VERSION
13
- JRUBYRACK_JAR = "jruby-rack-#{JRUBYRACK_VERSION}.jar"
14
- JRUBYRACK_URL = "http://repository.codehaus.org/org/jruby/rack/" +
15
- "jruby-rack/#{JRUBYRACK_VERSION}/#{JRUBYRACK_JAR}"
16
10
 
17
11
  spec = Gem::Specification.new do |s|
18
12
  s.name = GEM
@@ -31,7 +25,7 @@ EOF
31
25
 
32
26
  s.require_path = 'lib'
33
27
  s.files = %w(COPYING LICENSE README.rdoc Rakefile) +
34
- ["lib/#{JRUBYRACK_JAR}"] + Dir.glob("{lib,spec}/**/*.{rb,class}")
28
+ Dir.glob("{lib,spec}/**/*.{rb,class}")
35
29
  s.executables = [ 'appcfg.rb', 'dev_appserver.rb' ]
36
30
  s.add_dependency('appengine-rack')
37
31
  s.add_dependency('appengine-sdk')
@@ -49,11 +43,6 @@ Spec::Rake::SpecTask.new do |t|
49
43
  end
50
44
 
51
45
  Rake::GemPackageTask.new(spec) do |pkg|
52
- unless File.exist?("lib/#{JRUBYRACK_JAR}")
53
- puts "Sorry, #{JRUBYRACK_JAR} is missing!"
54
- puts "Please drop it into the lib directory."
55
- exit 1
56
- end
57
46
  pkg.gem_spec = spec
58
47
  end
59
48
 
@@ -77,6 +77,10 @@ module AppEngine
77
77
  path('WEB-INF', 'appengine-generated', 'build_status.yaml')
78
78
  end
79
79
 
80
+ def bundled_jars
81
+ path('WEB-INF', 'appengine-generated', 'bundled_jars.yaml')
82
+ end
83
+
80
84
  def public_root
81
85
  path(AppEngine::Rack.app.public_root) if AppEngine::Rack.app.public_root
82
86
  end
@@ -97,7 +101,6 @@ module AppEngine
97
101
 
98
102
  class AppBundler
99
103
  EXISTING_JRUBY = /^(jruby-abridged|appengine-jruby)-.*jar$/
100
- EXISTING_RACK = /^jruby-rack.*jar$/
101
104
  EXISTING_APIS = /^appengine-api.*jar$/
102
105
  RACKUP = %q{Dir.chdir('..') if Dir.pwd =~ /WEB-INF$/; } +
103
106
  %q{begin; require 'bundler_gems/environment'; } +
@@ -118,7 +121,6 @@ module AppEngine
118
121
  create_webinf
119
122
  bundle_gems(args)
120
123
  copy_jruby
121
- copy_rack
122
124
  copy_sdk
123
125
  end
124
126
 
@@ -184,12 +186,6 @@ EOF
184
186
  update_jars("JRuby", EXISTING_JRUBY, [AppEngine::JRubyJars.jruby_jar])
185
187
  end
186
188
 
187
- def copy_rack
188
- require 'jruby-rack-jar'
189
- update_jars('JRuby-Rack', EXISTING_RACK,
190
- [AppEngine::JRubyJars.jrubyrack_jar])
191
- end
192
-
193
189
  def copy_sdk
194
190
  require 'appengine-sdk'
195
191
  glob = "appengine-api-{1.0-sdk,labs}-*.jar"
@@ -76,6 +76,16 @@ module AppEngine
76
76
  gem_patch = "require 'bundler_gems/#{target_pair}/environment'"
77
77
  File.open("#{bundler_dir}/environment.rb",'w') {|f| f << gem_patch }
78
78
  FileUtils.rm app.gems_jar, :force => true # blow away the old jar
79
+ # cleanup old extension jars
80
+ if File.exists? app.bundled_jars
81
+ YAML.load_file(app.bundled_jars).each do |jar|
82
+ FileUtils.rm File.join(app.webinf_lib, jar), :force => true
83
+ end
84
+ else
85
+ stale = 'jruby-rack-0.9.6.jar'
86
+ FileUtils.rm File.join(app.webinf_lib, stale), :force => true
87
+ end
88
+ jars = []
79
89
  puts "=> Packaging gems"
80
90
  gem_files = Dir["#{bundler_dir}/#{target_pair}/dirs/**/**"] +
81
91
  Dir["#{bundler_dir}/#{target_pair}/gems/**/**"] +
@@ -86,11 +96,13 @@ module AppEngine
86
96
  if file[-4..-1].eql? '.jar'
87
97
  puts "Installing #{File.basename(file)}"
88
98
  FileUtils.cp file, app.webinf_lib
99
+ jars << File.basename(file)
89
100
  else
90
101
  jar.add(file.sub("#{app.gems_dir}/",''), file)
91
102
  end
92
103
  end
93
104
  end
105
+ open(app.bundled_jars, 'w') { |f| YAML.dump(jars, f) }
94
106
  end
95
107
 
96
108
  def verify_gemfile
metadata CHANGED
@@ -5,9 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 10
9
- - 1
10
- version: 0.0.10.1
8
+ - 11
9
+ version: 0.0.11
11
10
  platform: ruby
12
11
  authors:
13
12
  - Ryan Brown
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2010-03-09 00:00:00 -08:00
18
+ date: 2010-04-08 00:00:00 -07:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -101,7 +100,6 @@ files:
101
100
  - LICENSE
102
101
  - README.rdoc
103
102
  - Rakefile
104
- - lib/jruby-rack-0.9.6.jar
105
103
  - lib/appengine-tools/appcfg.rb
106
104
  - lib/appengine-tools/boot.rb
107
105
  - lib/appengine-tools/bundler.rb
Binary file