@@ -118,13 +118,13 @@ task :test => :spec
118118POM_FILE = 'pom.xml'
119119VERSION_FILE = 'src/main/ruby/jruby/rack/version.rb'
120120
121- GEM_VERSION =
121+ GEM_VERSION =
122122 if File . read ( VERSION_FILE ) . match ( /VERSION =.*?['"](.+)['"].*?$/m )
123123 $1
124124 else
125125 raise "VERSION = ... not matched in #{ VERSION_FILE } "
126126 end
127-
127+
128128JAR_VERSION = GEM_VERSION . sub ( /\. (\D +\w *)/ , '-\1' ) # 1.1.1.SNAPSHOT -> 1.1.1-SNAPSHOT
129129
130130desc "Print the (Maven) class-path"
@@ -160,7 +160,7 @@ task :jar => target_jar
160160
161161task :default => :jar
162162
163- file ( target_jruby_rack_version = "target/gem/lib/jruby/rack/version.rb" ) =>
163+ file ( target_jruby_rack_version = "target/gem/lib/jruby/rack/version.rb" ) =>
164164 "src/main/ruby/jruby/rack/version.rb" do |t |
165165 mkdir_p File . dirname ( t . name )
166166 cp t . prerequisites . first , t . name
@@ -177,21 +177,21 @@ task :gem => [target_jar, target_jruby_rack, target_jruby_rack_version] do |t|
177177 require 'date'
178178 Dir . chdir ( "target/gem" ) do
179179 rm_f 'jruby-rack.gemspec'
180- gemspec = Gem ::Specification . new do |s |
181- s . name = %q{jruby-rack}
182- s . version = GEM_VERSION
183- s . authors = [ 'Nick Sieger' ]
184- s . date = Date . today . to_s
185- s . description = %{JRuby-Rack is a combined Java and Ruby library that adapts the Java Servlet API to Rack. For JRuby only.}
186- s . summary = %q{ Rack adapter for JRuby and Servlet Containers }
187- 188- s . files = FileList [ "./**/*" ] . exclude ( "*.gem" ) . map { | f | f . sub ( /^ \. \/ / , '' ) }
189- s . homepage = %q{http://jruby.org }
190- s . has_rdoc = false
191- s . rubyforge_project = %q{jruby-extras}
180+ gemspec = Gem ::Specification . new do |gem |
181+ gem . name = %q{jruby-rack}
182+ gem . version = GEM_VERSION
183+ gem . authors = [ 'Nick Sieger' ]
184+ gem . date = Date . today . to_s
185+ gem . license = 'MIT'
186+ gem . description = %{JRuby- Rack is a combined Java and Ruby library that adapts the Java Servlet API to Rack. For JRuby only. }
187+ gem . summary = %q{Rack adapter for JRuby and Servlet Containers}
188+ 189+ gem . files = FileList [ "./**/*" ] . exclude ( "*.gem" ) . map { | f | f . sub ( /^ \. \/ / , '' ) }
190+ gem . homepage = %q{http://jruby.org}
191+ gem . has_rdoc = false
192192 end
193193 defined? ( Gem ::Builder ) ? Gem ::Builder . new ( gemspec ) . build : Gem ::Package . build ( gemspec )
194- File . open ( 'jruby-rack.gemspec' , 'w' ) { |f | f << gemspec . to_ruby }
194+ File . open ( 'jruby-rack.gemspec' , 'w' ) { |f | f << gemspec . to_ruby }
195195 mv FileList [ '*.gem' ] , '..'
196196 end
197197end
@@ -250,11 +250,11 @@ task :update_version do
250250 end
251251 if version != GEM_VERSION
252252 gem_version = Gem ::Version . create ( version ) # validates VERSION string
253-
253+
254254 lines = File . readlines ( VERSION_FILE ) # update JRuby::Rack::VERSION
255255 lines . each { |l | l . sub! ( /VERSION =.*$/ , %{VERSION = '#{ version } '} ) }
256256 File . open ( VERSION_FILE , "wb" ) { |f | f . puts *lines }
257-
257+
258258 pom_version = if gem_version . prerelease?
259259 segs = gem_version . segments
260260 "#{ segs [ 0 ...-1 ] . join ( '.' ) } -#{ segs [ -1 ] } "
0 commit comments