1
0
Fork 0
mirror of https://github.com/sinatra/sinatra synced 2023-03-27 23:18:01 -04:00

update sinatra.gemspec

This commit is contained in:
Ryan Tomayko 2008-12-20 22:27:40 -08:00
parent 5c168fb857
commit 50999bf3fc
2 changed files with 75 additions and 38 deletions

View file

@ -147,11 +147,18 @@ task 'doc:book' => ['book/output/sinatra-book.html']
# Gemspec Helpers ====================================================
def source_version
line = File.read('lib/sinatra/base.rb')[/^\s*VERSION = .*/]
line.match(/.*VERSION = '(.*)'/)[1]
end
file 'sinatra.gemspec' => FileList['{lib,test,images}/**','Rakefile'] do |f|
# read spec file and split out manifest section
spec = File.read(f.name)
parts = spec.split(" # = MANIFEST =\n")
fail 'bad spec' if parts.length != 3
head, manifest, tail = spec.split(" # = MANIFEST =\n")
# replace version and date
head.sub!(/\.version = '.*'/, ".version = '#{source_version}'")
head.sub!(/\.date = '.*'/, ".date = '#{Date.today.to_s}'")
# determine file list from git ls-files
files = `git ls-files`.
split("\n").
@ -161,8 +168,8 @@ file 'sinatra.gemspec' => FileList['{lib,test,images}/**','Rakefile'] do |f|
map{ |file| " #{file}" }.
join("\n")
# piece file back together and write...
parts[1] = " s.files = %w[\n#{files}\n ]\n"
spec = parts.join(" # = MANIFEST =\n")
manifest = " s.files = %w[\n#{files}\n ]\n"
spec = [head,manifest,tail].join(" # = MANIFEST =\n")
File.open(f.name, 'w') { |io| io.write(spec) }
puts "updated #{f.name}"
end

View file

@ -3,8 +3,8 @@ Gem::Specification.new do |s|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.name = 'sinatra'
s.version = '0.3.2'
s.date = "2008-11-02"
s.version = '0.9.0'
s.date = '2008-12-21'
s.description = "Classy web-development dressed in a DSL"
s.summary = "Classy web-development dressed in a DSL"
@ -17,49 +17,79 @@ Gem::Specification.new do |s|
LICENSE
README.rdoc
Rakefile
images/404.png
images/500.png
compat/app_test.rb
compat/application_test.rb
compat/builder_test.rb
compat/custom_error_test.rb
compat/erb_test.rb
compat/events_test.rb
compat/filter_test.rb
compat/haml_test.rb
compat/helper.rb
compat/mapped_error_test.rb
compat/pipeline_test.rb
compat/public/foo.xml
compat/sass_test.rb
compat/sessions_test.rb
compat/streaming_test.rb
compat/sym_params_test.rb
compat/template_test.rb
compat/use_in_file_templates_test.rb
compat/views/foo.builder
compat/views/foo.erb
compat/views/foo.haml
compat/views/foo.sass
compat/views/foo_layout.erb
compat/views/foo_layout.haml
compat/views/layout_test/foo.builder
compat/views/layout_test/foo.erb
compat/views/layout_test/foo.haml
compat/views/layout_test/foo.sass
compat/views/layout_test/layout.builder
compat/views/layout_test/layout.erb
compat/views/layout_test/layout.haml
compat/views/layout_test/layout.sass
compat/views/no_layout/no_layout.builder
compat/views/no_layout/no_layout.haml
lib/sinatra.rb
lib/sinatra/test/methods.rb
lib/sinatra/base.rb
lib/sinatra/compat.rb
lib/sinatra/images/404.png
lib/sinatra/images/500.png
lib/sinatra/main.rb
lib/sinatra/rack/methodoverride.rb
lib/sinatra/test.rb
lib/sinatra/test/rspec.rb
lib/sinatra/test/spec.rb
lib/sinatra/test/unit.rb
sinatra.gemspec
test/app_test.rb
test/application_test.rb
test/base_test.rb
test/builder_test.rb
test/custom_error_test.rb
test/data/reload_app_file.rb
test/erb_test.rb
test/event_context_test.rb
test/events_test.rb
test/filter_test.rb
test/haml_test.rb
test/helper.rb
test/helpers_test.rb
test/mapped_error_test.rb
test/pipeline_test.rb
test/public/foo.xml
test/middleware_test.rb
test/options_test.rb
test/reload_test.rb
test/request_test.rb
test/result_test.rb
test/routing_test.rb
test/sass_test.rb
test/sessions_test.rb
test/streaming_test.rb
test/sym_params_test.rb
test/template_test.rb
test/use_in_file_templates_test.rb
test/views/foo.builder
test/views/foo.erb
test/views/foo.haml
test/views/foo.sass
test/views/foo_layout.erb
test/views/foo_layout.haml
test/views/layout_test/foo.builder
test/views/layout_test/foo.erb
test/views/layout_test/foo.haml
test/views/layout_test/foo.sass
test/views/layout_test/layout.builder
test/views/layout_test/layout.erb
test/views/layout_test/layout.haml
test/views/layout_test/layout.sass
test/views/no_layout/no_layout.builder
test/views/no_layout/no_layout.haml
test/sinatra_test.rb
test/static_test.rb
test/templates_test.rb
test/views/hello.builder
test/views/hello.erb
test/views/hello.haml
test/views/hello.sass
test/views/hello.test
test/views/layout2.builder
test/views/layout2.erb
test/views/layout2.haml
test/views/layout2.test
]
# = MANIFEST =