LEFT | RIGHT |
1 require 'rubygems' | 1 require 'rubygems' |
2 require 'rake/gempackagetask' | 2 require 'rake/gempackagetask' |
3 require 'rubygems/specification' | 3 require 'rubygems/specification' |
4 require 'date' | 4 require 'date' |
5 require 'erb' | 5 require 'erb' |
6 require 'fileutils' | 6 require 'fileutils' |
7 | 7 |
8 ROOT = File.expand_path(File.dirname(__FILE__)) | 8 ROOT = File.expand_path(File.dirname(__FILE__)) |
9 require "#{ROOT}/lib/appengine-jruby-jars" | 9 require "#{ROOT}/lib/appengine-jruby-jars" |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 warn_file = "#{site_ruby}jruby/openssl/builtin.rb" | 70 warn_file = "#{site_ruby}jruby/openssl/builtin.rb" |
71 all_lines = IO.readlines(warn_file) | 71 all_lines = IO.readlines(warn_file) |
72 open(nice_file, 'w') do |file| | 72 open(nice_file, 'w') do |file| |
73 file.puts(all_lines[0..-5] + all_lines[-2..-1]) | 73 file.puts(all_lines[0..-5] + all_lines[-2..-1]) |
74 end | 74 end |
75 mv(nice_file, warn_file) | 75 mv(nice_file, warn_file) |
76 end | 76 end |
77 # redistribute some other files | 77 # redistribute some other files |
78 cp(File.join(AppEngine::Rack::ROOT, 'appengine-rack.rb'), site_ruby) | 78 cp(File.join(AppEngine::Rack::ROOT, 'appengine-rack.rb'), site_ruby) |
79 cp_r(File.join(AppEngine::Rack::ROOT, 'appengine-rack'), | 79 cp_r(File.join(AppEngine::Rack::ROOT, 'appengine-rack'), |
80 File.join(site_ruby, 'appengine-rack')) | 80 File.join(site_ruby, 'appengine-rack')) |
81 mkdir_p(File.join(site_ruby, 'com', 'google', 'appengine', 'jruby')) | 81 mkdir_p(File.join('com', 'google', 'appengine', 'jruby')) |
82 cp_r(File.join(ROOT, '..', 'appengine-rack', 'src', | 82 cp(File.join(ROOT, 'src', 'LazyApplicationFactory.class'), |
83 'com', 'google', 'appengine', 'jruby'), | 83 File.join('com', 'google', 'appengine', 'jruby')) |
84 File.join(site_ruby, 'com', 'google', 'appengine', 'jruby')) | 84 cp(File.join(ROOT, 'src', 'LazyContextListener.class'), |
| 85 File.join('com', 'google', 'appengine', 'jruby')) |
85 cp(APPENGINE_BOOT, site_ruby) | 86 cp(APPENGINE_BOOT, site_ruby) |
86 cp(APPENGINE_COMMANDS, File.join('jruby', 'commands.rb')) | 87 cp(APPENGINE_COMMANDS, File.join('jruby', 'commands.rb')) |
87 check_system("jar", "cf", File.join(ROOT, ABRIDGED_JAR), '.') | 88 check_system("jar", "cf", File.join(ROOT, ABRIDGED_JAR), '.') |
88 end | 89 end |
89 rm_rf('tmp') | 90 rm_rf('tmp') |
90 end | 91 end |
91 end | 92 end |
92 end | 93 end |
93 | 94 |
94 task :default => :gem | 95 task :default => :gem |
95 | 96 |
96 Rake::GemPackageTask.new(spec).define | 97 Rake::GemPackageTask.new(spec).define |
97 | 98 |
98 desc "install the gem locally" | 99 desc "install the gem locally" |
99 task :install => [:package] do | 100 task :install => [:package] do |
100 sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}} | 101 sh %{sudo gem install pkg/#{GEM}-#{GEM_VERSION}} |
101 end | 102 end |
102 | 103 |
103 desc "create a gemspec file" | 104 desc "create a gemspec file" |
104 task :make_spec do | 105 task :make_spec do |
105 open("#{GEM}.gemspec", "w") do |file| | 106 open("#{GEM}.gemspec", "w") do |file| |
106 file.puts spec.to_ruby | 107 file.puts spec.to_ruby |
107 end | 108 end |
108 end | 109 end |
LEFT | RIGHT |